chore(ai-gemini): sync model meta with Google's current model list#714
chore(ai-gemini): sync model meta with Google's current model list#714season179 wants to merge 1 commit into
Conversation
Remove retired Gemini ids (gemini-3-pro-preview, the 09-2025 2.5 previews, and the 2.0 line), add the stable gemini-3.1-flash-lite, and migrate every workspace consumer off the removed ids. Also fixes the structured-output demo dropdown, which still offered the retired gemini-3-pro-preview as its default. All removals were verified against the live API, not just the docs page. Includes a couple of small fixes found along the way: missing gemini-3.5-flash entries in the tool-capability and modality maps, and stale display labels left next to migrated model values. Closes TanStack#620, closes TanStack#621
|
Wondering what really moved? Review this PR in Change Stack to inspect semantic changes, definitions, and references. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (33)
💤 Files with no reviewable changes (6)
📝 WalkthroughWalkthroughThis PR syncs Gemini model metadata with Google's current published list by removing six retired model IDs, adding stable ChangesGemini Model Metadata Refresh and Consumer Migration
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
examples/ts-svelte-chat/src/routes/api/chat/+server.tsParsing error: Unable to parse the specified 'tsconfig' file. Ensure it's correct and has valid syntax. error TS5012: Cannot read file '/examples/ts-svelte-chat/.svelte-kit/tsconfig.json': ENOENT: no such file or directory, open '/examples/ts-svelte-chat/.svelte-kit/tsconfig.json'. examples/ts-vue-chat/vite.config.tsParsing error: "parserOptions.project" has been provided for packages/ai-code-mode-skills/test-cli/adapters.tsParsing error: "parserOptions.project" has been provided for
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Closes #620, closes #621.
Syncs
@tanstack/ai-geminimodel metadata with Google's current published model list, migrates every workspace consumer off the retired ids, and fixes the structured-output demo dropdown.All removals/additions were verified against the live API (
GET /v1beta/models+ realgenerateContentcalls on a paid Tier 1 key) on 2026-06-06, not just the docs page.Added
gemini-3.1-flash-lite(stable GA) to model-meta, all type maps, andGEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS— it round-trips the native combined tools+schema path. The existing preview const was renamedGEMINI_3_1_FLASH_LITE→GEMINI_3_1_FLASH_LITE_PREVIEWto follow the stable/_PREVIEWnaming convention used by the 2.5 line.Removed (verified retired)
gemini-3-pro-previewgemini-3.1-pro-previewgemini-2.5-flash-preview-09-2025/v1beta/modelsgemini-2.5-flashgemini-2.5-flash-lite-preview-09-2025/v1beta/modelsgemini-2.5-flash-litegemini-2.0-flashgemini-2.5-flashgemini-2.0-flash-litegemini-2.5-flash-litegemini-2.0-flash-preview-image-generation/v1beta/modelsgemini-2.5-flash-imageNote:
gemini-2.0-flash/-litestill respond at the API level (deprecation grace), but they're gone from the published docs per the #620 acceptance criteria, so they're removed here.Drive-by fixes (beyond the strict issue text, all small and disclosed here)
gemini-3.5-flashwas missing fromGeminiChatModelToolCapabilitiesByName, so its provider-tool typing was broken. One-line fix in a map this PR rewrites anyway.gemini-3.5-flashwas grouped under "no document" inGeminiModelInputModalitiesByNamedespitesupports.inputincludingdocument.gemini-2.5-flashentry (the old 2.0-flash row pointed at the same id) — duplicates removed, stale "Gemini - 2.0 Flash" labels updated. Same label sync in the panel's structured/summarize provider chips and its OpenRouter row.model-meta.ts: theGEMINI_2_FLASH_LIVEdraft (a retired 2.0-line id) and aGEMINI_MODEL_METAdraft that referenced consts deleted by this PR. Happy to restore if you prefer the tighter diff.Consumer migration (#620 cascade)
testing/e2e(providers, summarize route, media-providers),testing/panel(model-selection, chat/structured/summarize/image routes, vendor-config),ai-code-mode-skillstest CLI, and the react/svelte/vue chat examples.google/gemini-2.0-flash-001→google/gemini-2.5-flash(validated against the OpenRouter catalog).adapters/gemini.md,adapters/openrouter.md(google/gemini-3-pro-previewisn't in OpenRouter's catalog either),advanced/multimodal-content.md,media/image-generation.md, and the ai-core skill reference. Factual fixes only — noaddedAt/updatedAtbumps.ai-openrouter/model-meta.tsandscripts/openrouter.models.json(nightly-synced from OpenRouter),community-adapters/cencori.md(third-party service's own table).Tests
The retired 2.0 line was the last chat model without thinking support, so the "models WITHOUT thinking" type-test category is gone. Those negative tests were replaced with retired-id rejection tests —
geminiText('gemini-2.0-flash')/geminiText('gemini-3-pro-preview')are now compile errors, guarded by@ts-expect-error. The mixed accept/reject tool-gating coverage moved fromgemini-2.0-flash-lite(rejected everything) togemini-2.5-flash-lite(partial tool set, still exercises both directions). Full positive coverage added for the new stablegemini-3.1-flash-lite.Demo (#621)
gemini-3-pro-preview(404s), addedgemini-3.1-flash-lite.gemini-3-pro-preview→gemini-3.5-flash— picked because it's the newest stable (non-preview) 3.x id and matches the dropdown's first entry;gemini-3.1-pro-previewis still a preview id. Happy to switch if you'd rather default to the pro line.Open questions for maintainers
imagen-3.0-generate-002is also gone from the live API (verified), but chore(ai-gemini): remove retired model ids + cascade workspace consumer migration #620 scoped imagen variants as out-of-scope-but-check. It's kept in this PR. Want me to remove it here too, or file a follow-up issue?gemini-3.5-flash(stable) vsgemini-3.1-pro-preview(newer flagship, but preview). Currently stable wins; say the word and I'll flip it.Verification
pnpm test:pr— green (sherif/knip/docs/eslint/lib/types/build, 32 projects)/api/structured-outputon a paid key — all five stream and deliverstructured-output.complete:gemini-3.5-flashgemini-3-flash-previewgemini-3.1-pro-previewgemini-3.1-flash-litegemini-3.1-flash-lite-previewSummary by CodeRabbit
Documentation
Chores