DeepSeek Thinking Mode Guide: Reasoning Effort and Routing
Answer in brief
For deepseek, use thinking for thinking mode, reasoning_effort for reasoning effort, stream for streaming, and max_tokens for the generated-output cap. The current official documentation lists model IDs; use only the IDs in the evidence table and recheck them before release. See the official documentation; verification date: 2026-08-20.
Key facts at a glance
| Product / model | Current ID or version | Use case | Evidence |
|---|---|---|---|
| deepseek | Official source does not specify a selectable model ID | Confirm the current product surface | Official source |
Failure modes and verification
| Failure mode | Verification action |
|---|---|
| Stale model or version reference | Compare the model name and ID with the official source before release. |
| Unstructured or incomplete output | Validate the response against the documented contract and a deterministic fixture. |
| Unverified factual claim | Keep the claim qualified or remove the claim when the official source does not support it. |
FAQ
How do thinking and reasoning_effort differ?
thinking.type selects thinking or non-thinking behavior. reasoning_effort requests the reasoning level used when thinking mode is active. See the Thinking Mode guide.
How should a client consume streaming thinking output?
Set stream to true, collect delta.reasoning_content separately from delta.content, and handle data: [DONE]. Use stream_options with include_usage when the final usage chunk is required. See the Chat Completions API.
What does max_tokens limit, and how is usage measured?
max_tokens limits generated completion tokens. Inspect usage, including prompt_tokens, completion_tokens, total_tokens, and, when returned, completion_tokens_details.reasoning_tokens. The exact numeric context limit is not specified in this entry. See Token & Token Usage.
What is the routing rule when no selectable model ID is published?
The current official documentation lists model IDs; use only the IDs in the evidence table and recheck them before release. Select the documented API surface and endpoint, do not invent a model value, and treat undocumented fallback or internal routing behavior as unspecified. Start with the official documentation.
What must be preserved across tool-call turns?
When a thinking-mode turn performs a tool call, preserve and return the generated reasoning_content in every subsequent request for that interaction, together with the relevant assistant message fields. See the Thinking Mode guide.
Sources and freshness
- Official source
- Last verified: 2026-08-22
Extended guide
Direct answer
For the product deepseek, use thinking to switch thinking mode, reasoning_effort to request a reasoning level, stream to choose incremental delivery, and max_tokens to cap generated completion tokens. The current official documentation lists model IDs; use only the IDs in the evidence table and recheck them before release. Treat routing as a documented API-surface decision, such as an OpenAI-compatible or Anthropic-compatible endpoint, not as permission to invent a model name. The official DeepSeek documentation is the authority for the Thinking Mode guide, Chat Completions API, and Token & Token Usage guide. Verification date: 2026-08-20.
Control map
| Concern | Official control or field | Operational meaning |
|---|---|---|
| Mode | thinking.type = enabled or disabled |
Selects thinking or non-thinking behavior; the guide documents thinking as enabled by default. |
| Effort | reasoning_effort |
Requests low, high, or max; the documented default is high. |
| Delivery | stream |
With true, returns partial message deltas as data-only SSE and ends with data: [DONE]. |
| Budget | max_tokens |
Caps generated completion tokens; input plus generated tokens must fit the context length. |
| Accounting | usage, completion_tokens_details.reasoning_tokens |
Reports prompt, completion, total, and reasoning-token fields when returned. |
| Routing | base_url, request format, and response metadata |
The official source does not specify an internal routing algorithm, fallback policy, or selectable model ID for this product. |
Numbered operating steps
-
Choose the API surface. Use the OpenAI-compatible base URL
https://api.deepseek.com, or use the Anthropic-compatible base URLhttps://api.deepseek.com/anthropicwhen that client format is required. Keep the message schema and parameter placement consistent with the selected format. Do not add a guessedmodelvalue; the current official documentation lists model IDs for this product. -
Set the mode explicitly when reproducibility matters. For OpenAI-format calls, send
thinkingwithtypeset toenabledordisabled. When using the OpenAI SDK, the official guide placesthinkinginsideextra_body;reasoning_effortremains a request parameter. Do not treat a higher effort as a largermax_tokensvalue: effort and output cap are separate controls. -
Choose delivery behavior. Set
streamtotruefor incremental output. Accumulatedelta.reasoning_contentseparately fromdelta.content, because thinking-mode reasoning and the final answer are distinct fields. If a complete response is easier to process, leave streaming disabled and read the final message fields. Whenstream_optionsincludesinclude_usage, the API sends an additional usage chunk beforedata: [DONE]; itschoicesfield is empty, while other streamed chunks can contain a nullusagefield. -
Set and inspect the budget. Use
max_tokensas a ceiling for generated completion tokens. The API states that prompt tokens plus generated tokens are constrained by context length. After completion, inspectusage, includingprompt_tokens,completion_tokens,total_tokens, and, when present,completion_tokens_details.reasoning_tokens. The token guide says actual counts depend on tokenization, so estimates are not usage records. The exact numeric context limit and defaultmax_tokensvalue are not specified in this entry. -
Preserve conversation state. In ordinary thinking-mode turns without tool calls, prior
reasoning_contentdoes not need to be concatenated into the next context. If a thinking-mode turn performs a tool call, pass the generatedreasoning_contentback in every subsequent request for that interaction. Preservecontent,reasoning_content, andtool_callstogether. The official guide warns that omitting required reasoning state can cause the API to reject the request.
Streaming checklist
-
thinking.typeandreasoning_effortmatch the intended behavior. -
stream_optionsis used only withstream: true. -
include_usageis enabled when the final streamed usage chunk is needed. -
reasoning_contentandcontentare handled separately. -
finish_reasonandusageare checked before declaring success. - Routing assumptions are limited to documented endpoints and returned metadata.
- No invented model ID is stored in configuration.
For change control, record the verification date and recheck the official documentation before relying on any undocumented routing rule, context limit, default, or future model identifier.
Evidence refresh
The model and feature records below are rechecked against the linked official sources. If availability changes, update this table and the verification date together.
| Product / model | Current ID or version | Use / caution | Evidence |
|---|---|---|---|
| DeepSeek DeepSeek V4 Flash | deepseek-v4-flash |
general-purpose chat and lower-latency workloads | Official source |
| DeepSeek DeepSeek V4 Pro | deepseek-v4-pro |
reasoning and higher-capability workloads | Official source |
| DeepSeek DeepSeek V4 Flash Vision Experimental | deepseek-v4-flash-vision-exp |
experimental image-input workloads | Official source |
Sources
- Official source
- Official source
- Official source
- Official source
- Last verified: 2026-08-22
Evidence and freshness
Last verified:
Primary sources
- api-docs.deepseek.com
- api-docs.deepseek.com
- api.deepseek.com
- api-docs.deepseek.com
- api-docs.deepseek.com
- api.deepseek.com
Verified model records
- DeepSeek · DeepSeek V4 Flash · deepseek-v4-flash — general-purpose chat and lower-latency workloads
- DeepSeek · DeepSeek V4 Pro · deepseek-v4-pro — reasoning and higher-capability workloads
- DeepSeek · DeepSeek V4 Flash Vision Experimental · deepseek-v4-flash-vision-exp — experimental image-input workloads