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.

By ailog · Published Oct 17, 2026 · 6 min read · How we work
In short
  • Anthropic is shifting from explicit token targets (budget_tokens) on legacy models to dynamic reasoning configured via output_config.effort.
  • OpenAI requires the Responses API for full reasoning control, using reasoning.effort levels and reasoning.mode: "pro" alongside total limits set by max_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 the interleaved-thinking-2025-05-14 header. 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.5 support 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 to reasoning.context: "all_turns", whereas earlier releases defaulted to current_turn.
  • Gemini: Interactions API creates explicit thought steps before and between tool steps (such as google_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_tokens must be at least 1,024 tokens and strictly less than max_tokens (precluding cache pre-warming with max_tokens: 0).
  • Cache invalidation on budget changes: Modifying budget_tokens between turns on Claude invalidates prompt caching breakpoints, forcing a full cache recreation on that request.
  • OpenAI truncation risks: If max_output_tokens is configured too low, the model can exhaust its quota during reasoning before producing visible text. The API returns status incomplete with reason max_output_tokens. OpenAI suggests maintaining a buffer of at least 25,000 tokens when testing reasoning models.
  • OpenAI effort restrictions: Setting reasoning.effort to none on GPT-6 Astra returns an HTTP 400 error. GPT-6.1 Sol rejects both none and minimal, defaulting to medium.
  • Missing summaries in Gemini: Thought steps may return only an encrypted signature and no summary if the request is trivial, if thinking_summaries is set to none, or if non-text latent reasoning occurs. Code must never assume step.summary contains 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_tokens to thinking: {type: "adaptive"} with output_config: {effort: ...} before adopting Claude 4.7+.
  • Remove obsolete beta headers: Drop interleaved-thinking-2025-05-14 when moving Claude workloads to adaptive mode.
  • Guard against token exhaustion: On OpenAI, inspect response.status === "incomplete" and check incomplete_details.reason === "max_output_tokens" to catch truncated reasoning chains.
  • Check usage telemetry: Read usage.output_tokens_details.thinking_tokens on Anthropic, usage.output_tokens_details.reasoning_tokens on OpenAI, and usage.total_thought_tokens on 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 thought steps containing only signature without breaking when summary is empty.
Sources
  1. Extended thinking
  2. Reasoning models
  3. https://ai.google.dev/gemini-api/docs/thinking

Related