[Enhancement]: Add image generation model selection for Gemini Image Gen tool #11293
rajsodhi-2
started this conversation in
Feature Requests & Suggestions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What features would you like to see added?
Is your feature request related to a problem?
Currently, the
gemini_image_gentool uses a single model determined by theGEMINI_IMAGE_MODELenvironment variable. Users cannot switch between different image generation models (e.g., Nano Banana Pro vs Nano Banana Flash vs Imagen) without restarting the container.This limits flexibility when users want to:
gemini-2.5-flash-image) for quick draftsgemini-3-pro-image-preview) for final outputsDescribe the solution you'd like
Add a model selection option for image generation tools, either:
Option 1: Per-agent configuration
In the agent builder UI, allow selecting which image model the
gemini_image_gentool should use (similar to how chat models are selected).Option 2: Tool kwargs support
Allow
tool_kwargsto override the image model, so different agents can use different models without code changes:Option 3: Multiple registered tools
Register variants like
gemini_image_gen_pro,gemini_image_gen_fast,imagen_ultraas separate selectable tools.Describe alternatives you've considered
GEMINI_IMAGE_MODELenv var and restarting (current workaround - disruptive)Additional context
Google now offers multiple image generation models with different quality/speed/cost tradeoffs:
gemini-3-pro-image-previewgemini-2.5-flash-imageimagen-4imagen-4-ultraBeing able to select between these at runtime would significantly improve the image generation workflow.
Thank you for considering this feature request!
More details
Technical Context
The current implementation is in
api/app/clients/tools/structured/GeminiImageGen.js, line 433:This hardcodes the model selection to an environment variable with no runtime override capability.
Suggested Implementation Approach
The cleanest solution might be to:
tool_kwargsfirstSomething like:
Then expose
modelas a configurable field in the agent builder UI when thegemini_image_gentool is selected.Reference
The OpenAI image tools (
OpenAIImageTools.js) face a similar limitation - this enhancement could potentially apply to both Google and OpenAI image generation tools for consistency.Which components are impacted by your request?
Plugins
Pictures
No response
Code of Conduct
Beta Was this translation helpful? Give feedback.
All reactions