Skip to content

fix: remove deprecated Gemini image-generation preview models (#634)#800

Open
AvantBras wants to merge 1 commit into
Merit-Systems:masterfrom
AvantBras:fix/gemini-deprecation
Open

fix: remove deprecated Gemini image-generation preview models (#634)#800
AvantBras wants to merge 1 commit into
Merit-Systems:masterfrom
AvantBras:fix/gemini-deprecation

Conversation

@AvantBras
Copy link
Copy Markdown

Summary

Closes #634

Removes the two deprecated Gemini image-generation preview models that Google is retiring:

  • gemini-2.0-flash-preview-image-generation
  • gemini-2.5-flash-image-preview

Changes

SDK (packages/sdk/ts/src/supported-models/chat/gemini.ts)

  • Removed both deprecated model IDs from the GeminiModel type union
  • Removed both deprecated model entries from the GeminiModels array

Templates (templates/next-image/)

  • Updated edit-image/google.ts to use gemini-2.5-flash-image (stable replacement)
  • Updated generate-image/google.ts to use gemini-2.5-flash-image (stable replacement)

Tests (packages/tests/provider-smoke/)

  • Removed gemini-2.0-flash-preview-image-generation from the smoke test blacklist (no longer exists in GeminiModels)

Verification

  • Zero remaining references to either deprecated model across the entire codebase
  • The stable gemini-2.5-flash-image model was already present in the SDK — templates now reference it directly

/claim #634

…Systems#634)

Remove gemini-2.0-flash-preview-image-generation and
gemini-2.5-flash-image-preview which are being retired by Google.

Changes:
- Remove deprecated model IDs from GeminiModel type union
- Remove deprecated model entries from GeminiModels array
- Update next-image template to use gemini-2.5-flash-image (stable)
- Remove deprecated model from smoke test blacklist

/claim Merit-Systems#634
Copilot AI review requested due to automatic review settings May 12, 2026 17:08
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 12, 2026

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

A member of the Team first needs to authorize it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes two deprecated Gemini image-generation preview model IDs from the TypeScript SDK’s supported-model registry and updates the Next.js image template to use the stable replacement model (gemini-2.5-flash-image), aligning the repo with Google’s retirement of those preview models (closes #634).

Changes:

  • Removed gemini-2.0-flash-preview-image-generation and gemini-2.5-flash-image-preview from the GeminiModel union and GeminiModels list.
  • Updated the Next.js image template’s Google generate/edit handlers to use gemini-2.5-flash-image.
  • Removed the deprecated model from the provider-smoke test blacklist (since it’s no longer present in GeminiModels).

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
templates/next-image/src/app/api/generate-image/google.ts Switches Google image generation template to the stable Gemini image model ID.
templates/next-image/src/app/api/edit-image/google.ts Switches Google image editing template to the stable Gemini image model ID.
packages/tests/provider-smoke/gemini-generate-text.test.ts Removes deprecated model from blacklist to match the updated SDK model registry.
packages/sdk/ts/src/supported-models/chat/gemini.ts Removes deprecated preview model IDs from the SDK type union and supported models array.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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

2 participants