Skip to content

fix(models): drop shut-down Gemini preview slugs from the AI Studio catalogs - #109896

Open
MaxFreedomPollard wants to merge 1 commit into
NousResearch:mainfrom
MaxFreedomPollard:fix/gemini-drop-shut-down-preview-slugs
Open

MaxFreedomPollard wants to merge 1 commit into
NousResearch:mainfrom
MaxFreedomPollard:fix/gemini-drop-shut-down-preview-slugs

Conversation

@MaxFreedomPollard

Copy link
Copy Markdown

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-preview and gemini-3.1-flash-lite-preview.

Both sit in the "Previous models" table on https://ai.google.dev/gemini-api/docs/models, introduced by:

These models are deprecated and will be shut down soon; migrate to newer models to prevent service interruptions.

and each is titled (Shut down) in that table:

Gemini 3.1 Flash-Lite Preview (Shut down) — Our most cost-efficient multimodal model, offering the fastest performance for high-frequency, lightweight tasks. gemini-3.1-flash-lite-preview

Gemini 3 Pro Preview (Shut down) — Our state-of-the-art reasoning model, with advanced multimodal understanding. gemini-3-pro-preview

Their only table-mates are gemini-2.0-flash and gemini-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:

  1. off the curated picker list, and
  2. into _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-preview is 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, gmi and the google/…-prefixed entries in opencode-go are unchanged, as is model_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 curated gemini list. This PR adds two entries to the existing frozenset and leaves the filter mechanism alone.

Type of Change

  • 🐛 Bug fix (non-breaking change that fixes an issue)
  • ✨ New feature (non-breaking change that adds functionality)
  • 🔒 Security fix
  • 📝 Documentation update
  • ✅ Tests (adding or improving test coverage)
  • ♻️ Refactor (no behavior change)
  • 🎯 New skill (bundled or hub)

Changes Made

  • hermes_cli/models_catalog_static.py: _PROVIDER_MODELS["gemini"] drops gemini-3-pro-preview and gemini-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 provider gemini and google; neither is on the curated list; gemini-3.1-pro-preview stays listed, stays out of the frozenset, and stays visible.

How to Test

  1. 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:

    E  AssertionError: gemini-3-pro-preview
    E  assert False is True
    E   +  where False = _should_hide_from_provider_catalog('gemini', 'gemini-3-pro-preview')
    
    E  AssertionError: gemini-3-pro-preview
    E  assert 'gemini-3-pro-preview' not in ['gemini-3.8-flash', 'gemini-3.7-flash', 'gemini-3.1-pro-preview', 'gemini-3-pro-preview', 'gemini-3.6-flash', 'gemini-3.1-flash-lite-preview']
    
  2. On this branch: 3 passed.

  3. Wider sweep — all 12 test files referencing either slug, _GOOGLE_HIDDEN_MODELS, or the curated gemini list (includes test_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.

  4. Manually: hermes /model on a Google AI Studio key no longer offers either slug, with or without a live models.dev catalog; gemini-3.1-pro-preview still appears.

Checklist

Code

  • I've read the Contributing Guide
  • My commit messages follow Conventional Commits (fix(scope):, feat(scope):, etc.)
  • I searched for existing PRs to make sure this isn't a duplicate — searched open and closed PRs for gemini-3-pro-preview, gemini-3.1-flash-lite-preview and _GOOGLE_HIDDEN_MODELS; none retires these slugs (Config-driven override for the Gemma picker-visibility filter #62746 is the only _GOOGLE_HIDDEN_MODELS hit, see Related Issue). No recent commit on either file touches these lines.
  • My PR contains only changes related to this fix/feature (no unrelated commits)
  • I've run the touched test file through scripts/run_tests.sh: all passed
  • I've added tests for my changes
  • I've tested on my platform: macOS 26, Python 3.12
  • ruff check on the touched files: All checks passed!

Documentation & Housekeeping

  • I've updated relevant documentation — N/A (curated picker data + the existing hidden-slug set)
  • I've updated cli-config.yaml.example if I added/changed config keys — N/A
  • I've updated CONTRIBUTING.md or AGENTS.md if I changed architecture or workflows — N/A
  • I've considered cross-platform impact — N/A (no file I/O or process changes)
  • I've updated tool descriptions/schemas if I changed tool behavior — N/A

…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>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/cli CLI entry point, hermes_cli/, setup wizard comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint provider/gemini Google Gemini (AI Studio, Cloud Code) labels Sep 13, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/agent Core agent runtime: loop, agent_init, prompt builder, context-compression, responses endpoint comp/cli CLI entry point, hermes_cli/, setup wizard P3 Low — cosmetic, nice to have provider/gemini Google Gemini (AI Studio, Cloud Code) type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants