Skip to content

chore(ai-gemini): remove retired model ids + cascade workspace consumer migration #620

@tombeckenham

Description

@tombeckenham

`packages/typescript/ai-gemini/src/model-meta.ts` carries model entries that no longer appear in Google's published list (https://ai.google.dev/gemini-api/docs/models). The most-recently-added gap (`gemini-3.5-flash`) was already addressed by #610. This issue covers the opposite side of the freshness audit: removing retired ids and migrating workspace consumers off them.

Authoritative sources

In this repo but not in Google's current docs (candidates for removal)

Repo constant Repo id Reason
`GEMINI_3_PRO` `gemini-3-pro-preview` Not in Google's docs anymore — appears retired in favor of `gemini-3.1-pro-preview` and `gemini-3.5-flash`
`GEMINI_2_5_FLASH_PREVIEW` `gemini-2.5-flash-preview-09-2025` Superseded by stable `gemini-2.5-flash`
`GEMINI_2_5_FLASH_LITE_PREVIEW` `gemini-2.5-flash-lite-preview-09-2025` Superseded by stable `gemini-2.5-flash-lite`
`GEMINI_2_FLASH` `gemini-2.0-flash` Entire 2.0 line retired from Google's published list
`GEMINI_2_FLASH_LITE` `gemini-2.0-flash-lite` Same
`GEMINI_2_FLASH_IMAGE` `gemini-2.0-flash-preview-image-generation` Same 2.0 retirement

Also worth adding: the stable `gemini-3.1-flash-lite` (current repo only has the `-preview` variant).

Cascading workspace consumers to migrate

Removing the retired ids breaks consumers that hardcode them. Each needs to be moved to a current id (e.g. `gemini-2.5-flash` as the default):

  • `testing/e2e/src/lib/providers.ts` — `defaultModels.gemini = 'gemini-2.0-flash'`
  • `testing/panel/src/lib/model-selection.ts` — `'gemini-2.0-flash'`, `'google/gemini-2.0-flash-001'`
  • `testing/panel/src/routes/api.{chat,structured,summarize,image}.ts` — defaults to `gemini-2.0-flash`
  • `testing/panel/tests/vendor-config.ts` — same
  • `packages/typescript/ai-gemini/tests/chat-per-model-type-safety.test.ts` — extensively uses `gemini-2.0-flash` / `gemini-2.0-flash-lite` / `gemini-3-pro-preview`
  • `packages/typescript/ai-gemini/tests/model-meta.test.ts` — same
  • `packages/typescript/ai-gemini/tests/gemini-adapter.test.ts` — same
  • `packages/typescript/ai-gemini/tests/tools-per-model-type-safety.test.ts` — `gemini-2.0-flash-lite`
  • `examples/ts-react-chat/src/routes/generations.structured-output.tsx` — Gemini dropdown (added in Route structured-output through native combined-mode where supported (skip finalization round-trip) #605)
  • Type maps: `GeminiChatModelProviderOptionsByName`, `GeminiChatModelToolCapabilitiesByName`, `GeminiModelInputModalitiesByName`, `GEMINI_MODELS`
  • `GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS` (added in Route structured-output through native combined-mode where supported (skip finalization round-trip) #605) — remove `gemini-3-pro-preview` reference

Out-of-scope-but-worth-checking-in-the-same-pass

Equivalent drift likely affects sibling categories:

  • Image variants (`gemini-2.0-flash-preview-image-generation` retired; `imagen-4.0-*` variants vs Google's headline `imagen`)
  • Live audio (`gemini-2.5-flash-native-audio-preview-12-2025` is newer than the commented-out 09-2025 variant)
  • Veo video models (`VEO_3` / `VEO_3_FAST` / `VEO_2` not in current docs)
  • Embedding (`gemini-embedding-2` is new; repo has no embedding adapter)

Scope this PR's call.

Acceptance

  1. `ai-gemini/model-meta.ts` text/chat entries reflect Google's current published list — retired entries gone.
  2. Stable `gemini-3.1-flash-lite` added alongside the existing preview variant.
  3. All workspace consumers of removed ids migrated to current ids.
  4. All affected tests still pass.
  5. `GEMINI_COMBINED_TOOLS_AND_SCHEMA_MODELS` updated to drop retired ids.

Context

Surfaced while adding Gemini to the structured-output streaming demo in #605. Filed separately because (a) the routing work in #605 doesn't depend on which ids exist, just the set-membership check; (b) the cascading consumer migration is its own focused review; (c) `gemini-3.5-flash` (the most-needed addition) is already covered by #610.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions