Skip to content

feat: add per-call model override to MCP tools - #73

Open
nexivionlabs wants to merge 1 commit into
gemini-cli-extensions:mainfrom
nexivionlabs:feat/per-call-model-override
Open

feat: add per-call model override to MCP tools#73
nexivionlabs wants to merge 1 commit into
gemini-cli-extensions:mainfrom
nexivionlabs:feat/per-call-model-override

Conversation

@nexivionlabs

Copy link
Copy Markdown

Summary

Closes #44. Adds an optional model parameter to all 7 MCP tools so a single call can override the server-default model (NANOBANANA_MODEL / DEFAULT_MODEL) without restarting the server. Omitting it preserves the current behavior (purely additive, backward-compatible).

Changes

  • types.ts: optional model?: string on ImageGenerationRequest.
  • imageGenerator.ts: a small resolveModel(request) helper (request.model || this.modelName) used at all three generateContent call sites (generateTextToImage, generateStorySequence, editImage); a DEBUG log is emitted only when an override is actually applied.
  • index.ts: a model property added to all 7 tool input schemas (optional, not required) and threaded into each ImageGenerationRequest in the call handler.

Testing

  • npm run build / tsc --noEmit: pass.
  • npm run lint:ci (eslint, --max-warnings 0): pass.
  • Backward compatible: omitting model reproduces the existing behavior exactly; the override falls back to the server default when unset.

)

Add an optional `model` parameter to all 7 MCP tools so a single call can
override the server-default model (NANOBANANA_MODEL / DEFAULT_MODEL) without
restarting the server. Omitting it preserves existing behavior.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add per-call model override parameter to MCP tools

1 participant