-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Support free imagegen #7493
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
Support free imagegen #7493
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ 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. Consider defining a shared constant or type for the available image generation models that can be used by both backend and frontend. This would ensure type safety and prevent potential typos or mismatches between the two lists. |
||
{ value: "google/gemini-2.5-flash-image-preview:free", label: "Gemini 2.5 Flash Image Preview (Free)" }, | ||
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. New free model option added with a hardcoded label. Consider using translation keys (via t()) for model labels to ensure internationalization consistency. This comment was generated because it violated a code review rule: irule_C0ez7Rji6ANcGkkX. 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. Would it be useful to add a comment or tooltip about what "Free" means in this context? Are there any limitations users should be aware of (rate limits, quality differences, etc.)? This could help set proper expectations. |
||
// Add more models as they become 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.
Would it be helpful to add tests for the generateImageTool function? Currently there's no test coverage for the image generation functionality, and it would be valuable to verify that both the paid and free models are handled correctly.
Also, for consistency with the frontend definition, should we consider formatting this array across multiple lines for better readability?