Repository navigation
fix(agent-server): drop retired Gemini models from /api/model allowlist (#1137) - #1144
Merged
Merged
Conversation
…1137) Follow-up from #1130. The agent-server model endpoints still advertised Gemini models Google has retired, so a gemini-cli runtime agent could select one and get a 404 from Google at runtime. - GET /api/model `available_models`: replace the gemini-2.0-flash entry with the live set — gemini-3-pro, gemini-3-flash, gemini-2.5-pro, gemini-2.5-flash; update the note accordingly. - PUT /api/model `valid_models` allowlist: drop gemini-2.0-flash, gemini-1.5-pro, gemini-1.5-flash; keep only the four live models. Update the 400 error hint. The `startswith("gemini-")` forward-compat fallback is retained intentionally. - gemini_runtime.py pricing table: comment the 2.0-flash / 2.0-flash-lite entries as historical — kept only so cost calc of older executions still resolves, not offered in the lists. Model set sourced from the runtime's own GEMINI_PRICING table (default gemini-3-flash), not the issue's parenthetical guesses. Base image rebuilt (trinity-agent-base:0.6.0/latest); new lists verified inside the image. Related to #1137 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Resolve by running |
vybe
approved these changes
Jun 11, 2026
vybe
left a comment
Contributor
There was a problem hiding this comment.
Validated via /validate-pr: focused 2-file fix, CI green, security clean, historical pricing entry correctly retained for cost calc of older executions. Approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up from #1130. The agent-server model endpoints in
docker/base-image/agent_server/routers/chat.pystill advertised retired Gemini models — agemini-cliruntime agent could pick one and get a 404 from Google at runtime.Changes
GET /api/modelavailable_models:gemini-2.0-flash→ live set[gemini-3-pro, gemini-3-flash, gemini-2.5-pro, gemini-2.5-flash]; note updated.PUT /api/modelvalid_models: droppedgemini-2.0-flash,gemini-1.5-pro,gemini-1.5-flash; kept only the four live models. 400 hint updated. Thestartswith("gemini-")forward-compat fallback is intentionally retained.gemini_runtime.pypricing table:2.0-flash/2.0-flash-litecommented as historical — kept so cost calc of older executions still resolves, not offered in the lists.Decision note
Model set sourced from the runtime's own
GEMINI_PRICINGtable (agent defaultgemini-3-flash), not the issue's parenthetical guesses (gemini-3.5-flash,gemini-3-flash-preview) — those don't exist in the runtime.Verification
py_compileclean on both files.trinity-agent-base:0.6.0/:latest.grepon/app/agent_server/routers/chat.py) — no retired models present.AC
GET /api/modelno longer advertises retired modelsPUT /api/modelallowlist contains only currently-available modelsRelated to #1137
🤖 Generated with Claude Code