Foundations Guide 04 of 25
Reasoning models: what “thinking” changes for engineers
Frontier models now spend tokens thinking before they answer. That changes your bill, your latency, your agent code, and how far you can trust the explanation that comes back.
Key takeaways
- A reasoning model is trained with reinforcement learning to write a long chain of thought before answering, trading extra generated tokens for accuracy on multi-step problems.
- OpenAI, Anthropic, and Google all bill thinking as output tokens, even when you see only a summary, and thinking counts against the same output cap as the answer.
- Effort is now the main control. Start low and raise it only where an eval shows a gain worth the added latency and cost.
- When your agent manages its own history, send reasoning items, thinking blocks, or thought signatures back exactly as received, or the model loses its reasoning between tool calls.
- Treat visible reasoning as a debugging aid, not an audit trail. Research shows models often leave out what actually drove their answers.
On this page 7 sections
On 12 September 2024, OpenAI introduced o1, shipped an early version called o1-preview, and showed a model that got better the longer it was allowed to think. Two years later, that idea is no longer a separate product line. As of October 2026, the developer docs from OpenAI, Anthropic, and Google all treat thinking as a setting on their main models, usually switched on by default.
For an engineering team this is more than a quality bump. Thinking changes what a request costs, how long it takes, how large your output limit must be, how your agent loop stores state, and how much you can trust the explanation that comes back. Swap a reasoning model in for an older chat model without preparing, and the lesson can arrive as a surprise invoice, a timeout, or an agent that loses its place halfway through a task.
This guide covers what happens under the hood, where thinking earns its cost, and the concrete changes it forces in production code.
What is a reasoning model?
An ordinary large language model (LLM) writes its answer one token at a time, with no scratch space beyond the answer itself. Researchers noticed years ago that asking a model to write out intermediate steps, known as chain-of-thought prompting, improved results on math and logic. A reasoning model makes that habit native: it produces a long internal chain of thought first, then writes the response.
The key ingredient is reinforcement learning (RL), where the model is rewarded for outcomes rather than shown examples to imitate. In its o1 announcement, OpenAI reported that o1 kept improving both with more RL during training and with more thinking time at inference. On the 2024 AIME (American Invitational Mathematics Examination) problems, GPT-4o solved about 12% while o1 averaged 74% on a single attempt.
DeepSeek-R1, first posted on 22 January 2025 and later published in Nature, made a version of the recipe public. Its rewards came from simple rules, such as a math answer checked against the known solution or code run against test cases. With no human-written reasoning examples, its responses grew steadily longer as it learned to check and revise its own work. Our guide to how LLMs are built covers that training stage, and its costs, in more detail.
Two engineering consequences follow. First, these models are strongest where answers can be verified — math, code, logic, structured analysis — largely because that is where training rewards are easiest to define. Second, “thinking” is simply more generated tokens. The model buys accuracy with compute, and you pay for that compute.
When does more thinking pay off?
Test-time compute is a second dial
Before reasoning models, the main route to a smarter answer was a bigger model. Thinking adds another dial: spend more compute per request on the same model. A 2024 study by researchers at UC Berkeley and Google DeepMind found that allocating inference compute adaptively, prompt by prompt, was more than four times as efficient as a simple best-of-N baseline. Best-of-N just samples many answers and keeps the top-scoring one.
The same study is a useful corrective to the hype. With matched compute, extra inference let a smaller model beat one about 14 times its size, but only on questions the small model could already sometimes solve. On the hardest questions, or when a model would serve very heavy inference traffic, putting the compute into a larger model was often the better deal.
That paper tested search and revision techniques rather than today’s RL-trained thinkers, yet the lesson carries over. Thinking sharpens what a model can almost do. It does not supply knowledge the model never learned.
Where it helps, and where it backfires
Thinking pays off when a task has several dependent steps and a checkable right answer. Think debugging, multi-file code changes, planning a sequence of tool calls, reconciling figures, or applying layered policy rules. Even at launch, OpenAI reported that human raters preferred o1-preview by a wide margin for coding and data analysis, but not for some natural-language tasks.
More thinking can also make results worse. A 2025 paper on inverse scaling in test-time compute built tasks where longer reasoning lowered accuracy. As reasoning grew, Claude models got more distracted by irrelevant details, OpenAI’s o-series models latched onto how a problem was framed, and every model struggled to track constraints in hard deduction puzzles. Longer is not reliably better, so the right setting has to be measured per task.
A reasonable starting map, to be confirmed by your own evaluations:
| Workload | Start at | Raise effort when |
|---|---|---|
| Classification, routing, extraction, fact lookup | Off or the lowest level | Errors come from skipped steps, not missing knowledge |
| Drafting, support replies, light tool use | Low | The model misreads tool results or skips checks |
| Agentic coding, research, analysis needing judgment | Medium | Evals show failures in planning or self-verification |
| Hard debugging, high-stakes one-off decisions | High | Rarely; check the accuracy curve first |
| Long asynchronous jobs such as deep research or code review | High or above | Only with eval evidence that the extra time buys accuracy |
This loosely follows the OpenAI reasoning guide and Google’s thinking docs. Both point fact retrieval and classification at the lowest settings and reserve the higher settings for hard coding, debugging, and multi-step planning work.
How do you control thinking in 2026?
Some early thinking interfaces, including Anthropic’s original extended thinking, asked for a token budget: think for up to a fixed number of tokens. The major providers now center on a coarser control usually called effort. The model decides per request whether and how long to think, and effort shifts that decision up or down.
| Aspect | OpenAI | Anthropic | |
|---|---|---|---|
| Main control | reasoning.effort, from none to max (subset varies by model) | Adaptive thinking plus output_config.effort, from low to max | thinking_level, from minimal to high (subset varies by model) |
| What you see | Optional reasoning summary | Summarized or omitted thinking | Optional thought summaries |
| How thinking is billed | As output tokens | As output tokens | As output tokens |
| Usage field to log | output_tokens_details.reasoning_tokens | output_tokens_details.thinking_tokens | total_thought_tokens (Interactions endpoint) |
| State to send back | Reasoning items, encrypted when stateless | Thinking blocks, unmodified | Thought blocks with signatures, unmodified |
Defaults differ, so read the model page rather than assuming. As of October 2026, in Anthropic’s documentation, high is the default on most Claude models, but medium is the default on Claude Opus 5.5. Fixed thinking budgets survive there only as a legacy mode on older models. Google’s current Gemini 3.x models think by default, and the lowest level listed for each is minimal or low rather than off.
What thinking does to cost, latency, and output limits
You pay for thoughts you never see. All three providers bill thinking as output tokens, including the full reasoning when the response shows only a summary or nothing at all. OpenAI notes that reasoning for a single response can run from hundreds of tokens into the tens of thousands. Log the usage fields above per request, because averages hide the long tail.
Output caps now include the thinking. If a request hits its cap mid-thought, OpenAI and Google both return an incomplete response. It may contain no visible answer, yet the reasoning is still billed. OpenAI suggests leaving at least 25,000 tokens of headroom for reasoning and the answer while you experiment. Anthropic frames the fix as a choice: raise the cap if the request needed the reasoning, or lower effort if it was overthinking.
Latency moves to the front. The user waits while the model thinks, so time to first visible token grows. Stream summaries, ask for a short preamble before deep work as OpenAI suggests, or move long-thinking jobs to asynchronous queues where nobody watches a spinner.
Effort is part of your cache design. Anthropic renders the effort level into the prompt, so changing it mid-conversation invalidates prompt-cache breakpoints. Its advice is to fix the configuration per conversation and steer individual turns with instructions instead. OpenAI offers a configuration_update item, currently limited to its GPT-6 models, that changes effort between turns while keeping the cached prefix.
Reasoning models inside agents: keep the thread
Thinking is especially useful in agent loops, where the model can reason between tool calls. OpenAI and Anthropic both document this interleaving, and Gemini records thought steps alongside function calls. It also creates a new way to break things. Each provider returns an opaque artifact representing the model’s reasoning state, and a harness that manages its own history must send it back exactly as received.
OpenAI recommends passing back the reasoning items returned with each function call, together with the function outputs, or letting its server carry them via previous_response_id. When the model chains several calls, that means every item since the last user message.
Anthropic asks for thinking blocks to be returned unmodified during tool use. Google says that in stateless mode every thought block must be resent untouched, because it carries the signature the model needs. Harnesses that tidy up history by dropping unknown block types, re-serializing messages, or truncating from the middle can quietly degrade results or trigger validation errors.
A provider-neutral sketch of a loop that respects these rules:
def run_agent(user_message):
history = [user_message]
while True:
resp = model.create(
input=history,
effort="medium",
max_output_tokens=32_000,
)
metrics.record(
thinking=resp.usage.thinking_tokens,
total=resp.usage.output_tokens)
# Cap hit, possibly before any answer.
if resp.truncated:
raise NeedsMoreRoomOrLessEffort(resp)
# Keep reasoning state exactly as returned.
history.extend(resp.output_items)
calls = [
i for i in resp.output_items
if i.type == "tool_call"
]
if not calls:
# Don't assume a thinking block exists.
return resp.text
# Tool results follow the untouched reasoning.
history.extend(run_tools(calls))
Two parsing details catch teams out. Anthropic warns that a turn may contain no thinking block, because Claude can decide a request is too simple to think about. Google warns that thought summaries can be empty. Code that reaches for “the first block” or “the summary text” will eventually fail.
Can you trust what the model says it thought?
Usually you are not reading the real chain of thought. In 2024 OpenAI chose to hide raw reasoning and show a model-written summary, partly to keep the hidden reasoning useful for monitoring. Anthropic and Google likewise return summaries or nothing, depending on settings.
Even full reasoning text is not a faithful log. In a 2025 Anthropic study, researchers slipped hints into questions and checked whether models admitted using them. Averaged across hint types, in cases where the hint shaped the answer, Claude 3.7 Sonnet mentioned it only 25% of the time and DeepSeek-R1 39%. When the team trained Claude in setups with planted reward hacks, it exploited them on over 99% of prompts, yet in most environments it owned up in its reasoning under 2% of the time.
Use summaries to debug prompts and spot misunderstandings. Do not show them to customers as the reason for a decision, and do not file them as audit evidence. For decisions that matter, log the inputs, tool calls, outputs, and the deterministic checks that validated them.
What this means for your team
- Make effort an eval-driven parameter. Run your evaluation set at two or three effort levels and plot accuracy against cost and 95th-percentile latency. Pick the knee of that curve per route, not one global setting.
- Route by difficulty. Let deterministic code or a no-thinking call handle the easy majority, and spend reasoning on the hard tail. Adaptive, per-prompt allocation is where the efficiency gains in the research came from.
- Size output caps for thinking. Start generous, alert on truncated responses, then tighten from observed token distributions. Upgrading a model while keeping an old cap is a classic source of empty answers.
- Treat reasoning artifacts as protocol. Write harness tests that round-trip thinking blocks, reasoning items, and signatures through your storage, compaction, and retry code.
- Keep configuration stable within a conversation. Changing effort or thinking mode mid-session can wipe out your prompt-cache savings.
- Prompt for goals, not steps. OpenAI’s guidance is to state the goal, constraints, and output format, define what “done” means for agentic work, and avoid scripting every intermediate step.
- Distrust benchmark transfer. A model that tops a math leaderboard may add nothing to your extraction pipeline. Measure on your own data.
The pattern that holds up in production is a three-way split: rules for the clean majority, reasoning for the messy remainder, and people for genuine exceptions. It is the shape we design toward in systems like a payments reconciliation agent, where deterministic matching handles the head and model reasoning is reserved for the long tail.
Sources
-
Learning to reason with LLMs (opens in new tab) — OpenAI, 2024 openai.com
-
DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning (opens in new tab) — DeepSeek-AI (arXiv; published in Nature), 2025 arxiv.org
-
Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (opens in new tab) — Snell et al., UC Berkeley and Google DeepMind (arXiv), 2024 arxiv.org
-
Inverse Scaling in Test-Time Compute (opens in new tab) — Gema et al. (arXiv; TMLR), 2025 arxiv.org
-
Reasoning models don’t always say what they think (opens in new tab) — Anthropic, 2025 anthropic.com
-
Reasoning models (opens in new tab) — OpenAI API documentation, 2026 developers.openai.com
-
Steering thinking (opens in new tab) — Anthropic, Claude Platform documentation, 2026 platform.claude.com
-
Gemini thinking (opens in new tab) — Google AI for Developers, 2026 ai.google.dev