Skip to main content
All guides
How models work

DeepSeek R1 reasoning explained

What 'reasoning' means in R1, why it streams reasoning_content separately, and how to actually use it in an app.

Last updated June 25, 2026

What R1 actually is

DeepSeek-R1 is a family of models trained with reinforcement learning to spend inference-time compute 'thinking' before answering. Unlike a normal chat model that emits final tokens directly, R1 first generates a long internal monologue — the chain-of-thought — and only then produces the user-facing answer. The extra compute is not free; it shows up as latency and as tokens on the bill.

reasoning_content vs content

On the API, streamed chunks include two fields: reasoning_content (the model's internal thinking) and content (the final answer). Naive clients that only read content will see empty deltas for many seconds, then a burst at the end. Always render both, or at least a 'thinking…' state driven by reasoning_content. The reasoning text is often technical and repetitive, so you do not have to show it verbatim; a summary spinner is enough.

When it helps

  • Multi-step math and logic puzzles where a single leap is not enough.
  • Long-horizon planning such as agent task decomposition and project scoping.
  • Complex code where the right approach isn't obvious from the first token.
  • Debugging subtle failures where the model needs to trace cause and effect.

When it hurts

  • Latency-sensitive chat — R1 can take 10-30s per response.
  • Cheap one-off classification — you pay for thousands of thinking tokens that don't help.
  • Anything the base chat model already answers correctly.
  • Simple translation, summarization, or formatting tasks.

Production wiring tips

  • Show a 'thinking' indicator driven by reasoning_content deltas so users don't think the app hung.
  • Set client timeouts to 60s — R1 can legitimately take that long.
  • Log reasoning_content for offline debugging, but strip it from user-facing storage if privacy matters.
  • Cache aggressively; a 30-second cold call becomes an instant reply on cache hit.

How reasoning affects pricing

Reasoning models bill for every token they emit, including the hidden chain-of-thought. A single R1 call can easily emit 5K–20K reasoning tokens before the final answer. At DeepSeek's output rates this is still far cheaper than o1, but it is not negligible. Always estimate with reasoning tokens included, or you will be surprised by the first invoice. A good rule of thumb is to budget 3×-5× the output tokens you would expect from a non-reasoning model on the same task.

API parameters and constraints

R1 supports the standard chat-completions parameters: temperature, max_tokens, top_p, and tools. One important constraint is that system prompts behave slightly differently; some users see better reasoning when the system prompt is short and the user message carries the full instruction. Temperature below 0.3 usually gives more deterministic reasoning; above 0.7 can produce creative but less reliable chains. max_tokens caps the total output, including reasoning, so set it high enough that the final answer is not truncated.

UI patterns users expect

Users tolerate long waits if they see progress. The best R1 interfaces show a 'thinking' panel that streams the reasoning summary, then replace it with the final answer. Another pattern is to expose the reasoning on demand with a collapsible section, which is useful for education and debugging. Never leave the screen blank for more than a few seconds. If you cannot show reasoning, show elapsed time and a progress indicator.

Common pitfalls and how to avoid them

  • Parsing only content and timing out before reasoning_content starts — read both streams.
  • Storing raw reasoning logs in analytics without scrubbing PII — treat them like user prompts.
  • Using R1 for trivial yes/no tasks — route those to deepseek-chat instead.
  • Assuming R1 output is always correct — it can reason beautifully and still be wrong; add verification steps.

Distilled models: R1 on smaller weights

DeepSeek released distilled versions of R1 based on Llama and Qwen that are small enough to run locally. These are not as capable as the full R1, but they are dramatically cheaper and faster. They are ideal for prototyping, offline use, and edge deployments. The distilled weights are available on Hugging Face, and the smaller variants can run on consumer GPUs with tools like Ollama or vLLM.

R1 and multi-modal inputs

The hosted R1 is primarily text-in/text-out. It does not natively accept images or audio in the way GPT-4o does. If your task requires vision or audio, you need a separate model or a preprocessing step. This is a real architectural limitation, so do not plan a multi-modal product around R1 unless DeepSeek announces multi-modal support.

Evaluating R1 on your own tasks

Run a small A/B test: use the same prompt on chat and reasoner, then judge the outputs on correctness and usefulness. Track latency and cost. Many teams find that R1 wins on hard tasks but loses on easy ones, so the best system routes by task type. Keep a scorecard and revisit it monthly because model capabilities change.

Reasoning transparency vs. safety

Showing the full chain-of-thought can help users trust the answer and debug failures. It can also leak internal details or produce misleading authority. Decide per-product whether to show reasoning, summarize it, or hide it entirely. If you log reasoning for debugging, apply the same retention and access controls as user messages.

R1 and long-context tasks

R1 can use DeepSeek's 64K context window, but reasoning on very long documents is slower and more expensive than with chat. The model must read the entire context, think about it, and then answer. For long documents, consider chunking: ask R1 to summarize each chunk with chat, then ask R1 to synthesize the summaries. This two-stage approach preserves reasoning quality while keeping token costs manageable. It is the same pattern that works well with any long-context model.

Reading the hidden reasoning trace

The reasoning_content stream is not meant to be pretty. It contains false starts, re-derivations, and self-corrections in the model's own voice. Two patterns work well in production. The first is a live 'thinking' panel that streams reasoning_content as it arrives, then collapses into a summary once content starts. The second is an on-demand disclosure: show only the final answer, but expose a 'show reasoning' toggle for power users. Never treat the reasoning trace as a source of truth; it is diagnostic material. Also strip PII before storing it, because the model often quotes user input verbatim while thinking, and the trace inherits the same sensitivity as the prompt itself.

Cost implications of long CoT

Reasoning tokens are output tokens and carry the full output rate. A single hard problem can emit 20K reasoning tokens, which at DeepSeek's rates costs roughly $0.006 per call. That is still cheap next to o1, but it multiplies fast in agent loops that call R1 many times per user session. Three tactics contain the cost. Cap max_tokens generously enough to fit reasoning + answer but tight enough to prevent runaways. Route obviously easy sub-tasks to chat inside the same agent. And cache the final answer aggressively, so repeat questions do not re-pay the reasoning tax. Track reasoning tokens as a separate metric from content tokens; without that split you cannot tell whether cost regressions are coming from longer answers or longer thinking.

When R1 beats chat

R1 wins clearly on tasks where the first plausible answer is often wrong: constraint satisfaction problems, multi-step arithmetic on messy data, legal or contractual reasoning with exceptions, and any planning task where a bad plan wastes downstream compute. On these, R1's extra thinking time recovers value that chat would burn in retries. R1 loses on latency-sensitive UX, cheap classification, formatting, and pure recall. The practical rule is: if a competent human would want to think for more than a few seconds, R1 is worth trying. If the answer is obvious to a human within a second, chat is enough. Route by task type in production; do not send every request to the more expensive model out of habit.

FAQ

Is R1 open-weight?
The base R1 weights are open under a permissive license, alongside several distilled variants of Llama/Qwen trained on R1 output.
Do I pay for the thinking tokens?
Yes — reasoning_content counts toward output token billing.
Can I hide reasoning_content from users?
Yes. The API returns it separately, so you can log it for debugging and only display the final content field.
When should I use R1 instead of deepseek-chat?
Use R1 for multi-step math, planning, complex debugging, and any task where a few seconds of thinking noticeably improves accuracy. Use chat for everything else.
Does R1 support tool calling?
Yes, with the same tools parameter as the chat endpoint. Complex tool chains may require extra validation because reasoning can wander before finalizing the tool call.
How long does R1 take?
Common tasks finish in 5-15 seconds, but hard reasoning tasks can take 30-60 seconds. Set your client timeout accordingly.
Can I run R1 locally?
Yes, via the distilled variants or the full weights if you have enough GPU memory. The smaller distilled models are practical on consumer hardware.
Is R1 output always correct?
No. R1 is better at reasoning but still hallucinates and can produce plausible-sounding wrong answers. Always verify critical outputs.

Related on this site

Related services in the .health network

Keep reading

Also in the .health network