Currently, the model used for image generation is fixed at server startup via the NANOBANANA_MODEL environment variable (falling back to gemini-2.5-flash-image). There is no way to switch models on a per-request basis without restarting the server.
Proposed change
Add an optional model parameter to all MCP tools (generate_image, edit_image, restore_image, generate_icon, generate_pattern, generate_story, generate_diagram). When provided, it overrides the server-level default for that single call.
Why it's useful
- The default flash model is fast and sufficient for most use cases
- For specific requests that need higher quality (e.g.
gemini-3-pro-image-preview), the user can opt in per-call without changing server config
- No breaking change — when
model is omitted, behaviour is identical to today
Implementation sketch
- Add
model?: string to ImageGenerationRequest in types.ts
- In
imageGenerator.ts, use request.model || this.modelName in each generateContent call
- Expose the parameter in each tool's
inputSchema in index.ts
Currently, the model used for image generation is fixed at server startup via the
NANOBANANA_MODELenvironment variable (falling back togemini-2.5-flash-image). There is no way to switch models on a per-request basis without restarting the server.Proposed change
Add an optional
modelparameter to all MCP tools (generate_image,edit_image,restore_image,generate_icon,generate_pattern,generate_story,generate_diagram). When provided, it overrides the server-level default for that single call.Why it's useful
gemini-3-pro-image-preview), the user can opt in per-call without changing server configmodelis omitted, behaviour is identical to todayImplementation sketch
model?: stringtoImageGenerationRequestintypes.tsimageGenerator.ts, userequest.model || this.modelNamein eachgenerateContentcallinputSchemainindex.ts