Your coding agents don't need a premium closed model for every step. Some requests need hard reasoning. Many others are repo scans, issue summaries, test-log triage, or low-risk codebase Q&A.
DeepSeek V4 Flash 0731 matters because it gives teams a cheaper long-context lane to evaluate before every request goes to the most expensive model.
Routing premise: Test Flash 0731 on routine and agentic coding steps, Pro on harder knowledge-heavy work, and a premium closed model on the failures that remain. Keep every lane on the same task pack.
DeepSeek-V4-Pro is a 1.6 trillion parameter mixture-of-experts (MoE) model with about 49 billion active parameters per token. DeepSeek-V4-Flash has a 284 billion parameter core with 13 billion active parameters. Both are open-weight, MIT-licensed, and advertised with a 1 million token context window across official DeepSeek services.[1][2]
The release doesn't prove that every company should self-host V4. It changes the baseline question. Instead of asking, "Which closed model should handle this?", engineering teams can ask, "Which requests belong on Flash, which need Pro, and which still need a premium closed model?"
What changed in Flash 0731
DeepSeek released deepseek-ai/DeepSeek-V4-Flash-0731 on July 31, 2026. Its changelog says the architecture and core size did not change from Flash Preview. The update is post-training, aimed at stronger agent behavior. Hosted callers keep the API name deepseek-v4-flash; self-hosters can pin the exact 0731 checkpoint.[3][4]
| Property | Flash 0731 |
|---|---|
| Core size | 284B total, 13B active per token[5] |
| Released artifact | Hugging Face reports about 304B parameters; 0731 has an attached DSpark speculative-decoding module[4][6] |
| Context | 1M-token total context; API output cap is 384K within that window[7][8] |
| Input | Text only; official Codex metadata lists text input, and Anthropic compatibility rejects image and document blocks[9][10] |
| Modes | Non-thinking plus low, high, and max reasoning effort[9] |
| Serving | Official Transformers, vLLM, and SGLang recipes; FP4 experts, mostly FP8 remaining weights, optional DSpark speculative decoding[4][5] |
| License | MIT[4] |
The 284B and 304B figures aren't two different base models. DeepSeek describes DSpark as the same checkpoint with an additional speculative module. Use 284B/13B for core model architecture and treat the full 0731 artifact as its own storage and serving object.[4][6][5]
The core has 43 Transformer layers, 256 routed experts plus one shared expert in each MoE block, and six routed experts selected per token. Total parameters describe stored capacity; active parameters describe the sparse path. For the underlying architecture, see mixture-of-experts architecture.[5]
Why 1M context isn't just a bigger number
A long context window is useful only if the model can afford to keep using it.
During generation, the server keeps a KV cache: saved attention keys and values from prior tokens. That cache lets the model avoid recomputing the whole prefix for every new token, but it grows with context length. At hundreds of thousands of tokens, memory and bandwidth can dominate the system.
Coding agents are exactly the kind of workload that stresses this. A useful agent may carry instructions, file contents, stack traces, tool results, failed patches, test logs, and prior decisions. If long context is too expensive, the product falls back to aggressive truncation, summaries, or retrieval before the model has seen enough raw evidence.
Hybrid attention claim
DeepSeek V4's technical pitch is hybrid attention. The report describes Compressed Sparse Attention (CSA) and Heavily Compressed Attention (HCA), and reports that Flash at 1M context uses 10% of DeepSeek-V3.2's single-token inference FLOPs and 7% of its KV cache.[5]
That's the center of the release. The world already had long-context models. The harder problem is making long context cheap enough for agents that keep running.

Coding benchmarks are promising, not decisive
DeepSeek positions Flash 0731 directly at coding agents. Official integrations cover Codex, Claude Code, OpenClaw, and OpenCode.[9][11]
The 0731 model card reports 82.7 on Terminal-Bench 2.1, 54.2 on NL2Repo, 54.4 on DeepSWE, and 70.3 on Toolathlon-Verified. Its comparison table reports GLM-5.2 at 81.0, 48.9, 46.2, and 59.9 on those same rows. GLM-5.2 is a different kind of heavyweight: Z.AI labels it 744B total and about 40B active, while its Hugging Face checkpoint metadata counts about 753B. GLM-5.2 also has MIT-licensed weights, text-only input, and a 1M context window.[4][12][13][14]
Treat those as vendor-reported numbers, not deployment proof. Public code-agent rows used DeepSeek's unreleased minimal harness at max reasoning effort, and two DSBench rows use internal datasets. A coding team still needs workload-local evals: real repos, real issue types, real tests, real latency limits, and clear failure categories. Put Flash 0731, GLM-5.2, and one premium closed model through the same task pack before changing routing.[4]
Benchmark caveat: Vendor-reported coding scores are screening evidence, not routing evidence. Use the same tasks, retries, tool limits, and acceptance tests across each model before moving traffic.
API migration: deadline passed
For hosted usage, DeepSeek says teams can keep the same base_url and use deepseek-v4-pro or deepseek-v4-flash. The latter now routes to Flash 0731. The API supports OpenAI Chat Completions and Anthropic formats.[3][1]
DeepSeek's published retirement deadline for deepseek-chat and deepseek-reasoner passed on July 24, 2026 at 15:59 UTC. The release says those aliases became inaccessible after that time. Treat them as retired instead of relying on their former mapping to V4-Flash non-thinking and thinking modes.[1]
Migration status: DeepSeek's legacy alias deadline has passed. Pin
deepseek-v4-proordeepseek-v4-flash, then rerun compatibility and quality checks before restoring traffic.
Pin explicit model IDs now. If you're using an Anthropic-compatible coding tool, copy the exact model name from the integration guide. DeepSeek's Claude Code example uses deepseek-v4-pro[1m] for the main Anthropic-compatible lane and deepseek-v4-flash for lower-cost subagent defaults.[11]
Hosted concurrency is also part of the routing decision. DeepSeek's rate-limit docs set account-level concurrent-request caps at 500 for deepseek-v4-pro and 2,500 for deepseek-v4-flash. Crossing the cap returns HTTP 429, and an in-flight request counts until the response completes.[15] Fleet plans that assume unlimited parallel Flash workers will hit that wall before quality evaluation becomes the limiting factor.
Thinking mode creates a second ops trap for Anthropic-compatible agents. Thinking is enabled by default. A non-streaming call waits for the full completion, including reasoning tokens, so time-to-first-byte can look like the entire thinking budget. DeepSeek documents keep-alives and can close a connection if inference has not started within about 10 minutes.[16][15] For latency-sensitive background tools, use stream: true or disable thinking with thinking: { "type": "disabled" } on the Anthropic-compatible path.[16]
Ops check: Before putting V4 behind a coding agent or classifier that uses non-streaming calls, prove the client timeout, concurrency budget, and thinking setting on a cold path.
Pricing pressure is the business story
Checked on August 8, 2026. DeepSeek's pricing page identifies the hosted Flash version as DeepSeek-V4-Flash-0731 and lists it at $0.14 per 1M cache-miss input tokens and $0.28 per 1M output tokens. It lists V4-Pro at $0.435 input and $0.87 output. Cache-hit input is lower for both, and DeepSeek warns that prices may change.[7]
Treat the next rows as a fleet spend checkpoint for 2M input tokens plus 0.5M output tokens in a day, not a bake-off of one 1M-token request. Short-tier and long-tier rows stay separate because Gemini and GPT price bands change with prompt length. OpenAI lists GPT-5.6 Sol at $5.00 input and $30.00 output per 1M tokens. Requests above 272K input tokens bill the full request at 2x input and 1.5x output, and explicit cache writes cost 1.25x the uncached input rate.[17][18][19] Anthropic lists Claude Sonnet 5 at $2.00 input and $10.00 output through August 31, 2026, then $3.00 input and $15.00 output starting September 1, 2026, and says Sonnet 5 includes a 1M-token context window at standard pricing.[20][21] Google's Gemini page lists Gemini 3.1 Pro Preview Standard at $2.00 input and $12.00 output per 1M text tokens for prompts up to 200K, and $4.00 input and $18.00 output for prompts above 200K.[22]
| Hosted lane | Input per 1M | Output per 1M | Fleet example: 2M input + 0.5M output |
|---|---|---|---|
| DeepSeek V4-Flash-0731 | $0.14 | $0.28 | $0.42 |
| DeepSeek V4-Pro | $0.435 | $0.87 | $1.31 |
| Gemini 3.1 Pro Preview, short tier | $2.00 | $12.00 | $10.00 |
| Gemini 3.1 Pro Preview, long tier | $4.00 | $18.00 | $17.00 |
| GPT-5.6 Sol, up to 272K input | $5.00 | $30.00 | $25.00 |
| GPT-5.6 Sol, above 272K input | $10.00 | $45.00 | $42.50 |
| Claude Sonnet 5, through Aug 31 | $2.00 | $10.00 | $9.00 |
| Claude Sonnet 5, from Sep 1 | $3.00 | $15.00 | $13.50 |

This isn't an apples-to-apples quality claim. It's a margin and routing claim. If Flash passes quality checks for summaries, repo Q&A, classification, or low-risk agent steps, a premium model has to justify each escalation.
For scale, a daily workload with 2 million input tokens and 500,000 output tokens costs about $0.42 on V4-Flash-0731, $1.31 on V4-Pro, roughly $10 to $17 on Gemini 3.1 Pro Preview depending on whether the prompt crosses the 200K tier, $25 to $42.50 on GPT-5.6 Sol depending on whether a request crosses 272K input tokens, or $9 to $13.50 on Claude Sonnet 5 depending on date. Quality differs, but the gap is large enough to test before assuming the premium lane is required.
Self-hosting is real, but not casual
Open weights don't make Flash 0731 or V4-Pro laptop models.
Two questions matter: can you load the weights, and can you serve useful traffic at the target context length?
Hardware reality
SGLang's V4 cookbook lists Flash as a single-node datacenter serving target on B200, B300, GB200, GB300, H200, or H100-class setups. It lists Pro as a higher-capacity deployment across larger GPU configurations, including 8-GPU Blackwell or H200 recipes and 2-node options for some Hopper paths.[23] vLLM also publishes dedicated V4-Pro recipes, including 8-GPU B300 and H200 options, with context constraints depending on hardware.[24]
NVIDIA reports that V4's architecture reduces per-token FLOPs and KV-cache burden relative to DeepSeek-V3.2, and describes early Blackwell serving results for V4-Pro.[25] That helps explain why the hosted price can be low, but it doesn't erase storage, interconnect, cache, batching, or operations costs.
Pilot order
Start with the hosted API to measure quality and routing value. Pilot V4-Flash-0731 if you have steady traffic, privacy needs, or existing inference staff. Treat both Flash 0731 and V4-Pro self-hosting as cluster projects, and benchmark at your real context length. Passing at 32K doesn't prove the 384K or 1M case.
For serving fundamentals, review KV cache and PagedAttention, continuous batching, and LLM cost engineering.
The right response is routing
DeepSeek V4 doesn't end the closed-frontier model business. Strong closed models still win on many hard tasks, enterprise controls, hosted reliability, multimodal products, safety work, and access to the newest closed-frontier releases.
The pressure comes from the middle of the workload. If an open-weight model can handle enough routine steps at a fraction of the price, premium APIs stop being the default lane for every token. This creates the routing dynamic shown below:

Default lane to test: V4-Flash-0731 for low-risk summaries, classification, repo inspection, and agentic coding; GLM-5.2 for long-horizon repository and tool workflows; V4-Pro for knowledge-heavy or harder agent work; premium closed models for highest-risk reasoning or policy work. Route only after matched evals.
Self-hosting addresses residency and egress. It does not remove prompt injection, tool abuse, secret logging, or policy failure. Keep the same tool allowlists, redaction, approval gates, and no-exfil network boundaries on the private branch that you would require on any other lane.

Good routing needs explicit gates:
- Quality: pass task-specific evals before traffic moves.
- Risk: escalate security, policy, legal, or high-blast-radius work.
- Context: measure the context length the task uses.
- Cost: include cache hit rate, retries, fallback calls, and engineer time.
- Operations: include rate limits, observability, incident response, and vendor failure modes.