Title
Gemini 3 Flash (Vertex AI): reasoning_effort="minimal" should map to thinkingLevel="minimal"; current releases map to "low"
Summary
When calling Gemini 3 Flash via Vertex AI through the LiteLLM Proxy, setting reasoning_effort="minimal" should result in thinkingConfig.thinkingLevel="minimal" (per Google’s Thinking Levels guidance for Flash). On the following LiteLLM versions, it still maps to "low":
- v1.80.0-nightly
- v1.80.10-nightly
- v1.80.10.rc.5
This prevents users from requesting the intended lowest thinking level for Gemini 3 Flash via the OpenAI-compatible chat/completions API.
Environment
- Interface: LiteLLM Proxy (OpenAI-compatible /v1/chat/completions)
- Provider: Vertex AI
- Model: vertex_ai/gemini-3-flash-preview (and gemini-3-flash)
- Configuration: reasoning_effort set in litellm_params (deployment-level), e.g.
model_list:
- model_name: vertex_ai/gemini-3-flash-preview-fast
litellm_params:
model: vertex_ai/gemini-3-flash-preview
vertex_project: <project>
vertex_location: <location>
vertex_credentials: <sa.json>
reasoning_effort: minimal
Reproduction Steps
- Start Proxy with the above deployment.
- POST /v1/chat/completions with model="vertex_ai/gemini-3-flash-preview-fast" and a simple message payload (no need to pass reasoning_effort again in the request body).
- Inspect the downstream request body sent to Vertex AI.
Expected
- generationConfig.thinkingConfig.thinkingLevel == "minimal" (with includeThoughts=true), for Gemini 3 Flash models (gemini-3-flash / gemini-3-flash-preview).
Actual
- On the listed versions, reasoning_effort="minimal" maps to thinkingLevel="low", and default injection also sets thinkingLevel="low" for Gemini 3 when not provided.
Why this matters
- Google documents distinct thinking levels for Gemini 3 Flash (minimal, medium, low, high). Minimal is valid and intended to minimize latency/cost for Flash.
- Mapping minimal→low prevents users from selecting the correct thinking level.
Code Pointers
- Mapping path: litellm/llms/vertex_ai/gemini/vertex_and_google_ai_studio_gemini.py
- map_openai_params(...) → sets optional_params["thinkingConfig"] for Gemini 3 via _map_reasoning_effort_to_thinking_level(...)
- _map_reasoning_effort_to_thinking_level(...) currently returns "low" for "minimal" without a Flash-specific override in the affected releases.
- There is also a default injection that sets thinkingLevel="low" for Gemini 3 when neither thinkingLevel nor thinkingBudget are present.
Suggested Fix
-
In _map_reasoning_effort_to_thinking_level(reasoning_effort, model):
- Detect Flash family: ("gemini-3-flash" in model.lower()) or ("gemini-3-flash-preview" in model.lower()).
- For Flash:
- minimal → {thinkingLevel: "minimal", includeThoughts: true}
- medium → {thinkingLevel: "medium", includeThoughts: true}
- disable/none → {thinkingLevel: "minimal", includeThoughts: false}
- For Pro (e.g., gemini-3-pro-preview): keep the current behavior (minimal/medium map to low; low/high unchanged).
-
Ensure map_openai_params(...) continues to use thinkingLevel for Gemini 3 (not thinkingBudget) and does not override an explicit thinkingConfig provided by the user.
-
Consider updating docs to clarify the Flash vs Pro mapping on Gemini 3 (+ default thinkingLevel injection differences).
Request
- If this fix already exists on main, please publish a new nightly/patch release including it so Proxy users on Vertex AI can rely on reasoning_effort="minimal" → thinkingLevel="minimal" for Gemini 3 Flash.
Additional Notes
- We validated that deployment-level litellm_params.reasoning_effort is merged by the Router and reaches the Gemini handler; the discrepancy is only in the thinkingLevel mapping for Gemini 3 Flash.
Title
Gemini 3 Flash (Vertex AI): reasoning_effort="minimal" should map to thinkingLevel="minimal"; current releases map to "low"
Summary
When calling Gemini 3 Flash via Vertex AI through the LiteLLM Proxy, setting reasoning_effort="minimal" should result in thinkingConfig.thinkingLevel="minimal" (per Google’s Thinking Levels guidance for Flash). On the following LiteLLM versions, it still maps to "low":
This prevents users from requesting the intended lowest thinking level for Gemini 3 Flash via the OpenAI-compatible chat/completions API.
Environment
Reproduction Steps
Expected
Actual
Why this matters
Code Pointers
Suggested Fix
In _map_reasoning_effort_to_thinking_level(reasoning_effort, model):
Ensure map_openai_params(...) continues to use thinkingLevel for Gemini 3 (not thinkingBudget) and does not override an explicit thinkingConfig provided by the user.
Consider updating docs to clarify the Flash vs Pro mapping on Gemini 3 (+ default thinkingLevel injection differences).
Request
Additional Notes