Kill extract-wave truncation: 65k ceiling, hard thinking budget, reasoning-token telemetry
Job 98194fa8d215 showed every extract call hitting the 32k cap with only ~20k chars visible despite reasoning effort=low - Gemini 2.5 Pro still burned ~25k thinking tokens per sheet. - EXTRACT_MAX_TOKENS default 32768 -> 65536 (model output ceiling) - new EXTRACT_REASONING_MAX_TOKENS (default 2048): OpenRouter reasoning max_tokens / Gemini thinking_budget; takes precedence over effort - log per-call reasoning token counts (usage.completion_tokens_details) and include thinking count in the finish_reason=length marker
This commit is contained in:
@@ -57,6 +57,7 @@ class SheetExtractorAgent:
|
||||
usage_tracker=self.usage,
|
||||
usage_stage="agent.extract",
|
||||
reasoning_effort=config.EXTRACT_REASONING_EFFORT or None,
|
||||
reasoning_max_tokens=config.EXTRACT_REASONING_MAX_TOKENS or None,
|
||||
)
|
||||
|
||||
def run(self, scope: AgentScope) -> AgentResult:
|
||||
|
||||
Reference in New Issue
Block a user