Configuration for thinking/reasoning in Gemini models.
Gemini 3 (Recommended)
Use thinking_level for Gemini 3 models:
:minimal- Minimal thinking (Gemini 3 Flash only):low- Minimizes latency and cost. Best for simple tasks.:medium- Balanced thinking (Gemini 3 Flash only):high- Maximizes reasoning depth (default for Gemini 3).
Model Support
- Gemini 3 Pro:
:low,:high - Gemini 3 Flash:
:minimal,:low,:medium,:high
Gemini 2.5 (Legacy)
Use thinking_budget for Gemini 2.5 models:
0- Disable thinking (Flash/Lite only)-1- Dynamic thinking- Positive integer - Fixed token budget
Important
You cannot use both thinking_level and thinking_budget in the same request.
Doing so will return a 400 error from the API.
Summary
Types
@type t() :: %Gemini.Types.GenerationConfig.ThinkingConfig{ include_thoughts: boolean() | nil, thinking_budget: integer() | nil, thinking_level: thinking_level() | nil }
Thinking configuration for Gemini models
@type thinking_level() :: :unspecified | :minimal | :low | :medium | :high