fix: remove deprecated Gemini image-generation preview models (#634)#800
Open
AvantBras wants to merge 1 commit into
Open
fix: remove deprecated Gemini image-generation preview models (#634)#800AvantBras wants to merge 1 commit into
AvantBras wants to merge 1 commit into
Conversation
…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
Contributor
|
@AvantBras is attempting to deploy a commit to the Merit Systems Team on Vercel. A member of the Team first needs to authorize it. |
There was a problem hiding this comment.
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-generationandgemini-2.5-flash-image-previewfrom theGeminiModelunion andGeminiModelslist. - 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #634
Removes the two deprecated Gemini image-generation preview models that Google is retiring:
gemini-2.0-flash-preview-image-generationgemini-2.5-flash-image-previewChanges
SDK (
packages/sdk/ts/src/supported-models/chat/gemini.ts)GeminiModeltype unionGeminiModelsarrayTemplates (
templates/next-image/)edit-image/google.tsto usegemini-2.5-flash-image(stable replacement)generate-image/google.tsto usegemini-2.5-flash-image(stable replacement)Tests (
packages/tests/provider-smoke/)gemini-2.0-flash-preview-image-generationfrom the smoke test blacklist (no longer exists in GeminiModels)Verification
gemini-2.5-flash-imagemodel was already present in the SDK — templates now reference it directly/claim #634