Repository navigation
fix(models): drop shut-down Gemini preview slugs from the AI Studio catalogs - #109896
Open
MaxFreedomPollard wants to merge 1 commit into
Open
MaxFreedomPollard wants to merge 1 commit into
MaxFreedomPollard wants to merge 1 commit into
Conversation
…atalogs ai.google.dev/gemini-api/docs/models lists both gemini-3-pro-preview and gemini-3.1-flash-lite-preview under "Previous models": "These models are deprecated and will be shut down soon; migrate to newer models to prevent service interruptions." Each row is titled "(Shut down)". Drop them from the curated gemini picker and add them to _GOOGLE_HIDDEN_MODELS, next to gemini-2.0-flash/-lite, which are marked "(Shut down)" in the same table. gemini-3.1-pro-preview is still a current Preview model and is untouched, as are the other hosts' catalogs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
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.
What does this PR do?
_PROVIDER_MODELS["gemini"](hermes_cli/models_catalog_static.py:174) offers two Google AI Studio slugs that Google has shut down:gemini-3-pro-previewandgemini-3.1-flash-lite-preview.Both sit in the "Previous models" table on https://ai.google.dev/gemini-api/docs/models, introduced by:
and each is titled
(Shut down)in that table:Their only table-mates are
gemini-2.0-flashandgemini-2.0-flash-lite— which this repo already treats as dead, in_GOOGLE_HIDDEN_MODELS(agent/models_dev.py:781) under the comment "Stale/retired Google slugs that 404 on the current endpoints". So the two shut-down preview slugs get the same two-part treatment the 2.0 pair got:_GOOGLE_HIDDEN_MODELS, so_should_hide_from_provider_catalog()also strips them from the live models.dev merge (list_agentic_models,agent/models_dev.py:797) — otherwise the picker re-acquires them from upstream metadata the moment the catalog is reachable, which is exactly why the 2.0 entries need both halves.Scope is deliberately narrow.
gemini-3.1-pro-previewis not touched: it is still a current Preview model on that page, not a "Previous model", and the test pins that. Other hosts keep their own catalogs —vertex,kilocode,ai-gateway,gmiand thegoogle/…-prefixed entries inopencode-goare unchanged, as ismodel_setup_flows.py.Related Issue
No issue. Adjacent, non-conflicting: #62746 ("Config-driven override for the Gemma picker-visibility filter") also touches
agent/models_dev.py, but it reworks the Gemma half of the filter into config; it neither edits the retired-slug block nor the curatedgeminilist. This PR adds two entries to the existing frozenset and leaves the filter mechanism alone.Type of Change
Changes Made
hermes_cli/models_catalog_static.py:_PROVIDER_MODELS["gemini"]dropsgemini-3-pro-previewandgemini-3.1-flash-lite-preview.agent/models_dev.py: the same two ids join_GOOGLE_HIDDEN_MODELS, on the "Stale/retired Google slugs that 404 on the current endpoints" line with the 1.5 and 2.0 slugs.tests/hermes_cli/test_gemini_shut_down_preview_slugs.py(new): both ids are hidden for providergeminiandgoogle; neither is on the curated list;gemini-3.1-pro-previewstays listed, stays out of the frozenset, and stays visible.How to Test
On
main, apply only the test file:scripts/run_tests.sh tests/hermes_cli/test_gemini_shut_down_preview_slugs.py→ 2 failed, 1 passed:On this branch: 3 passed.
Wider sweep — all 12 test files referencing either slug,
_GOOGLE_HIDDEN_MODELS, or the curatedgeminilist (includestest_gemini_provider.py,test_vertex_model_picker.py,test_gmi_provider.py,test_gemini_native_adapter.py,test_usage_pricing.py): 460 passed, 0 failed.Manually:
hermes /modelon a Google AI Studio key no longer offers either slug, with or without a live models.dev catalog;gemini-3.1-pro-previewstill appears.Checklist
Code
fix(scope):,feat(scope):, etc.)gemini-3-pro-preview,gemini-3.1-flash-lite-previewand_GOOGLE_HIDDEN_MODELS; none retires these slugs (Config-driven override for the Gemma picker-visibility filter #62746 is the only_GOOGLE_HIDDEN_MODELShit, see Related Issue). No recent commit on either file touches these lines.scripts/run_tests.sh: all passedruff checkon the touched files: All checks passed!Documentation & Housekeeping
cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/A