Skip to content

fix(gemini): remove deprecated Gemini image-generation preview models#735

Open
CharlesWong wants to merge 1 commit intoMerit-Systems:masterfrom
CharlesWong:fix/gemini-deprecation
Open

fix(gemini): remove deprecated Gemini image-generation preview models#735
CharlesWong wants to merge 1 commit intoMerit-Systems:masterfrom
CharlesWong:fix/gemini-deprecation

Conversation

@CharlesWong
Copy link

Removes the two Gemini model IDs that Google is retiring per the deprecation notice.

Models removed

Deprecated Replacement
gemini-2.0-flash-preview-image-generation (retired — no stable replacement)
gemini-2.5-flash-image-preview gemini-2.5-flash-image

Changes

  • packages/sdk/ts/src/supported-models/chat/gemini.ts: Removed both deprecated IDs from the GeminiModel union type and from the GeminiModels router array (both the type declaration and the cost-routing entries)
  • packages/tests/provider-smoke/gemini-generate-text.test.ts: Removed gemini-2.0-flash-preview-image-generation from the blacklist — the model no longer exists in the registry, so the skip entry is unnecessary
  • templates/next-image/src/app/api/generate-image/google.ts: Updated hardcoded model string to stable gemini-2.5-flash-image
  • templates/next-image/src/app/api/edit-image/google.ts: Same update

Closes #634

…e releases (Merit-Systems#634)

Remove gemini-2.0-flash-preview-image-generation and gemini-2.5-flash-image-preview
which are being retired per Google's deprecation notice.

Changes:
- Remove deprecated model IDs from GeminiModel union type
- Remove deprecated entries from GeminiModels router array
- Remove gemini-2.0-flash-preview-image-generation from test blacklist (model no longer exists)
- Update templates/next-image to use stable gemini-2.5-flash-image instead of preview variant
@vercel
Copy link
Contributor

vercel bot commented Mar 11, 2026

@CharlesWong is attempting to deploy a commit to the Merit Systems Team on Vercel.

A member of the Team first needs to authorize it.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle Gemini Deprecation

1 participant