DeepSeek-V4-Flash-0731
| Tier | Input | Output | Cached input |
|---|---|---|---|
PriorityLearn more | 32.4 | 97.2 | 8.1 |
FlexLearn more | 17.3 | 51.9 | 4.4 |
DeepSeek V4 Flash 0731 is the official release of V4 Flash, and it is the checkpoint where the series became genuinely agentic. Built on the same efficiency-first Mixture-of-Experts design — 284B total parameters with only 13B active per token and a one-million-token context window — it adds a substantially rebuilt agentic capability that lifts long-horizon coding, terminal automation, and tool-use scores far above the preview, in several cases past the much larger V4 Pro preview despite activating a fraction of its parameters. Reasoning effort is a per-request setting with three levels, and the checkpoint ships with a speculative decoding module for faster generation. Released under the MIT license, it is the model to reach for on DEVUP AI when an agent has to finish a long job, not just start one.

DeepSeek V4 Flash 0731
Overview
DeepSeek V4 Flash 0731 is the official release of DeepSeek V4 Flash. It keeps the efficiency-first design of the series — a Mixture-of-Experts model with 284B total parameters of which only 13B activate per token, and a one-million-token context window — and rebuilds what the model can do when it has to act rather than answer.
The gap over the preview checkpoint is not incremental. On long-horizon software engineering the resolve rate moves from single digits to over fifty percent. On terminal automation and security-oriented code tasks it improves by twenty to forty points. On most of these it now exceeds the far larger V4 Pro preview, which activates nearly four times as many parameters per token.
Two properties define how it is used in practice: reasoning effort is a per-request control with three levels, and the checkpoint ships with a speculative decoding module attached, which serving stacks use to generate faster without changing the output distribution.
At a Glance
| Field | Value |
|---|---|
| Model Type | Mixture-of-Experts transformer |
| Total Parameters | 284B |
| Activated Parameters | 13B per token |
| Context Window | 1,048,576 tokens (1M) |
| Precision | FP4 + FP8 mixed |
| Modality | Text in → text out |
| Reasoning | Three effort levels, separate reasoning_content field |
| Tool Calling | Supported |
| Speculative Decoding | Module included in the checkpoint |
| License | MIT |
Architecture
| Component | Detail |
|---|---|
| Sparsity | MoE — 284B total, 13B activated per token |
| Attention | Hybrid stack: Compressed Sparse Attention (CSA) + Heavily Compressed Attention (HCA) |
| Residual path | Manifold-Constrained Hyper-Connections (mHC) |
| Speculative decoding | Draft module attached to the same checkpoint |
| Precision | MoE expert weights in FP4; attention, normalization and router in FP8 |
Hybrid attention is what makes a million-token window usable rather than nominal. CSA and HCA together attack the two costs that normally make long-context inference impractical — per-token compute and KV cache size — bringing both down by roughly an order of magnitude at full context across the V4 series.
mHC strengthens the conventional residual connection, improving stability of signal propagation across layers without sacrificing expressivity. It is a training-stability property rather than a feature, but it is part of why a model this sparse stays coherent across very long inputs.
Speculative decoding is unusual here in that the draft weights live in the same checkpoint as the target model rather than in a separate smaller model. The practical effect is lower generation latency, which matters most on the long outputs this model produces at high reasoning effort.
Relationship to the Preview Checkpoint
This release supersedes the V4 Flash preview. Same architecture, same context window, same activated parameter count — a rebuilt agentic capability and a renamed reasoning-effort scale.
If you are currently calling the preview checkpoint, migration is a model ID change plus one
adjustment: the fastest reasoning level is now named low.
Reasoning Effort Levels
The most important operational decision when using this model.
| Level | Behaviour | Use it for |
|---|---|---|
low | Minimal deliberation, fast responses | Routine tasks, classification, extraction, formatting |
high | Explicit reasoning before answering | Complex problems, planning, code, analysis |
max | Reasoning pushed to its fullest extent | Long-horizon agent work, the hardest problems |
DeepSeek evaluates the agentic benchmarks below at the max level. If you are building
an agent that must complete a long task rather than answer a question, that is the level the
published results describe.
Selecting a level
DEVUP AI forwards the complete request body upstream without stripping unknown fields, so reasoning effort can be passed directly in your payload:
{
"model": "deepseek-ai/DeepSeek-V4-Flash-0731",
"messages": [{ "role": "user", "content": "Fix the failing test in this repository." }],
"reasoning_effort": "max",
"temperature": 1.0,
"top_p": 0.95
}Capabilities
| Capability | Value |
|---|---|
input_types | text |
output_types | text |
image_input | Not supported |
context_window | 1048576 |
reasoning | Native — low, high, max |
reasoning_field | reasoning_content — separate from content |
streaming | Supported |
tool_calling | Supported |
requires_prompt | Yes — text prompt required |
Recommended Use Cases
- Long-horizon coding agents — the capability this release was built for. Tasks that span many turns, many files, and many failed attempts before succeeding.
- Terminal and infrastructure automation — planning a sequence of commands, reading the output, and recovering from errors without a human in the loop.
- Full-stack development assistance — generating and wiring code across layers rather than producing isolated snippets.
- Tool-heavy workflows — orchestrating many tools across a long trajectory, where the failure mode is losing the thread rather than formatting a call incorrectly.
- Whole-repository and whole-corpus analysis — the context window holds a codebase, a contract set, or a long log archive without a retrieval layer in front of it.
- High-throughput production traffic — 13B activated parameters plus speculative decoding is what makes this viable as a default rather than an escalation tier.
Using DeepSeek V4 Flash 0731 on DEVUP AI
Base URL: https://api.devupai.com/v1 · Model ID: deepseek-ai/DeepSeek-V4-Flash-0731
Quick start — cURL
curl https://api.devupai.com/v1/chat/completions \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-ai/DeepSeek-V4-Flash-0731",
"messages": [
{
"role": "user",
"content": "Two services write to the same row without a transaction. Walk through the failure modes in order of likelihood and propose the smallest fix for each."
}
],
"reasoning_effort": "high",
"temperature": 1.0,
"top_p": 1.0,
"max_tokens": 32768
}'Node.js — DEVUP AI SDK
npm install devupaiimport DevupAI from "devupai";
const client = new DevupAI({
apiKey: process.env.DEVUP_API_KEY,
});
const response = await client.chat.completions.create({
model: "deepseek-ai/DeepSeek-V4-Flash-0731",
messages: [
{
role: "system",
content:
"You are a staff engineer reviewing a migration. Report only defects that would " +
"cause data loss or downtime, each with a severity and the smallest safe fix.",
},
{ role: "user", content: migrationPlan },
],
reasoning_effort: "high",
temperature: 1.0,
top_p: 1.0,
max_tokens: 32768,
});
console.log(response.choices[0].message.content);Agent loop — Python
The agentic scenario this release targets. Note top_p: 0.95 and reasoning_effort: "max",
which are the settings DeepSeek uses for its own agent evaluations.
import os
import json
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEVUP_API_KEY"],
base_url="https://api.devupai.com/v1",
)
TOOLS = [
{
"type": "function",
"function": {
"name": "read_file",
"description": "Return the contents of a file at a repository-relative path.",
"parameters": {
"type": "object",
"properties": {"path": {"type": "string"}},
"required": ["path"],
},
},
},
{
"type": "function",
"function": {
"name": "run_tests",
"description": "Run the test suite and return pass/fail counts with failure output.",
"parameters": {"type": "object", "properties": {}},
},
},
]
def read_file(path: str) -> dict:
"""Replace with your real, sandboxed file access."""
raise NotImplementedError
def run_tests() -> dict:
"""Replace with your real, sandboxed test runner."""
raise NotImplementedError
HANDLERS = {"read_file": read_file, "run_tests": run_tests}
messages = [{"role": "user", "content": "The invoice rounding test is failing. Find the cause and fix it."}]
for _ in range(30): # bounded loop — never let an agent iterate without a ceiling
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash-0731",
messages=messages,
tools=TOOLS,
reasoning_effort="max",
temperature=1.0,
top_p=0.95,
max_tokens=32768,
)
message = response.choices[0].message
messages.append(message)
if not message.tool_calls:
print(message.content)
break
for call in message.tool_calls:
handler = HANDLERS.get(call.function.name)
if handler is None:
result = {"error": "unknown_tool", "name": call.function.name}
else:
try:
result = handler(**json.loads(call.function.arguments or "{}"))
except Exception as exc: # surface the failure to the model, do not crash
result = {"error": type(exc).__name__, "detail": str(exc)}
messages.append(
{
"role": "tool",
"tool_call_id": call.id,
"content": json.dumps(result),
}
)
else:
print("Agent loop exceeded its iteration limit.")Returning a structured error to the model rather than raising is deliberate. This checkpoint was trained on trajectories where actions fail and the agent recovers, so a described failure is information it can use.
Reading the reasoning trace
Reasoning arrives in a separate field, not inline in the answer. Read it explicitly, and null-check it — not every model on the platform populates it.
message = response.choices[0].message
reasoning = getattr(message, "reasoning_content", None)
if reasoning:
# Log it, do not show it. Reasoning traces are intermediate, not conclusions.
logger.debug("trace length: %d chars", len(reasoning))
print(message.content)Never concatenate reasoning_content into content before parsing or display. Doing so
breaks JSON parsing on structured-output paths and shows users an unpolished draft of an
answer they never asked to see.
Streaming with usage
stream = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash-0731",
messages=[{"role": "user", "content": "Design a retry policy for a webhook delivery system."}],
reasoning_effort="high",
temperature=1.0,
top_p=1.0,
max_tokens=32768,
stream=True,
stream_options={"include_usage": True},
)
for chunk in stream:
if chunk.choices and chunk.choices[0].delta.content:
print(chunk.choices[0].delta.content, end="", flush=True)
if chunk.usage:
print(f"\n\nTokens — in: {chunk.usage.prompt_tokens}, out: {chunk.usage.completion_tokens}")Setting stream_options.include_usage returns a final chunk carrying token counts. At high
and max effort the trace can dominate the output budget, and this is the only way to see it.
Delegating access with a scoped JWT
Long-horizon agents run unattended, which is exactly when an unbounded loop becomes expensive. Issue a token restricted to this model with an expiry and a spending limit instead of sharing your API key:
curl -X POST "https://api.devupai.com/v1/scoped-jwt" \
-H "Authorization: Bearer $DEVUP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"api_key_name": "auto",
"models": ["deepseek-ai/DeepSeek-V4-Flash-0731"],
"expires_delta": 7200,
"spending_limit": 500
}'The returned token is used exactly like an API key in the Authorization header. Requests for
any other model, or past the expiry or spending limit, are rejected — a hard ceiling on what a
runaway agent loop can consume.
Recommended Generation Parameters
| Parameter | Value |
|---|---|
temperature | 1.0 |
top_p | 0.95 for agentic scenarios, 1.0 otherwise |
max_tokens | Large — see below |
DeepSeek recommends allowing up to 384K output tokens at the high and max effort
levels. Truncating a reasoning model mid-trace yields an unfinished, unusable response rather
than a shorter one, so size max_tokens to the effort level you selected, not to the answer
you expect.
Benchmark Results
As reported by DeepSeek, evaluated at the max reasoning effort level with
temperature = 1.0, top_p = 0.95. The comparison columns are the checkpoint this release
supersedes and the larger V4 Pro preview.
| Benchmark | This release | V4 Flash (preview) | V4 Pro (preview) |
|---|---|---|---|
| Terminal-Bench 2.1 | 82.7 | 61.8 | 72.1 |
| NL2Repo | 54.2 | 39.4 | 38.5 |
| Cybergym | 76.7 | 38.7 | 52.7 |
| DeepSWE | 54.4 | 7.3 | 12.8 |
| Toolathlon-Verified | 70.3 | 49.7 | 55.9 |
| Agents' Last Exam | 25.2 | 15.8 | 16.5 |
| AutomationBench Public | 25.1 | 10.8 | 12.8 |
| DSBench-FullStack | 68.7 | 37.0 | 41.8 |
| DSBench-Hard | 59.6 | 25.8 | 31.1 |
DSBench-FullStack and DSBench-Hard are DeepSeek's internal test sets for full-stack development and difficult coding-agent problems respectively. DeepSeek also publishes comparisons against leading proprietary models, which are not reproduced here.
The DeepSWE row is worth reading twice: 7.3 to 54.4 on the same architecture at the same size. Long-horizon software engineering is where this release changed, and it is where the model should be pointed.
Best Practices
- Set
reasoning_effortdeliberately, per request. It is the highest-impact parameter on this model, and no single value is right for every path in an application. - Use
maxfor agent work. The published agentic results describe that level; running an agent atlowis not a cheaper version of the same behaviour. - Set
top_pto 0.95 in agentic scenarios, 1.0 elsewhere. This is a documented split, not a preference. - Budget output tokens generously at
highandmax. A truncated reasoning model returns nothing useful. - Read
reasoning_contentas a separate field. Do not merge it intocontent, and null-check it — other models on the platform leave it empty. - Return tool errors as data. This checkpoint was trained to recover from failed actions, so a described failure is more useful than a raised exception.
- Bound every agent loop with an iteration ceiling and a scoped token.
- Use the context window instead of building retrieval where the corpus fits.
Limitations
- Text only. No image, audio, or document input.
loweffort is a different capability tier, not merely a faster one. Treat the levels as distinct configurations rather than a speed dial.- Reasoning traces are not conclusions. Content in
reasoning_contentmay be unpolished or contradict the final answer. - Agentic gains do not imply knowledge gains. This release rebuilt long-horizon action; factual recall is a separate axis and is not what changed.
- Not a safety layer. Apply your own moderation and validation before acting on model output in a production system.