set_model
Configure the Gemini AI model for image generation sessions, choosing between 'flash' for speed or 'pro' for enhanced quality outputs.
Instructions
Set the Gemini model for this session. 'flash' for faster generation (default), 'pro' for higher quality.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | Yes | Model to use: 'flash' (gemini-3.1-flash-image-preview) or 'pro' (gemini-3-pro-image-preview) | |
| conversation_id | No | Session ID to apply this setting to (default: 'default') |
Implementation Reference
- src/index.ts:1035-1062 (handler)Handler implementation for the 'set_model' tool. It updates the `selectedModel` property in the session context.
case "set_model": { const { model, conversation_id = "default" } = args as any; const modelMap: Record<string, ModelOption> = { "flash": "gemini-3.1-flash-image-preview", "pro": "gemini-3-pro-image-preview", }; if (!modelMap[model]) { return { content: [{ type: "text", text: `Invalid model: ${model}. Use 'flash' or 'pro'.`, }], isError: true, }; } const context = getOrCreateContext(conversation_id); context.selectedModel = modelMap[model]; return { content: [{ type: "text", text: `✓ Model set to ${model} (${modelMap[model]}) for session: ${conversation_id}`, }], }; } - src/index.ts:441-458 (registration)Tool registration definition for 'set_model' including input schema.
name: "set_model", description: "Set the Gemini model for this session. 'flash' for faster generation (default), 'pro' for higher quality.", inputSchema: { type: "object", properties: { model: { type: "string", enum: ["flash", "pro"], description: "Model to use: 'flash' (gemini-3.1-flash-image-preview) or 'pro' (gemini-3-pro-image-preview)", }, conversation_id: { type: "string", description: "Session ID to apply this setting to (default: 'default')", }, }, required: ["model"], }, },