Use tiered low-cost AI Gateway fallbacks#75
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4cbcf91979
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Reuse Nano for synthesis recovery: it is cheaper than Mini, retains a | ||
| # long output window, and avoids asking Flash Lite to write the long | ||
| # bilingual reports that it failed the production quality gate on. | ||
| fallback = split_env_list("AI_GATEWAY_FALLBACK_MODELS", [DEFAULT_CHEAP_SCREEN_MODEL]) |
There was a problem hiding this comment.
Keep synthesis fallbacks on the long timeout
When a daily/weekly/monthly synthesis call falls back through this new Nano default, call_ai_gateway_model still uses model_call_timeout(candidate_model), and model_call_timeout treats openai/gpt-5-nano as the cheap screening model with the 300s SCREEN_MODEL_TIMEOUT. That means the long bilingual synthesis recovery path can be killed after five minutes even though the primary GPT-OSS synthesis call gets the 900s synthesis timeout; use the workload/original model to choose the timeout instead of the fallback model name.
Useful? React with 👍 / 👎.
Summary
Validation
python3 -m unittest discover -s tests(255 tests)python3 -m py_compile scripts/cloud_agent_runner.pygit diff --checkLive evidence
Daily run 29849327304 succeeded on Nano + GPT-OSS without fallback. Weekly run 29850411317 parsed successfully but Flash Lite failed the repository bilingual-content gate, so Flash Lite is now limited to screening recovery and Nano handles synthesis recovery.