- Add max_chunks: 50 gate in upload.py β docs >50 chunks skip contextual
retrieval entirely with logged warning (~17 min hang for 104-chunk files)
- Trim full_doc_text context from [:3000] to [:1500] in both sync and async
contextualization paths β drops TPM burst from ~3240 to ~2115, below 3000
TPM free-tier window, reducing 429s for smaller docs
- Update contextual retrieval model to openai/gpt-oss-20b (llama-3.1-8b-instant
being decommissioned by Groq)
- Same model update propagated to eval script judge defaults
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>