fix: gemini minimal reasoning effort#1486
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates Gemini's reasoning effort mapping to support the newly introduced "minimal" and "medium" modes for Gemini 3 Flash models. Previously, the code mapped OpenAI-style reasoning efforts to Vertex AI's thinking levels (consolidating minimal/low to "low" and medium/high to "high"), but now passes the reasoning_effort value directly without transformation.
Key changes:
- Removed the mapping function that converted reasoning effort values to thinking levels
- Updated both Google and Google Vertex AI providers to use reasoning_effort values directly
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/providers/google/chatComplete.ts | Removed mapping function import and usage; now passes reasoning_effort directly to thinkingConfig |
| src/providers/google-vertex-ai/transformGenerationConfig.ts | Removed the openaiReasoningEffortToVertexThinkingLevel mapping function and updated to use reasoning_effort directly |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@narengogi @VisargD hi. We were using gemini 3 flash with reasoning effort set to "low" and we saw our latency drop like crazy from 11s to 3s. Can you help me understand what is going on? Was I truly using "low" before? Am I truly using "low" now? |
|
@davidwhite-spec haha, yes there was no minimal and medium setting previously in the gemini spec, it was added for the gemini 3 flash models, so previously to avoid errors minimal and low were mapped to low, now they are not |

Description: (required)
payload to test
{ "model": "gemini-3-flash-preview", "stream": false, "stop": ["NO_RESPONSE_REQUIRED"], "reasoning_effort": "minimal", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Give me the flight ticket details from BLR to LDX" } ] } ] }Type of Change: