thinking_level Guide
Gemini 3.5 Flash replaced the numeric thinking_budget with four named levels. Understanding the difference is critical because the default changed with the model upgrade.
⚠️
The default changed — this is the silent trap
gemini-3-flash-preview defaulted to high (~8K thinking tokens). gemini-3.5-flash defaults to medium (~4K thinking tokens). If you don't set thinking_level explicitly, you get 50% fewer thinking tokens with no error or warning.
Level comparison
| Level | Thinking Tokens | Typical Latency | Relative Cost | Best For |
|---|---|---|---|---|
minimal | ~1K | ~1–2s | 1× | Fact retrievalShort Q&AClassification |
low | ~2K | ~2–4s | 2× | Conversational chatSimple summarizationIntent detection |
mediumnew default | ~4K | ~4–8s | 4× | Code generationDocument summarizationRAG synthesis |
highold default | ~8K | ~8–15s | 8× | Code agentsMulti-step reasoningComplex code review |
Config snippets per level
minimal~1K thinking tokens · ~1–2s · cost 1×
Best for high-volume, low-complexity tasks where latency and cost dominate.
✓ Good for
- · Fact retrieval
- · Short Q&A
- · Classification
- · Entity extraction
✗ Not ideal for
- · Multi-step reasoning
- · Code review
- · Long-form writing
Python
generation_config=GenerationConfig(
thinking_config=ThinkingConfig(
thinking_level="minimal", # ~1K thinking tokens
)
)TypeScript
generationConfig: {
thinkingConfig: {
thinkingLevel: "minimal", // ~1K thinking tokens
},
}low~2K thinking tokens · ~2–4s · cost 2×
Good default for chat assistants that don't need deep reasoning.
✓ Good for
- · Conversational chat
- · Simple summarization
- · Intent detection
- · Slot filling
✗ Not ideal for
- · Code agents
- · Complex analysis
- · Multi-step planning
Python
generation_config=GenerationConfig(
thinking_config=ThinkingConfig(
thinking_level="low", # ~2K thinking tokens
)
)TypeScript
generationConfig: {
thinkingConfig: {
thinkingLevel: "low", // ~2K thinking tokens
},
}medium~4K thinking tokens · ~4–8s · cost 4×⚠ new default — verify this is right for your use case
NEW DEFAULT for gemini-3.5-flash. Was "high" in gemini-3-flash-preview.
✓ Good for
- · Code generation
- · Document summarization
- · RAG synthesis
- · Moderate analysis
✗ Not ideal for
- · Complex multi-step agents
- · Deep code review
- · Research synthesis
Python
generation_config=GenerationConfig(
thinking_config=ThinkingConfig(
thinking_level="medium", # ~4K thinking tokens (NEW DEFAULT)
)
)TypeScript
generationConfig: {
thinkingConfig: {
thinkingLevel: "medium", // ~4K thinking tokens (NEW DEFAULT)
},
}high~8K thinking tokens · ~8–15s · cost 8×← was default in gemini-3-flash-preview
OLD DEFAULT for gemini-3-flash-preview. Use for tasks that were working well before migration.
✓ Good for
- · Code agents
- · Multi-step reasoning
- · Complex code review
- · Research synthesis
- · Agentic loops
✗ Not ideal for
- · Simple Q&A
- · High-volume batch
- · Real-time chat
Python
generation_config=GenerationConfig(
thinking_config=ThinkingConfig(
thinking_level="high", # ~8K thinking tokens (OLD DEFAULT)
)
)TypeScript
generationConfig: {
thinkingConfig: {
thinkingLevel: "high", // ~8K thinking tokens (old default)
},
}Quick decision guide
You were using gemini-3-flash-preview and it worked well
thinking_level="high" — restore previous reasoning qualityHigh-volume chat assistant (cost matters)
thinking_level="low" — halves cost vs new defaultRAG pipeline with document synthesis
thinking_level="medium" — new default is fine hereCode agent or agentic loop
thinking_level="high" — complex multi-step tasks need itClassification or entity extraction at scale
thinking_level="minimal" — minimum cost for simple tasks