-
Notifications
You must be signed in to change notification settings - Fork 2.8k
chore: Remove unsupported Gemini 2.5 Flash Image Preview free model #8359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Remove unsupported Gemini 2.5 Flash Image Preview free model #8359
Conversation
- Remove 'google/gemini-2.5-flash-image-preview:free' from IMAGE_GENERATION_MODELS array in generateImageTool.ts - Remove free model option from UI ImageGenerationSettings component - Update test files to use paid version instead of free version - All tests passing after changes The free endpoint is no longer supported, only the paid version remains available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention around persisted configuration and UI normalization when removing the free model.
|
|
||
| // Hardcoded list of image generation models for now | ||
| const IMAGE_GENERATION_MODELS = ["google/gemini-2.5-flash-image-preview", "google/gemini-2.5-flash-image-preview:free"] | ||
| const IMAGE_GENERATION_MODELS = ["google/gemini-2.5-flash-image-preview"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P1: Removing the free model is correct, but persisted settings may still hold "google/gemini-2.5-flash-image-preview:free". The tool uses state?.openRouterImageGenerationSelectedModel without validating against the allowlist. Please coerce unknown values to the default (first entry) to avoid runtime failures for existing users with the old selection stored.
|
|
||
| // Hardcoded list of image generation models | ||
| const IMAGE_GENERATION_MODELS = [ | ||
| { value: "google/gemini-2.5-flash-image-preview", label: "Gemini 2.5 Flash Image Preview" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: With the free option removed, if openRouterImageGenerationSelectedModel contains the removed value, VSCodeDropdown receives a value that doesn't match any option. Consider normalizing on mount/effect: if the provided value isn’t in IMAGE_GENERATION_MODELS, set it to the default and persist via setImageGenerationSelectedModel.
| {...defaultProps} | ||
| openRouterImageApiKey="existing-key" | ||
| openRouterImageGenerationSelectedModel="google/gemini-2.5-flash-image-preview:free" | ||
| openRouterImageGenerationSelectedModel="google/gemini-2.5-flash-image-preview" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: Please add a test where openRouterImageGenerationSelectedModel is an unknown (e.g., the removed ":free" value) and verify the component falls back to the default model rather than leaving the dropdown in an invalid state.
|
What happens for people who currently have the free model selected? |
|
@mrubens The tool fails if the model tries to use it while the free variant is selected. It will keep failing. Should we migrate? I would think if someone is using it for free, migrating unexpectedly might make some people upset. |
The model seems to have been be deprecated for a while now . If their setting is still on it will be deselected automatically and they'll need to select the one available again |
The model was deprecated some time ago I think . It went unnoticed until someone on discord flagged this |
|
Failing sounds good to me, just wanted to make sure it didn't start charging without them knowing. |
Related GitHub Issue
Closes: N/A
Roo Code Task Context (Optional)
No Roo Code task context for this PR
Description
This PR removes the unsupported free version of the Gemini 2.5 Flash Image Preview model from both backend and UI components. The free endpoint is no longer available from the provider, so removing it prevents users from encountering errors when trying to use the non-functional free option.
Key implementation details:
Areas for reviewer attention:
Test Procedure
Automated Testing:
cd src && npx vitest run core/tools/__tests__/generateImageTool.test.tscd webview-ui && npx vitest run src/components/settings/__tests__/ImageGenerationSettings.spec.tsxManual Testing:
Verification Commands:
pnpm lint- All linting passespnpm check-types- All type checking passesgrep -r "google/gemini-2.5-flash-image-preview:free" src/ webview-ui/should return no resultsPre-Submission Checklist
Screenshots / Videos
No visible UI changes - this is a backend model configuration change that removes a non-functional option from the dropdown
Documentation Updates
Additional Notes
This is a maintenance PR to remove a non-functional model endpoint. The free version of the Gemini 2.5 Flash Image Preview model is no longer supported by the provider, so removing it improves user experience by preventing errors when users try to select the non-working option.
The paid version remains fully functional and available. Users who were already using the paid version will see no changes in functionality.
Get in Touch
Contact through GitHub for any questions about this PR
Important
Remove unsupported Gemini 2.5 Flash Image Preview free model from backend and UI components.
google/gemini-2.5-flash-image-preview:freemodel fromIMAGE_GENERATION_MODELSingenerateImageTool.tsandImageGenerationSettings.tsx.ImageGenerationSettings.spec.tsxto use the paid model.This description was created by
for bc50db0. You can customize this summary. It will automatically update as commits are pushed.