Extended Thinking and Reasoning: Claude, GPT, and Gemini Compared
Compare reasoning tokens, request payloads, effort levels, context retention, and billing across Claude, OpenAI Responses, and Gemini Interactions APIs.
- Anthropic is shifting from explicit token targets (
budget_tokens) on legacy models to dynamic reasoning configured viaoutput_config.effort. - OpenAI requires the Responses API for full reasoning control, using
reasoning.effortlevels andreasoning.mode: "pro"alongside total limits set bymax_output_tokens. - Google’s Gemini Interactions API models thought as first-class steps with encrypted signatures and controls reasoning intensity through
generation_config.thinking_level. - Reasoning tokens count toward output limits and context windows across providers, and they are billed at standard output token prices.
Architectural Concepts: How Each Provider Surfaces Reasoning
Frontier models allocate computation before generating final user-facing text. While the underlying goal—solving complex logic, multi-step planning, and coding problems—is identical, Anthropic, OpenAI, and Google surface and control this process through distinct paradigms.
Anthropic divides its API across two generations: manual extended thinking and adaptive thinking. Under manual mode, callers set a numerical thinking budget (budget_tokens). In adaptive mode, the model evaluates input complexity dynamically, guided by an effort setting. Anthropic surfaces internal reasoning within structured thinking blocks in the response body or streaming deltas.
OpenAI implements reasoning tokens in models such as gpt-6-astra and gpt-6.1-sol. Rather than offering a separate manual token budget, OpenAI treats reasoning as internal model execution guided by categorical effort levels (none through max) and an optional execution tier (reasoning.mode: "pro"). OpenAI does not expose raw reasoning text via its API, but the tokens consume context and are reported in token breakdown details.
Google treats reasoning as an explicit, multi-step execution flow within its Gemini Interactions API. Rather than embedding hidden tokens silently, Gemini produces dedicated thought steps in the execution sequence alongside tool calls and final model output. Every Gemini thought step includes an encrypted signature representing the internal state, and optionally a human-readable summary block when configured.
Side-by-Side Comparison of Reasoning Controls
Understanding how configuration keys map across providers simplifies integration and migration across different vendor interfaces.
| Provider & API | Control Mechanism | Depth Settings / Budgeting | Visibility of Thoughts | Multi-Turn Context Behavior |
|---|---|---|---|---|
| Anthropic Messages API | thinking object (adaptive or enabled) |
output_config: {effort} or budget_tokens: N |
Summary or thinking text in content blocks | Preserved on Opus 4.5 and 4.6+ models; stripped on older models |
| OpenAI Responses API | reasoning object (effort, mode, context) |
Effort levels (none to max) + max_output_tokens |
Opaque; tokens counted but raw text unexposed | all_turns by default on GPT-5.6+; current_turn on earlier models |
| Google Interactions API | generation_config (thinking_level, thinking_summaries) |
thinking_level (minimal, low, medium, high) |
Encrypted signature + optional summary |
Encrypted signatures retained across steps and tool executions |
Request Shapes: Implementing Reasoning in API Payloads
Anthropic’s modern adaptive configuration requires setting thinking.type to adaptive and defining reasoning depth in output_config.effort:
{
"model": "claude-sonnet-4-6",
"max_tokens": 16000,
"thinking": {
"type": "adaptive"
},
"output_config": {
"effort": "high"
},
"messages": [
{
"role": "user",
"content": "Analyze potential edge cases in this distributed locking design."
}
]
}
OpenAI uses the Responses API, specifying reasoning effort and an optional mode in the reasoning block, bounded by max_output_tokens:
{
"model": "gpt-6.1-sol",
"reasoning": {
"mode": "pro",
"effort": "medium"
},
"max_output_tokens": 4000,
"input": [
{
"role": "user",
"content": "Review this database migration plan and identify potential failure modes."
}
]
}
Google uses the Interactions API, tuning reasoning via generation_config with thinking_level and choosing summary visibility with thinking_summaries:
{
"model": "gemini-3.8-flash",
"input": "What is the sum of the first 50 prime numbers?",
"generation_config": {
"thinking_level": "high",
"thinking_summaries": "auto"
}
}
Context Limits, Interleaved Tool Use, and Billing Mechanics
Across all three providers, internal reasoning tokens are not free: they are billed as standard output tokens. Because they consume room in the model’s total context and output limits, developers must account for reasoning expansion when setting caps or chaining function calls. Token pricing ranges significantly; for instance, Claude Sonnet 5.5 is priced at $2 per 1M input tokens ($0.2 cached) and $10 per 1M output tokens, whereas high-capacity reasoning models like GPT-6 Astra cost $10 per 1M input ($1 cached) and $50 per 1M output. Lower-overhead options include Gemini 3.8 Flash at $0.75 per 1M input ($0.075 cached) and $3.75 per 1M output, and GPT-6.1 Sol at $2 per 1M input ($0.1 cached) and $10 per 1M output. Teams estimating overall operational overhead should reference the /tools/llm-api-cost-calculator/ and /tools/llm-api-pricing/ directory.
When handling tool use, modern reasoning models support interleaved thinking—reasoning prior to making a function call, inspecting the call’s output, and reasoning again before generating the next step. However, each provider handles state persistence differently:
- Claude: Under manual extended thinking (
type: "enabled"), interleaved thinking on Claude Opus 4.5 and Claude Sonnet 4.5 required theinterleaved-thinking-2025-05-14header. Under adaptive thinking (type: "adaptive"), Claude interleaves automatically without extra headers. Claude Opus 4.5 and models 4.6 and higher preserve prior turns’ thinking blocks in the conversation context, billed as input tokens. - OpenAI: Models like
gpt-5.5support interleaved reasoning natively. Persisted reasoning can be carried over across turns without exposing the raw reasoning strings. Models in the GPT-5.6 family and GPT-6.1 Sol support and default toreasoning.context: "all_turns", whereas earlier releases defaulted tocurrent_turn. - Gemini: Interactions API creates explicit
thoughtsteps before and between tool steps (such asgoogle_search_call). Cryptographic signatures are preserved within these steps, ensuring reasoning context remains intact between tool returns without exposing raw latents.
Operational Gotchas and Cost Pitfalls
Careful parameter handling is essential to avoid silent failures, runtime 400 errors, or runaway costs in production pipelines.
- Anthropic API rejections: Setting
thinking.type: "enabled"on Claude 4.7 or newer models returns an HTTP 400 error. In manual mode,budget_tokensmust be at least 1,024 tokens and strictly less thanmax_tokens(precluding cache pre-warming withmax_tokens: 0). - Cache invalidation on budget changes: Modifying
budget_tokensbetween turns on Claude invalidates prompt caching breakpoints, forcing a full cache recreation on that request. - OpenAI truncation risks: If
max_output_tokensis configured too low, the model can exhaust its quota during reasoning before producing visible text. The API returns statusincompletewith reasonmax_output_tokens. OpenAI suggests maintaining a buffer of at least 25,000 tokens when testing reasoning models. - OpenAI effort restrictions: Setting
reasoning.efforttononeon GPT-6 Astra returns an HTTP 400 error. GPT-6.1 Sol rejects bothnoneandminimal, defaulting tomedium. - Missing summaries in Gemini: Thought steps may return only an encrypted
signatureand nosummaryif the request is trivial, ifthinking_summariesis set tonone, or if non-text latent reasoning occurs. Code must never assumestep.summarycontains text.
Implementation and Migration Checklist
Follow this practical checklist when building or upgrading multi-model pipelines that leverage extended reasoning:
- Standardize API endpoints: Ensure OpenAI calls route through the Responses API rather than Chat Completions to access function calling and reasoning configurations on GPT-6 Astra and GPT-6.1 Sol.
- Retire deprecated Claude parameters: Migrate Claude Sonnet 4.6 and Opus 4.6 away from
budget_tokenstothinking: {type: "adaptive"}withoutput_config: {effort: ...}before adopting Claude 4.7+. - Remove obsolete beta headers: Drop
interleaved-thinking-2025-05-14when moving Claude workloads to adaptive mode. - Guard against token exhaustion: On OpenAI, inspect
response.status === "incomplete"and checkincomplete_details.reason === "max_output_tokens"to catch truncated reasoning chains. - Check usage telemetry: Read
usage.output_tokens_details.thinking_tokenson Anthropic,usage.output_tokens_details.reasoning_tokenson OpenAI, andusage.total_thought_tokenson Gemini to monitor reasoning costs against your application’s /posts/per-run-cost-cap-for-llm-api-calls/. - Handle empty thought steps: In the Gemini Interactions API, ensure response parsers handle
thoughtsteps containing onlysignaturewithout breaking whensummaryis empty.