Agent tasks with DeepSeek-V4-Flash should explicitly select the low/high/max thinking level and pass reasoning_content back unchanged across tool-call turns; otherwise, the API may return a 400 error or lose the continuity of its reasoning state.
Suitable tasks: code agents; retrieval/execution loops that require function calls; and long-running tasks that need to balance cost and latency.
Unsuitable tasks: workflows that require image or audio input; both the official update and empirical materials describe V4-Flash as a text model.
Applicable model version: deepseek-v4-flash, especially for the 2026-07-31 0731 API update.
Applicable client, agent, or API: DeepSeek OpenAI-compatible Chat Completions; tool-call loops.
Recommended reasoning levels and parameters: low for simple tasks; high for everyday agents; and max for complex tasks. In thinking mode, do not rely on temperature, top_p, presence_penalty, or frequency_penalty; the official documentation says these parameters have no effect.
The following is a minimal configuration template adapted for V4-Flash from the official parameter table. Field names and status mappings follow the official definitions; the model name has been changed from Pro in the documentation example to the model used in this directory:
from openai import OpenAI
client = OpenAI(
api_key="<DeepSeek API Key>",
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "user", "content": "Check the input first, call any necessary tools, and finally provide a verifiable conclusion."}
],
reasoning_effort="high", # low / high / max
extra_body={"thinking": {"type": "enabled"}},
)
print(response.choices[0].message.content)The corresponding approach in the official Responses API is reasoning.effort="none" | "low" | "high" | "max"; none disables thinking. In the OpenAI format, the thinking switch must be placed in extra_body.
Start a request with model="deepseek-v4-flash", choosing reasoning_effort according to the task's complexity.
When tools are needed, retain the complete assistant message from the previous turn in subsequent requests instead of retaining only content.
Read tool_calls, execute the local tools, and append each result to messages with role="tool" and the corresponding tool_call_id.
Continue requesting until there are no new tool_calls; in the end, return only content as the user's answer.
Validate external data separately for important tasks; the model level controls reasoning investment but does not replace verification of tool results.
The official update page says that V4-Flash 0731 is a public beta with the same model architecture and size as V4-Flash-Preview, but with post-training performed again; the official Agent results include Terminal Bench 2.1 82.7, DeepSWE 54.4, Toolathlon Verified 70.3, and Automation Bench Public 25.1.
The same update page specifies the official harness conditions: DeepSeek Harness minimal mode, max effort, top_p=0.95, and temperature=1.0; these are official test conditions and should not be treated directly as default values for arbitrary clients.
The thinking-mode documentation explicitly states that the requested-effort mappings for V4-Flash and V4-Pro are low→low, medium→high, high→high, xhigh→high, and max→max; thinking is enabled by default, with the default effective level set to high.
During tool calls, the official documentation warns that if the complete reasoning_content is not passed back, the API will return 400; in ordinary multi-turn conversations without tools, the previous turn's reasoning_content does not need to be appended back.
medium and xhigh do not produce separate effective levels with the same names on V4-Flash; both map to high. Use max when the greatest reasoning investment is needed.
Thinking mode does not support tuning randomness with sampling parameters; the documentation says these parameters have no effect even if they are accepted.
The documentation examples include visible reasoning_content; here, it is treated only as an API state field and should not be treated as a reliable fact about the model's internal reasoning or shown directly to end users.
The 0731 benchmarks use the official harness; different agent orchestration, tool descriptions, and context-compression strategies may change the results.
The key original wording on the official update page is “DeepSeek-V4-Flash-0731 keeps the same model architecture and size ... and was only re-post-trained”; the thinking-mode page also requires that after a tool request, “reasoning_content must be fully passed back”.
DeepSeek V4 Flash