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
Copy Markdown

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

@vercel
Copy link
Copy Markdown
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.

@CharlesWong CharlesWong force-pushed the fix/gemini-deprecation branch from f9b9bc8 to cb57d5e Compare April 2, 2026 20:42
@CharlesWong
Copy link
Copy Markdown
Author

Updated: Rebased and verified completeness

Changes in this update:

  • Rebased onto latest upstream/master
  • Verified all changes are intact: deprecated models removed from SDK types, smoke test blacklist updated, next-image templates updated to use gemini-2.5-flash-image (stable) instead of gemini-2.5-flash-image-preview (deprecated)
  • Updated commit message for clarity

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