- 
                Notifications
    You must be signed in to change notification settings 
- Fork 2.4k
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -14,7 +14,6 @@ interface ImageGenerationSettingsProps { | |
| // 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 commentThe 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. | ||
| { value: "google/gemini-2.5-flash-image-preview:free", label: "Gemini 2.5 Flash Image Preview (Free)" }, | ||
| // Add more models as they become available | ||
| ] | ||
|  | ||
|  | ||
| Original file line number | Diff line number | Diff line change | 
|---|---|---|
|  | @@ -41,7 +41,7 @@ describe("ImageGenerationSettings", () => { | |
| <ImageGenerationSettings | ||
| {...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 commentThe 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. | ||
| />, | ||
| ) | ||
|  | ||
|  | ||
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.