# What are reasoning models? vs regular LLMs, explained

> A reasoning model spends extra tokens thinking before it answers. How that works, what it costs, when it helps, and how to call one from TypeScript.

Source: https://devaiper.com/blog/what-are-reasoning-models
Published: 2026-10-30
Topics: Reasoning models, LLM, Thinking, TypeScript

**Short answer:** A reasoning model is an LLM trained to work through a problem in hidden thinking tokens before it writes the answer. More tokens means more computation spent on the question, which helps on multi-step problems like code, math and planning, and wastes time and money on simple ones. On current APIs thinking is a setting, not a separate model: you pick an effort level, the thinking is billed as output tokens, and what you see is a summary.

"Reasoning models vs LLMs" is one of the first things people type when they search for reasoning models, and the naming does not help: it sounds like a different kind of machine. It is not. A reasoning model is the same next-token loop from [how LLMs work](https://devaiper.com/blog/how-do-llms-work), with one habit added: **it thinks before it answers.** This post explains what that means, why it works, what it costs, and how to use it without paying for thinking you do not need.

## What is a reasoning model?

A regular chat model reads your question and starts writing the answer immediately, one token at a time. A reasoning model first writes a stretch of **thinking tokens**: working notes where it breaks the problem down, tries an approach, checks it and backtracks. Only then does it write the answer you see.

> **Diagram:** A regular LLM versus a reasoning model. The regular model goes straight from the question to the answer, which is fast and cheap. The reasoning model first spends thinking tokens working through the problem, then answers, which is slower and costs more but is better on multi-step problems.
> Regular LLM: Question -> answer; Fast, cheap; Great for simple tasks; Weaker on multi-step problems. Reasoning model: Question -> thinking -> answer; Slower, more output tokens; Better at code, math, planning; Overkill for lookups and chat.

## Why does thinking help?

Two reasons, both follow from how a language model works:

1. **More tokens means more computation.** A model does roughly the same amount of work for every token it produces. A one-line answer to a hard question gets very little computation. Thinking first lets the model spend hundreds or thousands of tokens of work on the problem. That is why this approach is often called **test-time compute**: spending more compute when the question is asked, instead of only during training.
2. **Notes become context.** Every thinking token goes back into the context, so later tokens can build on earlier conclusions. It is the difference between doing long division in your head and on paper.

A software analogy: a regular model is a function that returns immediately. A reasoning model is the same function with a scratch buffer it is allowed to fill before returning. On easy inputs, the buffer is wasted. On hard inputs, it is the difference between right and wrong.

How do models learn to use the scratch buffer well? Mostly through **reinforcement learning** on problems where the final answer can be checked, like math and code: attempts that reach the right answer are rewarded, and the model gradually learns reasoning habits that get there more often.

## Reasoning model vs regular LLM: when to use which

| Task | Thinking? | Why |
|---|---|---|
| Classify, extract, summarize | Low or none | One step, no plan needed |
| Simple Q&A, chat replies | Low | Latency matters more than depth |
| Write a function from a clear spec | Medium | Some planning helps |
| Debug a failing test, refactor across files | High | Many dependent steps |
| Math, algorithms, tricky logic | High or more | Where thinking shines |
| Agent planning a multi-step task | High | Mistakes compound in a [loop](https://devaiper.com/blog/what-is-an-agent-loop) |

My rule of thumb (an opinion, not a benchmark): if a strong engineer would want scratch paper for it, give the model thinking. If they would answer without looking up, do not pay for thinking.

## Today, thinking is a setting

Early on, "reasoning model" meant a separate model you switched to. On current APIs it is mostly a setting on the model you already use. On the Claude API:

- **Adaptive thinking.** The model decides per request whether to think and how much. You set the intent, not a token budget.
- **Effort** is the main control: `low`, `medium`, `high`, `xhigh` or `max`. Higher effort makes the model think more often and more deeply. The default is `high` on most models and `medium` on Claude Opus 5.5 and Claude Haiku 5.5. No level guarantees thinking on every request: even at `max`, a trivial question may get none.
- **Display.** What you see of the thinking is a **summary** (`display: "summarized"`) or nothing (`"omitted"`); the default depends on the model. The raw chain of thought is not returned.

## What thinking costs

**Thinking tokens are billed as output tokens**, at the output price, whether you see a summary or nothing at all. The visible text in the response is therefore smaller than what you pay for. The usage block tells you the real number in `output_tokens_details.thinking_tokens`, which is included in `output_tokens`.

Two practical consequences:

- **Set effort per route, not per app.** A chat endpoint and a code-review endpoint deserve different levels.
- **Measure cost per finished task, not per request.** Higher effort can be cheaper overall if it gets the answer right first time instead of in three retries.

## Call one from TypeScript

```ts
import Anthropic from "@anthropic-ai/sdk";

const client = new Anthropic(); // reads ANTHROPIC_API_KEY
type Effort = "low" | "medium" | "high" | "xhigh" | "max";

/** Ask with adaptive thinking; return the answer and what it cost. */
export async function ask(question: string, effort: Effort) {
  const res = await client.messages.create({
    model: "claude-opus-5-5",
    max_tokens: 16000,
    thinking: { type: "adaptive", display: "summarized" },
    output_config: { effort },
    messages: [{ role: "user", content: question }],
  });
  return summarize(res);
}
```

And the part that makes the cost visible:

```ts
/** Split a response into answer, reasoning summary and tokens. */
export function summarize(res: Anthropic.Message) {
  if (res.stop_reason !== "end_turn") {
    throw new Error(`stopped early: ${res.stop_reason}`);
  }
  const answer = res.content
    .flatMap((b) => (b.type === "text" ? [b.text] : []))
    .join("");
  const reasoning = res.content
    .flatMap((b) => (b.type === "thinking" ? [b.thinking] : []))
    .join("");
  const details = res.usage.output_tokens_details;
  return {
    answer,
    reasoning, // a summary, not the raw chain of thought
    // billed as output tokens, whether or not you see them
    thinkingTokens: details?.thinking_tokens ?? 0,
    outputTokens: res.usage.output_tokens, // includes thinking
  };
}
```

Log `thinkingTokens` per route for a week and you will know exactly where your reasoning budget goes. Note the `stop_reason` check: a response cut off by `max_tokens`, or declined with `refusal`, is not an answer, so it fails loudly.

How I tested this: the code is type-checked against `@anthropic-ai/sdk` 1.3.0, which has the `thinking.display`, `output_config.effort` and `output_tokens_details` fields used here, and `summarize` is tested on recorded-shape responses: with a reasoning summary, with omitted thinking (empty text, tokens still counted), and with `refusal` and `max_tokens` stops. I did not call the live API for this post.

## How to prompt a reasoning model

The official guidance is short and slightly counterintuitive:

- **Prefer general instructions over prescriptive steps.** "Think thoroughly about edge cases" often beats a hand-written step-by-step plan. The model's own reasoning frequently goes further than the steps you would write.
- **Do not ask it to "think step by step" in tags.** That was a trick for models without built-in thinking. On the newest models, a prompt asking the model to write out its reasoning in `<thinking>` tags may even be declined. Use the thinking setting, at a lower effort if cost matters.
- **Give it a way to check itself.** Tests to run, constraints to verify, an expected output format. Reasoning plus verification beats reasoning alone.
- **Lower effort before rewording.** If it thinks too much, turn the effort down. It is a calibrated control; prompt wording is not.

## What confused me: the reasoning is not a log

I assumed the reasoning text was a faithful record of how the model got its answer. It is not guaranteed to be:

- What you get back is usually a **summary** of the thinking, not the thinking itself.
- Even raw chains of thought are not always faithful. A 2025 study, [Reasoning Models Don't Always Say What They Think](https://arxiv.org/abs/2505.05410), gave models hints in their prompts and checked whether the reasoning admitted using them. When models used a hint, their reasoning mentioned it only some of the time, often less than 20% of the time.

So read the reasoning for ideas, and to understand a surprising answer, but **verify the output** with tests and checks. The same advice as for [catching hallucinations in code](https://devaiper.com/blog/how-to-catch-ai-hallucinations-in-code), now with more tokens.

## The takeaway

A reasoning model is not smarter in every way. It is a model that is allowed to spend more work on your question, and that is only worth paying for when the question needs it. Pick the effort per task, watch the thinking tokens, and judge it by results, not by how convincing the reasoning sounds.

Sources: [Adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking), [Effort](https://platform.claude.com/docs/en/build-with-claude/effort), [Extended thinking tips](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/extended-thinking-tips), [Reasoning Models Don't Always Say What They Think (2025)](https://arxiv.org/abs/2505.05410).

## FAQ

### What is the difference between a reasoning model and a regular LLM?

Both are language models that predict tokens. A reasoning model has been trained to produce a stretch of thinking tokens before its answer, working through the problem step by step. That makes it slower and more expensive per request, and better at problems with several dependent steps.

### Are thinking tokens billed?

Yes. Thinking tokens are billed as output tokens, even when the API returns only a summary or nothing at all. The response's usage reports how many thinking tokens were used.

### When should I use a reasoning model?

For multi-step work where a mistake in one step spoils the rest: debugging, non-trivial code changes, math, planning, agentic tool use. For classification, extraction, simple Q&A and latency-sensitive chat, low effort or no thinking is usually enough.

### Can I trust a reasoning model's chain of thought?

Treat it as a hint, not an audit log. A 2025 study found that reasoning models often used hints in a prompt without mentioning them in their reasoning, and on current APIs you usually see a summary rather than the raw thinking. Verify the answer, not the story.

### How do I control how much a model thinks?

On the Claude API, set the effort level (low, medium, high, xhigh or max) in output_config. The model decides per request whether and how much to think, and effort shifts that default. Lower effort is cheaper and faster; higher effort helps on hard problems.

