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

LevelThinking TokensTypical LatencyRelative CostBest For
minimal
~1K~1–2s
Fact retrievalShort Q&AClassification
low
~2K~2–4s
Conversational chatSimple summarizationIntent detection
mediumnew default
~4K~4–8s
Code generationDocument summarizationRAG synthesis
highold default
~8K~8–15s
Code agentsMulti-step reasoningComplex code review

Config snippets per level

minimal~1K thinking tokens · ~1–2s · cost

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

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 ⚠ 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 ← 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 quality
High-volume chat assistant (cost matters)
thinking_level="low" — halves cost vs new default
RAG pipeline with document synthesis
thinking_level="medium" — new default is fine here
Code agent or agentic loop
thinking_level="high" — complex multi-step tasks need it
Classification or entity extraction at scale
thinking_level="minimal" — minimum cost for simple tasks