Thinking / Reasoning
Control how much a model reasons before responding. Works across OpenAI, Anthropic, Google Gemini, AWS Bedrock, and Docker Model Runner.
What Is Thinking?
Several modern models support an extended reasoning phase that happens before they produce visible output. During this phase the model plans, evaluates options, and works through the problem — internally, not shown in the response by default. This typically improves accuracy on complex tasks like coding, math, and multi-step planning, at the cost of higher token usage and latency.
Docker Agent exposes this through a single thinking_budget field on any named model. The value format differs slightly by provider, but the semantics are the same: higher effort means more thorough reasoning.
The think tool is a scratchpad for models that lack native reasoning. If your model supports thinking_budget, you do not need the think tool.
Quick Reference
| Provider | Format | Values | Default |
|---|---|---|---|
| OpenAI | string | none, minimal, low, medium, high, xhigh, max; xhigh on gpt-5.2+, max on gpt-5.6+; API-level none on GPT-5.x from 5.6 onward and GPT-6 Sol/Luna, minimal dropped on gpt-5.6+ |
medium (API default) |
| Anthropic | int or str | Fixed budgets: ≥1024 and less than max_tokens; or minimal–max, adaptive, adaptive/<effort>, none |
Model-dependent; Claude 5.x defaults to adaptive |
| Gemini 2.5 | int or str | 0 (off), -1 (dynamic), token count (max 24576 / 32768), or minimal–max / adaptive (mapped to tokens) |
-1 (dynamic) |
| Gemini 3+ | string | minimal (Gemini 3), low, medium, high, xhigh (gemini-4-hydrogen / gemini-4-neon), adaptive, adaptive/<effort>, none (lowers to low with warning) |
API default (model-dependent) |
| AWS Bedrock | int or str | Fixed budgets: ≥1024 and less than max_tokens; minimal–max mapped to tokens on older models; adaptive on supported newer Claude models |
Model-dependent; Claude 5.x defaults to adaptive |
| Docker Model Runner | int or str | token count, minimal–max (mapped to tokens), adaptive (unlimited), none |
engine default |
String values are case-insensitive. The full set of accepted strings is none, minimal, low, medium, high, xhigh, max, adaptive, and adaptive/<effort> — but each provider only honors the subset listed above. Unsupported values either fail at request time (OpenAI) or are mapped/ignored as described per provider below.
thinking_budgetis only applied by the providers listed above. Other OpenAI-compatible providers (xAI, Mistral, Ollama, …) currently ignore it — see xAI and Mistral.
OpenAI
OpenAI reasoning models (o-series, gpt-5, gpt-5-mini, gpt-5.6 family, gpt-6 family) use a string effort level that maps to their reasoning_effort API parameter. The xhigh level requires gpt-5.2+; max requires gpt-5.6+; API-level none is supported on GPT-5.x from 5.6 onward and GPT-6 Sol/Luna, but not Astra; minimal is dropped on gpt-5.6+.
models:
gpt-thinker:
provider: openai
model: gpt-5.6
thinking_budget: high # none | minimal | low | medium | high | xhigh | max
Effort levels:
| Level | Description |
|---|---|
none |
No reasoning. Sent as-is on GPT-5.x from 5.6 onward and GPT-6 Sol/Luna (a real API value); on Astra and older models it just disables the local thinking_budget (the API's own default still applies). |
minimal |
Fastest; lightest reasoning pass. Not accepted on gpt-5.6+ (dropped from the API). |
low |
Quick reasoning for straightforward tasks. |
medium |
Balanced default. |
high |
More thorough; recommended for complex tasks. |
xhigh |
Near-maximum effort; slower but most accurate. Requires gpt-5.2+. |
max |
Maximum effort. Requires gpt-5.6+. |
Token counts, adaptive, and adaptive/<effort> are rejected with a configuration error at request time. xhigh is only supported by gpt-5.2 and later minor versions (e.g. gpt-5.2, gpt-5.4-mini); max is supported by gpt-5.6 and later; API-level none is supported on GPT-5.x from 5.6 onward and GPT-6 Sol/Luna, but not Astra; minimal is not accepted on gpt-5.6+. Older models (o1, o3-mini) only accept low/medium/high — sending an unsupported level returns an API error.
Older OpenAI reasoning models always reason internally — even with thinking_budget: none there are hidden reasoning tokens that count against max_tokens. On GPT-5.x from 5.6 onward and GPT-6 Sol/Luna, none is a real API value that genuinely disables reasoning. Docker Agent automatically raises the output-token floor for its internal low-effort calls (e.g. title generation) so hidden reasoning cannot starve visible text output.
Anthropic
Anthropic Claude supports two thinking modes: a token budget (older models) and adaptive / effort-based thinking (newer models).
Token budget (Claude 4 and earlier)
Set an explicit number of thinking tokens (at least 1024). This must be less than max_tokens and within the model's supported range:
models:
claude-thinker:
provider: anthropic
model: claude-sonnet-4-5
thinking_budget: 16384 # tokens reserved for internal reasoning
Docker Agent auto-adjusts max_tokens when you set a thinking budget but leave max_tokens at its default. If you set max_tokens explicitly, it must be greater than thinking_budget.
Adaptive thinking (Opus 4.6+ and Sonnet 4.6)
Newer Claude models support adaptive thinking, where the model decides how much to think. Claude Opus 4.6, 4.7, and 4.8 only support adaptive thinking — they reject token-based budgets. Sonnet 4.6 supports both token budgets and adaptive thinking. Use adaptive, adaptive/<effort>, or a bare effort level — on Anthropic, a bare effort level like high is shorthand for adaptive thinking at that effort:
models:
claude-adaptive:
provider: anthropic
model: claude-opus-4-6
thinking_budget: adaptive # model decides effort (defaults to high)
claude-adaptive-low:
provider: anthropic
model: claude-opus-4-6
thinking_budget: low # same as adaptive/low
claude-adaptive-max:
provider: anthropic
model: claude-opus-4-6
thinking_budget: adaptive/max # adaptive/low | adaptive/medium | adaptive/high | adaptive/xhigh | adaptive/max
Adaptive effort levels and per-model support:
| Level | Opus 4.5 | Sonnet 4.5 / Haiku | Sonnet 4.6 | Opus 4.6 | Opus 4.7 / 4.8 | Fable 5 | Mythos 5 | Mythos preview |
|---|---|---|---|---|---|---|---|---|
low |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
medium |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
high |
✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
xhigh |
— | — | — | — | ✓ | ✓ | ✓ | — |
max |
— | — | ✓ | ✓ | ✓ | ✓ | ✓ | ✓ |
minimal is treated as low (bare form only). high is the default when adaptive is used without an effort level.
On adaptive-capable Claude models, effort strings use adaptive thinking (output_config.effort). For older models such as Sonnet 4.5 and Haiku 4.5, Docker Agent converts effort strings, including adaptive/<effort>, into fixed token budgets and logs a warning. Models that only support adaptive thinking have positive token budgets converted to adaptive instead.
Disabling thinking (Claude)
thinking_budget: none # or 0
Models that support disabling thinking honor this setting. Claude models that require thinking use adaptive thinking with low effort instead. Claude 5.x models think adaptively by default; see the per-model rules.
Interleaved thinking
Interleaved thinking lets the model reason between tool calls — useful for complex agentic tasks. Docker Agent auto-enables it whenever a thinking budget is configured on a Claude model, so you only need to set it explicitly to turn it off:
models:
claude-interleaved:
provider: anthropic
model: claude-sonnet-4-5
thinking_budget: 16384
# interleaved_thinking is auto-enabled; disable it explicitly if needed:
provider_opts:
interleaved_thinking: false
When extended thinking is enabled, Anthropic requires temperature=1.0. Docker Agent automatically suppresses any temperature or top_p settings you have configured — they are silently ignored while thinking is active.
Thinking display
Newer Claude models (Opus 4.7+, Fable 5) hide thinking content by default at the API level. To keep reasoning visible, Docker Agent requests summarized thinking whenever adaptive/effort-based thinking is used without an explicit thinking_display. Use thinking_display in provider_opts to override:
models:
opus-47:
provider: anthropic
model: claude-opus-4-7
thinking_budget: adaptive
provider_opts:
thinking_display: omitted # summarized | omitted (display: pre-4.6 models only)
See Anthropic: Thinking Display for the value reference and model restrictions. Full thinking tokens are billed regardless of thinking_display.
Task budget (Anthropic)
task_budget caps total tokens across an entire multi-step agentic task (thinking + tool calls + output combined):
models:
opus-bounded:
provider: anthropic
model: claude-opus-4-7
thinking_budget: adaptive
task_budget: 128000 # total token ceiling for the whole task
See the Anthropic provider page for details.
Google Gemini
Gemini 2.5 and Gemini 3+ use different formats.
Gemini 2.5 (token budget)
models:
gemini-off:
provider: google
model: gemini-2.5-flash
thinking_budget: 0 # disable thinking
gemini-dynamic:
provider: google
model: gemini-2.5-flash
thinking_budget: -1 # let the model decide (default)
gemini-fixed:
provider: google
model: gemini-2.5-flash
thinking_budget: 8192 # fixed token budget (max 24576 for Flash, 32768 for Pro)
Gemini 3+ (level-based)
models:
gemini4-neon:
provider: google
model: gemini-4-neon
thinking_budget: xhigh # low | medium | high | xhigh (Hydrogen and Neon)
gemini4-carbon:
provider: google
model: gemini-4-carbon
thinking_budget: high # low | medium | high (Carbon and Argon)
gemini4-adaptive:
provider: google
model: gemini-4-carbon
thinking_budget: adaptive # omits thinkingLevel (model default); adaptive/<effort> selects a tier
gemini3-flash:
provider: google
model: gemini-3-flash
thinking_budget: medium # minimal | low | medium | high
- Disabling thinking (
none/0): Gemini 3+ models always think; settingthinking_budget: noneor0logs a warning and sendsloweffort with thoughts hidden. - Integer budgets on Gemini 4+: Gemini 4 models reject
thinkingBudgettokens; Docker Agent logs a warning and omits the token budget so the model falls back to its defaultthinkingLevel. - OpenAI-compatible gateways: When routing
google/gemini-3*orgoogle/gemini-4*models through an OpenAI-compatible gateway (such asopenrouterorvercel),thinking_budgetis mapped and clamped toreasoning_effortautomatically.
AWS Bedrock (Claude)
Bedrock Claude uses a token budget like Anthropic. String effort levels (minimal–max) are mapped automatically:
| Effort level | Token budget |
|---|---|
minimal |
1,024 |
low |
2,048 |
medium |
8,192 |
high |
16,384 |
xhigh/max |
32,768 |
models:
bedrock-claude-thinker:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
thinking_budget: 8192 # or use an effort level: medium
provider_opts:
region: us-east-1
bedrock-claude-interleaved:
provider: amazon-bedrock
model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
thinking_budget: high
provider_opts:
region: us-east-1
# interleaved_thinking is auto-enabled when thinking_budget is set
Claude Opus 4.6+ on Bedrock requires adaptive thinking — these models reject thinking.type=enabled (token budgets). Configure them with adaptive or adaptive/<effort>; Docker Agent auto-coerces token budgets and effort levels on these models with a warning:
models:
bedrock-opus-adaptive:
provider: amazon-bedrock
model: global.anthropic.claude-opus-4-8
thinking_budget: adaptive/high
provider_opts:
region: us-east-1
Bedrock Claude requires token-based thinking_budget values to be ≥ 1024 and less than max_tokens. Docker Agent logs a warning and ignores the budget if either condition is violated. Interleaved thinking requires the interleaved-thinking-2025-05-14 beta header, which Docker Agent adds automatically; it is auto-enabled whenever a token thinking budget is set on a Bedrock-hosted Claude model (adaptive thinking interleaves on its own).
Docker Model Runner (local models)
For local models, thinking_budget is forwarded to the inference engine. Both token counts and effort strings work; effort strings map to the same token scale as Bedrock (minimal=1024 … xhigh/max=32768), and adaptive means unlimited:
models:
local:
provider: dmr
model: ai/qwen3
thinking_budget: medium # llama.cpp: reasoning-budget=8192; vLLM: thinking_token_budget=8192
- llama.cpp: sent as
reasoning-budgetat model-configure time. - vLLM: sent as
thinking_token_budgeton each request. - MLX / SGLang: no reasoning-budget knob; the value is silently ignored.
See the Docker Model Runner provider page for details.
xAI (Grok) and Mistral
xAI and Mistral run through Docker Agent's OpenAI-compatible client, but the reasoning_effort parameter is only sent for OpenAI reasoning model names (o-series, gpt-5). Setting thinking_budget on Grok or Mistral models currently has no effect — the value is accepted by config validation but never sent to the API.
Grok and Mistral reasoning models (e.g. grok-3-mini, magistral) manage reasoning on their own; for non-reasoning models, consider the think tool instead.
Disabling Thinking
Use none or 0 to clear Docker Agent's thinking configuration. Whether this disables the model's reasoning depends on the backend:
models:
fast-model:
provider: openai
model: gpt-5-mini
thinking_budget: none
gemini-no-think:
provider: google
model: gemini-2.5-flash
thinking_budget: 0
On OpenAI o-series, gpt-5 through gpt-5.5, GPT-6 Astra, and Gemini 3+, none and 0 clear the local budget and leave the API's default reasoning behavior in effect. GPT-5.x from 5.6 onward and GPT-6 Sol/Luna instead send none as an API value that disables reasoning. Claude models follow the model-specific rules above.
Local models and other OpenAI-compatible backends may reason by default even when
thinking_budget is cleared. Use
provider_opts.extra_body
to send the backend's explicit off switch, such as
chat_template_kwargs: {enable_thinking: false}, on Chat Completions requests.
This also works with Docker Model Runner when its engine and model template
support that field.
Choosing an Effort Level
| Task complexity | Recommended level |
|---|---|
| Simple factual Q&A | none / minimal |
| General-purpose chat | low / medium |
| Coding, debugging, analysis | medium / high |
| Complex reasoning, planning | high / xhigh |
| Research, difficult math/logic | xhigh / max |
| Long agentic tasks (Anthropic) | adaptive |
Changing Thinking Level at Runtime
Adjust reasoning effort in the TUI without editing your YAML:
| Control | Action |
|---|---|
| Shift + Tab | Cycle through supported levels, wrapping back to the first. |
/effort |
Open a picker of supported levels. |
/effort high |
Set a level directly. |
/effort + Space + Tab |
Autocomplete a supported level. |
The sidebar shows the current effort next to the model name. Available levels depend on the model; for older Claude models, Docker Agent maps levels to fixed token budgets.
Changes last for the current session only. The next session uses the effort configured in your YAML.
These controls require a reasoning-capable model and are unavailable with remote runtimes.
Sharing Thinking Config Across Models
Define a provider with a default thinking_budget and all models that reference it inherit it:
providers:
deep-anthropic:
provider: anthropic
thinking_budget: adaptive/high
max_tokens: 32768
models:
claude-smart:
provider: deep-anthropic
model: claude-opus-4-6 # inherits thinking_budget: adaptive/high
claude-faster:
provider: deep-anthropic
model: claude-opus-4-6
thinking_budget: low # overrides to adaptive/low
Full Example
See examples/thinking_budget.yaml for a runnable config covering all providers.