Mindket

What are reasoning models? AI that thinks before it answers

A black banner titled "Reasoning models" over the line "When to think longer and how to prompt it".

A reasoning model is an AI model that spends extra computation thinking before it answers. OpenAI's models do it with hidden reasoning tokens, Claude with thinking blocks, Gemini with thinking levels and DeepSeek-R1 with text inside think tags. You pay for that thinking as output, you rarely see all of it, and it helps most on problems with several dependent steps.

In this lesson

  • Read the usage object after a call to see how many tokens went to thinking, not only to the answer.
  • Count thinking as output when you plan a budget or a context window.
  • Try a reasoning model first on tasks whose steps depend on each other, such as maths, science and planning.
  • Check how your provider exposes thinking before you write code that parses a reply.
All courses
On this page
  1. Before you start
  2. See the thinking in a response
  3. Where the tokens go
  4. Four vendors, four ways to see the thinking
  5. Why more thinking helps, and where
  6. Common mistakes
  7. Try it yourself
  8. Next: writing prompts a reasoning model likes
  9. Check yourself
  10. Frequently asked questions
  11. Sources

Before you start

The first half works in any chat app that has a thinking switch. The second half needs Python 3, the openai package and an OpenAI API key in your environment.

A token is the unit a model reads and writes, often a word or part of one. What are tokens in AI explains the idea if it is new.

See the thinking in a response

Ask a reasoning model a one-line question and the reply looks like any other. The difference is in the usage numbers that arrive with it. OpenAI's reasoning guide says its reasoning models use reasoning tokens to think before they respond, and that the exact count shows up in the response's usage object.

The call below is the guide's own summary example, and it asks for a short summary of the thinking and prints the whole usage object next to it.

from openai import OpenAI

client = OpenAI()

response = client.responses.create(
    model="gpt-6-astra",
    input="What is the capital of France?",
    reasoning={"effort": "low", "summary": "auto"},
)

print(response.output)
print(response.usage)  # this line is the lesson's own
  1. In a chat app with a thinking switch, ask one multi-step question twice, once with thinking off and once on. DeepSeek's chat site at chat.deepseek.com calls its switch DeepThink.
  2. For the code route, run pip install openai and make sure OPENAI_API_KEY is set.
  3. Run the call above. If it fails on the summary, delete "summary": "auto" and run it again.
  4. Find output_tokens_details.reasoning_tokens in the printed usage and put it beside output_tokens.
  5. Change "effort": "low" to "high", run the same question again and compare the two reasoning counts.

Where the tokens go

OpenAI describes the thinking as the model planning, using tools effectively, inspecting alternatives, recovering from ambiguity and solving harder multi-step tasks. The reasoning tokens are not visible through the API. They still occupy room in the context window and are billed as output tokens.

The usage example in the guide shows what that means. Of 1,186 output tokens, 1,024 were reasoning, which leaves 162 for everything else the response contained. Most of that bill went to text you never read.

Anthropic frames the same idea differently for Claude. Its extended thinking post, published on 24 February 2025 with Claude 3.7 Sonnet, says extended thinking is not a switch to a different model with a separate strategy. It lets the same model give itself more time and effort on an answer.

{
  "usage": {
    "input_tokens": 75,
    "input_tokens_details": {
      "cached_tokens": 0
    },
    "output_tokens": 1186,
    "output_tokens_details": {
      "reasoning_tokens": 1024
    },
    "total_tokens": 1261
  }
}
Output tokens in OpenAI's usage exampleThe 1,186 output tokens in the guide's example, split. The gold bar is the reasoning count the guide shows. The other bar is 1,186 minus 1,024.
  • Reasoning tokens1,024
  • Everything else in the output162

Source: OpenAI Docs: Reasoning models (read November 6, 2026)

Four vendors, four ways to see the thinking

The idea is shared. The plumbing is not. Code written for one provider's reply format will not read another's, so check this table before you parse anything.

From OpenAI's reasoning guide, Anthropic's extended thinking cookbook (written for Claude Sonnet 5.5), the Gemini thinking cookbook and DeepSeek's R1 model card, all read on 6 November 2026.
Model familyHow it thinksWhat you can read
OpenAI, GPT-5 and GPT-6Reasoning tokens before the answer, steered by reasoning.effortA summary if you set reasoning.summary. The raw tokens never come back
Claude Sonnet 5.5Adaptive thinking: Claude decides how much to think, steered by output_config.effortThinking blocks whose text is empty unless display is summarized. The bill covers the full thinking either way
Gemini 4 ArgonThinking is always on, set with thinking_levelSummaries when thinking_summaries is auto. The usage object counts thought tokens
DeepSeek-R1Open weights under the MIT license, trained with reinforcement learning to write long chains of thoughtIts thinking is plain text at the start of the reply, inside think tags

Why more thinking helps, and where

Test-time compute is the computation a model spends while it answers, as opposed to while it trains. The paper Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters was posted in August 2024. It asked how much a hard prompt improves when a model gets a fixed amount of that compute. Its abstract does not name the models it tested, so read the figures below as a 2024 research result and not as a claim about today's models.

The answer depended on how hard the prompt was. Choosing the method per prompt made test-time compute more than four times as efficient as a best-of-N baseline, which samples N answers to the same prompt and keeps the best one. In a comparison that matched the compute, a smaller model with some success on a problem could beat a model 14 times larger by thinking longer.

DeepSeek's R1 model card, published on Hugging Face in January 2025, lets you compare two models of the same size. R1 is trained from DeepSeek-V3-Base through a pipeline of two reinforcement learning stages and two supervised fine-tuning stages, and like DeepSeek-V3 it has 671 billion parameters with 37 billion active. Its evaluation table lists them side by side. The before-and-after reading is this lesson's own, not the card's.

The gap is 40 points on AIME 2024, a hard competition-maths test. It is 7 points on MATH-500, where V3 already scored 90. The gain shrinks where the base model was already strong. Anthropic saw a similar curve inside one model. Accuracy on AIME 2024 questions rose logarithmically with the number of thinking tokens Claude 3.7 Sonnet was allowed.

DeepSeek-V3 against DeepSeek-R1, same sizePass@1 in percent from DeepSeek's own table, published in January 2025, with a 32,768-token generation limit. The gold bars are R1.
  • AIME 2024, V339.2%
  • AIME 2024, R179.8%
  • CNMO 2024, V343.2%
  • CNMO 2024, R178.8%
  • GPQA Diamond, V359.1%
  • GPQA Diamond, R171.5%
  • MATH-500, V390.2%
  • MATH-500, R197.3%

Source: Hugging Face: DeepSeek-R1 model card (read November 6, 2026)

Common mistakes

  • Estimating cost from the visible answer. Thinking is billed as output, so the text you read understates what a call costs.
  • Reading a summary as the model's full reasoning. OpenAI does not expose the raw tokens, and Anthropic notes that thinking text can include incorrect or half-baked thoughts. Chain of thought prompting covers how far shown reasoning can be trusted.
  • Asking for a summary on a model or account that does not offer one. OpenAI says to check the model documentation, and that summaries may need organization verification.
  • Carrying the DeepSeek table over to today's models. It is DeepSeek's own evaluation from January 2025. Use it to see the pattern, not to pick a model.

Try it yourself

  • Run the Python call at low and at high effort with a question that needs three or four steps, and write down both reasoning counts.
  • Ask the same question in a chat app with thinking off and then on, and note which answer you would send to a colleague.
  • Open the DeepSeek-R1 model card, read its evaluation table, and find a row where V3 scored below R1 and a row where it scored above.

Next: writing prompts a reasoning model likes

Once you can see the thinking, the next question is what to put in the prompt. The next lesson covers goals, constraints and output formats, and it starts from a prompt OpenAI wrote for a reasoning model.

Check yourself

  1. In OpenAI's usage example, 1,024 of 1,186 output tokens are reasoning tokens. What follows from that?

    Show answer

    B. Most of the billed output was thinking you never see The guide says reasoning tokens are hidden from the API and billed as output tokens, so they make up most of that output.

  2. Which usage field holds the reasoning token count on OpenAI's Responses API?

    Show answer

    C. output_tokens_details.reasoning_tokens The guide's usage object puts the count under output_tokens_details, next to the overall output_tokens figure.

  3. DeepSeek's model card compares V3 and R1, which have the same size. What does its table show on AIME 2024?

    Show answer

    D. R1 scored about twice as high The card lists 39.2 for V3 and 79.8 for R1, a gap of about 40 points.

  4. How does Anthropic describe extended thinking in its February 2025 post?

    Show answer

    A. The same model given more time and effort The post says extended thinking is not a switch to another model but the same model giving itself more time.

Frequently asked questions

What is a reasoning model in AI?

It is a language model that generates a stretch of thinking before its reply and writes the reply from that thinking. Each vendor has its own word for it: reasoning tokens at OpenAI, extended thinking at Anthropic, thinking at Google and a long chain of thought at DeepSeek.

How is a reasoning model different from a regular language model?

A regular model starts writing the answer right away. A reasoning model first generates thinking, which costs time and output tokens, and then writes the answer from it. OpenAI's best practices page describes reasoning models and GPT models as two types that behave differently, and Anthropic let one Claude model switch extended thinking on and off.

Do I pay for reasoning tokens?

Yes. OpenAI bills reasoning tokens as output tokens even though the API does not return them. Anthropic's cookbook says Claude bills the full thinking, not the shorter summary you get back, and counts it toward your rate limits.

Can I read the reasoning?

Sometimes, in a shortened form. OpenAI, Claude and Gemini return summaries when you ask for them. DeepSeek-R1 writes its thinking as plain text inside think tags, so you can read all of it when you run the model yourself.

What is test-time compute?

It is the compute a model uses at the moment it answers, rather than during training. Reasoning models turn it into thinking tokens, and the research paper cited above found that allocating it by prompt difficulty used it more than four times as efficiently as a best-of-N baseline.

Which DeepSeek-R1 model can I run on my own computer?

The card does not match sizes to hardware, so compare its two lists. The full R1 has 671 billion parameters. DeepSeek also released six distilled models from 1.5 billion to 70 billion, built on Qwen and Llama models. The card says they can be served like any Qwen or Llama model, for example with vLLM or SGLang. It notes that each distilled model derives from a base model with its own license.

Sources

  1. OpenAI Docs: Reasoning models (read November 6, 2026)https://developers.openai.com/api/docs/guides/reasoning
  2. OpenAI Docs: Reasoning best practices (read November 6, 2026)https://developers.openai.com/api/docs/guides/reasoning-best-practices
  3. Anthropic: Claude's extended thinking (read November 6, 2026)https://www.anthropic.com/news/visible-extended-thinking
  4. Anthropic on GitHub: Claude cookbooks, Extended Thinking (read November 6, 2026)https://github.com/anthropics/claude-cookbooks/blob/main/extended_thinking/extended_thinking.ipynb
  5. Google Gemini on GitHub: Get started with thinking (read November 6, 2026)https://github.com/google-gemini/cookbook/blob/main/quickstarts/Get_started_thinking.ipynb
  6. Hugging Face: DeepSeek-R1 model card (read November 6, 2026)https://huggingface.co/deepseek-ai/DeepSeek-R1
  7. Hugging Face Papers: Scaling LLM Test-Time Compute Optimally can be More Effective than Scaling Model Parameters (2024) (read November 6, 2026)https://huggingface.co/papers/2408.03314

Share this lesson

Find an agent that thinks before it acts

Mindket lists AI agents with setup notes you can read before you install one. Open a few and see how each is configured.

Browse AI agents

This lesson as Markdown · Reasoning models: when to use them and how to prompt them · All courses