Fix sheet-extraction page loss: bare-list wrap, compact retry, reasoning cap
Docker Release / build-and-push (push) Successful in 1m1s
Docker Release / release (push) Skipped

- SheetExtractorAgent accepts top-level array responses as the objects
  array instead of discarding them (recovered the failure mode behind
  16/38 failed sheets on job 475a6f184dd1)
- Second-chance compact retry per page before declaring extraction failed
- call_json: reasoning_effort param (cloud-only extra_body), finish_reason
  capture + explicit max_tokens log line, finish_reason in raw dumps,
  cache key covers reasoning_effort
- EXTRACT_MAX_TOKENS default 16384 -> 32768 (Gemini thinking tokens count
  against the cap); new EXTRACT_REASONING_EFFORT=low default for extract
- tests: 5 new fallback-ladder tests
This commit is contained in:
2026-08-07 07:35:53 -05:00
parent 5c1fccfb35
commit 76e0a52658
5 changed files with 167 additions and 21 deletions
+4 -1
View File
@@ -39,7 +39,10 @@ PDF_DPI=100
MAX_PAGES=60
MAX_DIMENSION=2400
LLM_TIMEOUT=180
EXTRACT_MAX_TOKENS=8192
EXTRACT_MAX_TOKENS=32768
# Reasoning effort for per-sheet extraction (low keeps Gemini thinking tokens
# from eating the output budget). Blank = don't send the parameter.
EXTRACT_REASONING_EFFORT=low
REASON_MAX_TOKENS=4096
EXTRACT_CONCURRENCY=4
REASON_CONCURRENCY=4