V3.2 integrates thinking directly into tool use. Multi-turn tool requests must fully pass back the previous turn's reasoning_content; otherwise, the API may return an error or lose the reasoning state. The thinking mode should not be configured with temperature/top_p.
Suitable tasks: Agents that need multi-step retrieval, function calls, code/data tools, and state across turns.
Unsuitable tasks: Tasks that require Speciale to call tools; the official release notes described Speciale at the time as API-only with no tool use. It is also unsuitable to treat reasoning_content as text for public explanations.
Applicable model versions: The specific alias for deepseek-chat/V3.2 API should follow the current docs; V3.2-Speciale is a separate variant with a temporary endpoint at release and no tool support.
Applicable clients, Agents, or APIs: OpenAI-compatible Chat Completions; the OpenAI SDK can pass thinking through extra_body.
Recommended reasoning level and parameters: Thinking is enabled by default, with a default level of high; explicitly pass reasoning_effort=low/high/max (the current documentation mapping needs to be checked) and extra_body={"thinking":{"type":"enabled"}}. In thinking mode, temperature/top_p/presence_penalty/frequency_penalty have no effect.
from openai import OpenAI
import json
client = OpenAI(
api_key="<DEEPSEEK_API_KEY>",
base_url="https://api.deepseek.com"
)
tools = [{
"type": "function",
"function": {
"name": "search_docs",
"description": "Search approved documents and return source IDs. Never invent results.",
"parameters": {
"type": "object",
"properties": {"query": {"type": "string"}},
"required": ["query"]
}
}
}]
messages = [{
"role": "user",
"content": "Find materials related to <topic>. Attach a source_id to every conclusion; if nothing is found, explicitly say so."
}]
while True:
response = client.chat.completions.create(
model="deepseek-v3.2",
messages=messages,
tools=tools,
reasoning_effort="high",
extra_body={"thinking": {"type": "enabled"}},
)
assistant = response.choices[0].message
# Official requirement: preserve content, reasoning_content, and tool_calls together
messages.append(assistant)
if not assistant.tool_calls:
print(assistant.content)
break
for call in assistant.tool_calls:
args = json.loads(call.function.arguments)
result = run_approved_tool(call.function.name, args)
messages.append({
"role": "tool",
"tool_call_id": call.id,
"content": result,
})Validate the preservation and return of reasoning_content with two sets of tasks, one without tools and one with tools; on the tool path, append the complete assistant message unchanged.
Fix reasoning_effort, then run low/high/max separately; do not tune temperature/top_p at the same time.
Record the reasoning tokens, tool calls, errors, final answer, and total cost for each sub-turn.
Validate tool names, parameters, permissions, and result sources on the server; do not display reasoning_content directly to end users.
DeepSeek's release notes say V3.2 is the first model to integrate thinking directly into tool use, and that it supports both thinking and non-thinking tool modes.
The official thinking documentation states that requests with tools must fully pass back reasoning_content in all subsequent requests; otherwise, the API returns 400.
The official documentation says thinking mode does not support temperature, top_p, presence_penalty, or frequency_penalty; even if a compatible interface does not return an error, these settings have no effect.
The official release notes say Speciale targets the highest level of reasoning, is API-only, and had no tool use at the time; do not copy the regular V3.2 tool code for Speciale.
The current docs page includes examples for later models and effort mappings. Production deployments must confirm the current V3.2 alias and endpoint rather than copying other model names from the page.
“Default high” and the effort mapping may change with the API version; pin a model snapshot and record response metadata.
reasoning_content is part of the model's internal reasoning context. Saving it is required by the API state protocol and does not mean exposing chain-of-thought to users.
The tool loop must have a maximum number of sub-turns, a timeout, duplicate-call detection, and a budget to prevent the model from calling tools indefinitely.
DeepSeek's key official requirement is: when tool calls are used, reasoning_content must be fully passed back (compliance short quote).
DeepSeek V3.2