- Add estimate_tokens() and estimate_max_tokens() to llm_client with stage-specific output ratios (0.3x segmentation, 1.2x extraction, 0.15x classification, 1.5x synthesis) - Add max_tokens override parameter to LLMClient.complete() - Wire all 4 pipeline stages to estimate max_tokens from actual prompt content with 20% buffer and 2048 floor - Add LLM_MAX_TOKENS_HARD_LIMIT=32768 config (dynamic estimator ceiling) - Log token estimates alongside every LLM request Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| embedding_client.py | ||
| llm_client.py | ||
| qdrant_client.py | ||
| schemas.py | ||
| stages.py | ||