On September 10, 2026, DeepSeek released DeepSeek-V4.1-Flash, the smallest member of its new architecture family: a 552B-parameter MoE, an entirely new Causal-Encoder-Decoder (CED) asymmetric architecture, a 1M-token context and 384K-token maximum output, along with native multimodal visual understanding, three levels of thinking-mode intensity, and a full set of structured output capabilities. For developers building long-context multimodal Agents, the real value of this generation lies not in its parameter count, but in the fact that it reduces KV Cache HBM requirements to 1/4 of the previous generation and SSD storage to 1/8, roughly 437x smaller than the original DeepSeek—making it possible, for the first time, to keep a million tokens of images, documents, code, and historical conversation resident in a single Agent as a deployable, billable engineering solution. This article unfolds in two parts: this part focuses on the architecture and API layer, breaking down the CED asymmetric design, the memory budget, the model-name migration, the thinking budget, and the multimodal input pipeline; the next part will move on to end-to-end Agent orchestration, cost control, and production-grade rate limiting in practice.
Breaking Down the CED Asymmetric Architecture: How a 552B MoE Achieves 8B Input Activation and 16B Output Activation
DeepSeek-V4.1-Flash adopts an entirely new Causal-Encoder-Decoder (CED) asymmetric architecture. In traditional decoder-only models, the input side and output side share the same attention and feed-forward paths, making the cost structure of "reading 1M tokens" and "writing 384K tokens" almost symmetric. CED splits these apart: the input side follows an encoder path with roughly 8B activated parameters; the output side follows a decoder path with roughly 16B activated parameters; the two share a 552B-parameter MoE expert pool but activate it according to different routing strategies.
The significance of asymmetry must be understood in terms of the real workload of long-context Agents. In a typical multimodal long-context Agent session, the vast majority of tokens are "read": a 200-page PDF uploaded by the user, dozens of screenshots, historical tool-call results, retrieved code snippets. The tokens the model actually "writes" often account for only a small fraction of the input. CED activating only 8B for input encoding means that when processing massive context during the prefill stage, the per-token compute and memory-bandwidth pressure is significantly lower than on the output side. Activating 16B on the output side, meanwhile, ensures generation quality—especially for thinking modes that require strong reasoning.
- 8B activation on the input side: aimed at prefill-intensive scenarios, reducing first-token latency and throughput cost for long contexts.
- 16B activation on the output side: aimed at decode quality and reasoning depth, supporting 384K long outputs without collapse.
- Shared 552B MoE: preserves knowledge capacity while using sparse activation to control the actual compute per token.
One engineering caveat: the asymmetric structure means the cost-performance gap between "input-token billing" and "output-token billing" will be amplified. In the official pricing, cache-miss input is 1 yuan and output is 4 yuan per million tokens, so output costs 4x input. The optimization direction is therefore clear—push reusable context into the cache-hit zone as much as possible (cache-hit input costs only 0.02 yuan), and reserve expensive output tokens for the parts that genuinely require the model to generate, rather than having the model restate existing content.
The Memory Budget for 1M Context and 384K Output: The Engineering Implications of Cutting KV Cache to 1/4 and SSD Storage to 1/8
Officially, a very critical figure was announced: V4.1-Flash's KV Cache HBM requirement drops to 1/4 of the previous generation, and SSD storage to 1/8. These two numbers directly determine whether a 1M context can actually go live, rather than merely appearing in an announcement.
First, understand why KV Cache is the real bottleneck for long context. In autoregressive generation, the Key/Value of every token must be retained for reuse in subsequent attention computations. As context length grows linearly, KV Cache expands linearly; at the 1M-token scale, KV Cache is often far larger than the model weights themselves, directly saturating memory. Previous-generation approaches either truncated context or offloaded KV Cache to SSD, and SSD capacity and read/write bandwidth then became the new bottleneck.
V4.1-Flash's approach cuts HBM usage to 1/4: for the same number of concurrent sessions and context length, a single card can hold more state, or the same state occupies fewer cards. Cutting SSD storage to 1/8 means that when cold KV Cache is offloaded to SSD, the persistent storage overhead for 1M-token-scale sessions drops substantially. This matters especially for Agents, because Agent sessions are long-lived: a single task may last hours and span dozens of rounds of tool calls.
| Dimension | Previous-Gen V4 Flash | V4.1-Flash | Engineering Benefit |
|---|---|---|---|
| KV Cache HBM requirement | Baseline 1x | 1/4 | Same memory can hold ~4x the state or context |
| KV Cache SSD storage | Baseline 1x | 1/8 | Persistent storage cost for long sessions drops substantially |
| Relative to original DeepSeek | — | ~437x smaller | Million-scale context enters the deployable range |
| Max context / output | — | 1M / 384K | Ultra-long documents + ultra-long generation both hold |
A direct deployment-side corollary: the number of long-context concurrent sessions a single instance can support rises significantly, and deploying 1M context on edge or single-machine setups goes from "theoretically possible" to "engineeringly feasible." At the same time, 384K output means the decode stage lasts a long time and KV Cache keeps growing, so SSD offload strategy must be combined with session lifecycle management—for example, compressing and archiving intermediate results whose inference is complete, rather than keeping everything resident.
~437x Smaller Than the Original DeepSeek: The KV Cache Compression Path and the Feasibility Boundary of Long-Context Agents
The strongest anchor officially given is this: compared with the original DeepSeek, V4.1-Flash's KV Cache footprint is roughly 437x smaller. This number is not marketing spin—it is the watershed that moves "million-token context" from the lab into production.
The significance of 437x lies in changing the Agent's state model. The core challenge of an Agent has never been a single Q&A, but state persistence and state reuse: a user session must be able to resume after interruption, continue across days, and maintain consistent context across multiple tool calls. In the past, because KV Cache was too expensive, engineering was forced into "sliding window + summary compression," at the cost of information loss and inconsistency. With 437x compression, the feasibility boundary expands:
- Session persistence: the KV Cache for an entire 1M context can remain resident long-term or be swapped in and out quickly, so a session can truly "remember" its full history, not just a summary.
- State reuse: across multiple rounds of tool calls, prior tool results need not be repeatedly retransmitted and re-encoded; after a cache hit, input cost drops to 0.02 yuan per million tokens.
- Multimodal persistence: the context produced after images undergo visual understanding also enters the caching system, allowing a "view image—reason—reference the original image again" pipeline to be maintained long-term.
But boundaries still exist. What is compressed is storage and memory footprint, not the attention computation itself; attention over a 1M context is still O(n²)-level computational pressure, and first-token latency for ultra-long context remains considerable. Engineering should therefore still adhere to "tiered context": high-frequency reusable system prompts and tool definitions go first and hit the cache; mid-frequency retrieval results are injected on demand; low-frequency raw material stays in the Files API and is pulled when needed. Use the 437x dividend for persistence, not for indiscriminately filling the context window.
The deepseek-flash Model Name and the 2500 Concurrency Limit: API Migration, Legacy-Name Compatibility Routing, and Call Planning
The first action at the API layer is to unify the model name to deepseek-flash. The legacy names deepseek-v4-flash and deepseek-v4-flash-vision-exp have been retired, but the official compatibility routing is provided: in the short term, requests using the old names will be routed to the new model rather than erroring out directly. This gives a migration buffer, but it should not be relied upon—production environments should switch explicitly to deepseek-flash as soon as possible, to avoid failures when compatibility routing is removed at some point.
The second key parameter is concurrency limit 2500. This is a fairly high concurrency ceiling, but for long-context Agents, the real bottleneck is often not the concurrency count, but single-request duration: a 1M-context prefill + 384K-output decode may occupy a connection for several minutes or even longer. 2500 concurrency is the "number of requests in flight simultaneously," not QPS.
- Connection pool planning: Estimate concurrency usage based on P99 request duration, not QPS; long tasks will occupy concurrency slots for extended periods.
- Tiered retries: Use exponential backoff + jitter for rate limiting (429); for timed-out tasks, switch to streaming or asynchronous continuation rather than retrying the entire segment.
- Idempotency and resumable continuation: Long outputs should enable streaming and persist the generated portion to disk, avoiding wasting output tokens by starting over after a timeout.
import os
import time
import httpx
API_KEY = os.environ.get("DEEPSEEK_API_KEY", "your-deepseek-api-key")
BASE_URL = "https://api.deepseek.com"
MODEL = "deepseek-flash"
client = httpx.Client(
base_url=BASE_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=httpx.Timeout(connect=10.0, read=600.0, write=60.0, pool=10.0),
)
def chat_with_retry(messages, max_retries=5, max_tokens=384000):
"""Long-context call with exponential backoff, adapted for rate-limited scenarios under 2500 concurrency."""
last_err = None
for attempt in range(max_retries):
try:
resp = client.post(
"/chat/completions",
json={
"model": MODEL,
"messages": messages,
"max_tokens": max_tokens,
"stream": False,
},
)
if resp.status_code == 429:
raise RuntimeError("rate_limited")
resp.raise_for_status()
return resp.json()
except Exception as e: # noqa: BLE001
last_err = e
backoff = min(2 ** attempt, 30) + (time.time() % 1)
time.sleep(backoff)
raise RuntimeError(f"chat failed after {max_retries} retries: {last_err}")
if __name__ == "__main__":
out = chat_with_retry([
{"role": "system", "content": "You are a long-context multimodal agent."},
{"role": "user", "content": "Summarize the attached 200-page spec into an action plan."},
])
print(out["choices"][0]["message"]["content"][:500])
Also note the billing time windows: peak hours are Monday to Friday 9:00-12:00 and 14:00-18:00, while off-peak is half of peak. Long-context batch tasks should be scheduled to off-peak periods as much as possible; output costs can drop from 8 yuan during peak to 4 yuan during off-peak per million tokens. Additionally, starting from Beijing time 2026-09-14 12:00, all deepseek-v4-pro requests will be routed to V4.1-Flash and billed at Flash prices. This is effectively an implicit upgrade for existing users—existing v4-pro calls will automatically gain 1M context and new capabilities, but the billing basis also changes accordingly, requiring separate breakdown in billing monitoring.
Thinking mode's three levels low/high/max and non-thinking mode: reasoning budget allocation for long-context Agents
V4.1-Flash enables thinking mode by default and supports three intensity levels: low / high / max, while also retaining non-thinking mode. For long-context Agents, thinking intensity is essentially a knob for output token budget and reasoning depth: the higher the intensity, the longer the thinking chain the model generates, the greater the output token consumption, and the more pronounced the accuracy improvement on complex tasks.
| Mode | Use cases | Output budget characteristics | Recommendation |
|---|---|---|---|
| Non-thinking | Extraction, classification, formatted rewriting, FIM completion | Short output, low latency | First choice for deterministic tasks, lowest cost |
| Thinking low | Routine multi-turn dialogue, simple tool orchestration | Medium | Usable by default, balancing quality and cost |
| Thinking high | Multi-hop retrieval, cross-document reasoning, code repair | Longer | Main tier for complex Agent tasks |
| Thinking max | Difficult math, competition-level programming, deep planning | Longest, approaching the 384K limit | Trigger on demand, combined with caching and off-peak billing |
The basis for selection can be summarized in one principle: the more non-decomposable reasoning steps a task has, the higher the tier. Official benchmarks also corroborate the upper-limit capabilities—GPQA Diamond 90.9, Codeforces rating 3471, MathArena Apex 65.6. These high scores usually require high thinking intensity to reproduce. But note that the 384K output limit will be genuinely consumed under high intensity. If the task itself requires outputting an extremely long codebase or long report, reserve max for the stage where "you must think it through first," and use non-thinking or low for final output generation, avoiding the thinking chain crowding out the formal output quota.
Another pitfall: the intermediate reasoning content of thinking mode is also counted in output billing. Therefore, in long-context batch tasks, be sure to cache and reuse identical inputs, and try to make the thinking chain unfold only for the truly changed incremental parts, rather than deeply rethinking the entire context every round.
Native multimodal visual understanding integration: three engineering paths for image links, base64, and Files API
V4.1-Flash has native multimodal visual understanding capabilities and supports three image input methods: image links, base64, and Files API. The three are not simply equivalent, but correspond to different engineering trade-offs.
- Image links: Pass a URL, and the server fetches it. Suitable for scenarios where images are already accessible on a public CDN; the request body is small and transmission is fast. The constraint is that the link must be stably accessible and carries a risk of expiration.
- base64 inline: Encode the image into the request body. Suitable for small images, intranet images, and one-off images, with no additional storage needed. The cost is request body bloat; large images significantly increase bandwidth and memory usage.
- Files API: Upload first to get a file reference, then reuse it across multiple requests. Suitable for long-context Agents—when the same image is referenced repeatedly, it is uploaded only once, naturally working with cache reuse.
In long-context multimodal Agents, the recommended strategy is Files API as the primary approach, base64 as auxiliary, and links as a special case: images entering the session are first uploaded to the Files API to obtain a reference, and all subsequent rounds reference the same ID, so the input side can hit the cache; temporary thumbnails or one-off screenshots use base64; public assets already hosted on a CDN use links directly. This controls request body size while maximizing cache hit rate.
import os
import base64
impo
Engineering pitfall: different input methods have different degrees of friendliness to cache hits. If a base64 image has subtle content differences (for example, re-encoding causes different bytes), it will cause a cache miss, so the same image should keep a fixed encoded artifact. The reference ID of the Files API is stable and is best suited for reuse in long sessions. In addition, multimodal input significantly increases prefill computation, so the number of images per turn should be limited during session planning to avoid runaway first-token latency.
JSON Output, Tool Calls, and Responses API: The Structured Output Pipeline for Long-Context Multimodal Agents
V4.1-Flash supports JSON Output, Tool Calls, and Responses API, and only when these three are combined do they form a complete Agent output pipeline. JSON Output ensures that model output can be parsed by programs; Tool Calls let the model declare and invoke external tools; Responses API provides a request/response abstraction closer to Agent orchestration.
The recommended layered design is: use Responses API to carry sessions and state, use Tool Calls to drive actions, and use JSON Output to constrain the final structured result. Specifically, the parameters for tool calls are provided by the model in structured form (with JSON Output guaranteeing parseability underneath), the tool execution results are injected back as new context, and then the Responses API maintains the continuity and cache hits of the entire session.
import os
import json
import httpx
API_KEY = os.environ.get("DEEPSEEK_API_KEY", "your-deepseek-api-key")
BASE_URL = "https://api.deepseek.com"
MODEL = "deepseek-flash"
client = httpx.Client(
base_url=BASE_URL,
headers={"Authorization": f"Bearer {API_KEY}"},
timeout=httpx.Timeout(read=600.0),
)
tools = [{
"type": "function",
"function": {
"name": "search_repo",
"description": "Search a code repository by natural language query.",
"parameters": {
"type": "object",
"properties": {
"query": {"type": "string"},
"top_k": {"type": "integer", "default": 5},
},
"required": ["query"],
},
},
}]
def agent_turn(messages):
resp = client.post(
"/chat/completions",
json={
"model": MODEL,
"messages": messages,
"tools": tools,
"tool_choice": "auto",
"response_format": {"type": "json_object"},
"max_tokens": 8192,
},
)
resp.raise_for_status()
msg = resp.json()["choices"][0]["message"]
calls = msg.get("tool_calls") or []
return msg, calls
if __name__ == "__main__":
msgs = [{"role": "user", "content": "Find auth-related bugs and summarize."}]
msg, calls = agent_turn(msgs)
if calls:
for c in calls:
args = json.loads(c["function"]["arguments"])
print("tool:", c["function"]["name"], "args:", args)
else:
print("final:", msg.get("content"))
Engineering key points: JSON Output and thinking mode can coexist, but the chain of thought itself should not be parsed as structured output; only the final content must be parsed. Tool Calls parameter validation should be done on the server side as a second check, and model output must not be blindly trusted. Responses API is suitable for scenarios that need to maintain state across requests and can better cooperate with KV Cache persistence; for simple question-and-answer interactions, Chat Completions is lighter. When using them in combination, be sure to write clear descriptions and JSON Schema for each tool, otherwise the model is prone to choosing the wrong tool under long context.
Anthropic API, Conversation Prefix Continuation, and FIM: Agent Code Generation Practices Under Multi-Protocol Compatibility
V4.1-Flash simultaneously provides Anthropic API compatibility, conversation prefix continuation, and FIM (non-thinking mode only). These three each have clear applications in code-oriented Agents.
- Anthropic API compatibility: allows existing Agent frameworks based on the Anthropic protocol stack to switch with almost zero modification, suitable for migrating existing code Agents.
- Conversation prefix continuation: given the last prefix segment of the conversation history, let the model continue writing. Suitable for scenarios that "constrain the model to continue from a certain determined position," for example requiring the model to start completion from a specified function signature.
- FIM (Fill-In-the-Middle): only supports non-thinking mode; given a prefix and suffix, let the model fill in the middle. This is a powerful tool for code completion, local modification, and unit test generation, but it cannot be used together with thinking mode.
The combination principle in practice is very clear: code tasks requiring deep reasoning go through thinking mode + Tool Calls; tasks requiring precise insertion or completion go through FIM or conversation prefix continuation. Using FIM for local modifications in long-context code repositories can avoid making the model rewrite entire code blocks, thereby greatly saving output tokens. Conversation prefix continuation is suitable for batch generation that requires strictly consistent formatting—first provide a header that conforms to the specification, and let the model continue writing along it.
Compatibility pitfalls: Anthropic API and OpenAI-style APIs are not completely consistent in the semantics of tool calls, system prompts, and stop sequences. When migrating across protocols, check item by item, especially the handling of the system field and stop sequences. FIM can only use non-thinking mode, so do not force FIM on refactoring tasks that require strong reasoning, otherwise quality will drop noticeably. Finally, prefix continuation must control prefix length; an overly long prefix will occupy the context budget and should be injected with cache priority.
This section completes the breakdown of architecture, VRAM, naming, and protocol layers: CED asymmetry compresses input activations to 8B while leaving output at 16B; KV Cache's HBM 1/4, SSD 1/8, and a 437x reduction relative to the first generation bring 1M context and 384K output into the deployable range; the deepseek-flash naming and 2500 concurrency determine call planning; the three thinking levels and three multimodal paths, structured output, and multi-protocol support determine the Agent's behavioral boundaries. In the next section, we will assemble these parts into a complete end-to-end long-context multimodal Agent and go deep into the practical details of cost models, cache hit strategies, and production-grade rate limiting and retries.
In the previous section, we already set up the architectural foundation of DeepSeek-V4.1-Flash (552B MoE + CED asymmetric activation), the capability boundaries of 1M input / 384K output, and the ways to integrate multimodality and thinking mode. In this part, we enter the real "answer sheet" stage: what the benchmark numbers actually mean, whether Agent scenarios can hold up, how the money is spent, how migration proceeds, and what pitfalls exist in the code.
GPQA Diamond 90.9 and Codeforces 3471: Interpreting How V4.1-Flash Comprehensively Surpasses V4 Pro on Benchmarks
First, look at the hard numbers officially released. V4.1-Flash scores 90.9 on GPQA Diamond. This is a high-difficulty reasoning set with questions written by domain experts and aimed at the graduate level in physics/chemistry/biology. It is not a memorization-based question bank, and being able to reach
The reason this "small model overtaking the flagship" conclusion matters is that it completely rewrites the logic of engineering model selection. Our default assumption used to be: a more capable model must be more expensive, slower, and have a shorter context. But what V4.1-Flash offers is this combination: 1M tokens of context + 384K max output + benchmarks surpassing V4 Pro + lower KV Cache overhead. For Agent developers, this means the layered architecture of "reserve the strongest model for planning, hand massive context to a cheap model" can be simplified directly into "one model does it all."
What we need to stay clear-headed about is the boundary of the benchmarks: GPQA is not an open-domain truthfulness evaluation, the Codeforces rating comes from an official benchmark rather than real random contest problems, and MathArena Apex is also a specific problem-type distribution. In production systems you should still keep your own evaluation set, especially the reasoning quality decay curve under long context—being able to fit 1M context does not mean retrieval and reasoning at the 900K position are still reliable.
Terminal-Bench 2.1 score of 90.6 and CyberGym 88.1: breaking down Agent-type task evaluation performance
If the three above are "brainpower scores," then the next two are "hands-on scores." Terminal-Bench 2.1 score of 90.6 measures the model's ability to complete multi-step operational tasks in a real terminal environment: reading files, running commands, parsing errors, correcting and retrying. This score maps directly to what we often call Computer Use / Shell Agent scenarios. CyberGym 88.1 focuses on security offense-and-defense tasks. V4 Pro's corresponding scores on these two are 87.9 and 83.3, meaning V4.1-Flash improves by about 2.7 points on Terminal-Bench and about 4.8 points on CyberGym.
Looking more closely, what's even more noteworthy: security scenarios like CyberGym have extremely high requirements for long chains, strong constraints, and zero tolerance for error, yet the improvement margin is actually larger than for general terminal tasks, indicating that the gains brought by the new pretraining method and RL post-training are amplified on tasks requiring rigorous reasoning and tool calling. In engineering terms, this maps to two deployment directions:
- Ops and CI/CD Agents: let the model take over log analysis, build failure localization, and dependency conflict resolution. Long context lets it read the complete build log in one pass instead of being truncated.
- Security analysis Agents: vulnerability reproduction, traffic assessment, rule generation, combined with the max level of thinking mode for deep reasoning.
But please always remember an iron rule: a benchmark score does not equal unattended reliability. 90.6 means that out of 100 tasks, nearly 10 will still fail, and a single misoperation by a terminal Agent (such as rm -rf) is extremely costly. So real deployment must layer on sandboxing, command whitelists, secondary confirmation for dangerous operations, and complete rollback snapshots. The benchmark score only lets us "dare to use it," not "use it without protection."
Pricing and time-window strategy: long-context cost optimization under cache hit/miss and peak/idle rates
The number one enemy of long-context Agents is always cost. V4.1-Flash's official pricing (effective Beijing time 2026-09-10 12:00, in yuan per million tokens) gives us very clear optimization levers:
| Billing item | Idle period | Peak period | Relative to V4 Flash |
|---|---|---|---|
| Cache hit input | 0.02 yuan | 0.04 yuan | 60% price cut |
| Cache miss input | 1 yuan | 2 yuan | About 33.3% price cut |
| Output | 4 yuan | 8 yuan | About 11.1% price cut |
Peak periods are defined as Monday to Friday 9:00-12:00 and 14:00-18:00, and idle-period prices are half of peak. The most critical ratio in this table is not "how much the price was cut," but the price gap between cache hit and cache miss: 1 yuan vs 0.02 yuan, a full 50 times. In other words, for the same 100K-token document, the input cost after a cache hit is almost negligible.
From this we can derive three actionable strategies:
- Maximize caching of the stable prefix. System prompts, tool definitions, code repository summaries, the front portion of long documents, and other content that does not change across turns should all be placed at the very front of the prompt to ensure cache hits. Anything that changes must be placed afterward—this is the first principle of long-context cost optimization.
- Run batches during idle periods. Move all non-real-time tasks (offline evaluation, batch code review, knowledge extraction, nighttime data pipelines) to idle windows to directly save half the cost.
- Control output cost. Output is 4/8 yuan, and the 384K output capability is very easy to abuse. Require the model to return structured short results (JSON Output), and have it write long-form content to files rather than printing it into the conversation.
Below is a real, runnable Python example of a cost-aware call, whose core is "fixed prefix + variable suffix + structured output":
import os, json
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("DEEPSEEK_API_KEY", "your-deepseek-api-key"),
base_url="https://api.deepseek.com"
)
# Stable prefix: put it first to maximize cache hits
FROZEN_PREFIX = (
"You are a code repository review Agent. Below are the repository's agreed review standards and tool instructions, whose content remains unchanged for a long time:\n"
"1) Only report reproducible high-risk issues; 2) Output strictly JSON; 3) Do not speculate about files not provided.\n"
)
def review(repo_summary: str, changed_file: str) -> dict:
messages = [
{"role": "system", "content": FROZEN_PREFIX + "\nRepository overall summary:\n" + repo_summary},
{"role": "user", "content": "Please review this changed file:\n" + changed_file}
]
resp = client.chat.completions.create(
model="deepseek-flash",
messages=messages,
response_format={"type": "json_object"},
max_tokens=4096
)
usage = resp.usage
return {
"result": json.loads(resp.choices[0].message.content),
"cache_hit": getattr(usage, "prompt_cache_hit_tokens", 0),
"cache_miss": getattr(usage, "prompt_cache_miss_tokens", 0)
}
if __name__ == "__main__":
out = review("repository summary placeholder", "diff placeholder")
print(json.dumps(out, ensure_ascii=False))
Note that we concatenate repo_summary into the system prefix rather than into each turn's user message, and all multi-turn requests reuse the same prefix text—cache hit determination depends on the prefix being byte-for-byte identical, and any change (even one extra newline) will cause a miss, directly multiplying the cost by 50.
From 2026-09-14 12:00, deepseek-v4-pro fully routed to V4.1-Flash: migration impact and billing changes
The official statement is clear: from Beijing time 2026-09-14 12:00, all requests sent to deepseek-v4-pro will be fully routed to V4.1-Flash and billed at Flash's prices. At the same time, the old model names deepseek-v4-flash and deepseek-v4-flash-vision-exp have been taken offline with compatibility routing, and deepseek-flash should now be used uniformly.
For production systems, this policy has three layers of impact:
- The cost reduction is certain. V4 Pro traffic falls onto Flash
Recommended action checklist:
- Immediately change hardcoded model names in your code to
deepseek-flashto make routing behavior explicit. - In the staging environment, use shadow traffic to compare output differences between V4 Pro and V4.1-Flash, focusing on JSON parseability rate, tool-call parameter accuracy, and average output length.
- Evaluate the thinking intensity level selection: use non-thinking or low for low-latency scenarios, high/max for complex planning, and avoid a global default that eats into your latency budget.
- Check billing and quota monitoring: the concurrency limit is 2500; confirm your rate limiter matches the new cap.
{
"model": "deepseek-flash",
"messages": [
{"role": "system", "content": "You are a migration verification Agent. Please compare the output differences between the two versions."},
{"role": "user", "content": "Please verify the following constraints: output strict JSON, do not add new fields, do not output the thinking process."}
],
"response_format": {"type": "json_object"},
"thinking": {"type": "enabled", "budget": "high"},
"max_tokens": 8192
}
This JSON is an illustration of the request body shape: explicitly declaring response_format guarantees structure, and explicitly declaring the thinking level avoids default-value drift, thereby constraining the behavioral uncertainty introduced by migration to a controllable range.
552B MoE + New Pretraining and Larger-Scale RL Post-Training: The Training-Side Mechanisms Behind Capability Gains
Why can the "smallest-size member" overtake the flagship? The answer lies on the training side. V4.1-Flash is a 552B total-parameter MoE, adopting a brand-new Causal-Encoder-Decoder (CED) asymmetric architecture: only 8B is activated on the input side, while 16B is activated on the output side. The intuition behind this design is that understanding is "cheaper" than generation. The input side faces a given context, and the task is to compress 1M tokens into an effective representation; 8B of activation is sufficient. The output side, however, needs step-by-step generation and stronger reasoning and decision-making, so it is given 16B of activation. Asymmetric activation lets the model spend compute where it matters most in long-context input scenarios.
Paired with this are two training-side changes: a new pretraining method and larger-scale RL post-training. Pretraining determines the knowledge foundation and long-context modeling capability, while RL post-training determines "whether it can use tools, whether it can deliver in the required format, and whether it can maintain goals across multi-step tasks." This precisely explains why Agent metrics with strong process and strong constraints, such as Terminal-Bench 2.1 (90.6) and CyberGym (88.1), improved markedly—they essentially test the behavioral policies shaped by RL post-training, not mere knowledge volume.
There is also an easily overlooked engineering fact: KV Cache HBM requirements drop to 1/4 of the previous generation, SSD storage drops to 1/8, and compared with the first-generation DeepSeek it is reduced by about 437x. This means 1M context is no longer just "interface support," but an engineering capability that is suitable for long-term residency and high-concurrency serving. For teams building multi-turn Agents, this directly determines whether you can persist context between sessions instead of rebuilding it every time.
Hugging Face Weights and Official Partner Integrations: Implementation References from WorkBuddy, CodeBuddy, and OpenCode
V4.1-Flash's weights have been released on Hugging Face, along with a technical report. For teams that need privatization, auditing, and custom inference stacks, this is a complete implementation path; for most application teams, the more practical reference is the official partners: WorkBuddy (including CodeBuddy) and OpenCode have fully integrated it.
The engineering value of these two types of integrators lies in the fact that they represent two typical Agent forms: coding Agents inside the IDE and terminal/workflow Agents. They must genuinely handle long-context truncation, tool-call concurrency, thinking-mode toggles, failure retries, and state recovery—exactly the pitfalls you will encounter yourself. By referencing their trade-offs, you can avoid many detours. At the same time, open-sourced weights + a technical report mean you can build a local evaluation baseline and align official benchmarks with your business evaluation set, rather than blindly trusting a single leaderboard.
Engineering Pitfalls of Long-Context Multimodal Agents: Truncation, Retries, and State Management from 1M Input to 384K Output
This section is the most "painful" part of the article. 1M input and 384K output sound beautiful, but in practice you will hit a series of problems:
- Oversized request bodies cause gateway timeouts. A 1M-token request is enormous after serialization; both the client and intermediate layers must relax limits, and you should prefer the Files API / image links rather than stuffing base64 directly into the message body. Native multimodal support includes image links, base64, and the Files API; in long sessions, prefer links and the Files API.
- 384K output does not mean it can all be emitted at once. Long outputs very easily trigger timeouts and truncation. The correct approach is chunked generation + incremental persistence: have the model output section by section or module by module, persist after each segment, and on failure retry only the current segment rather than the entire document.
- Retries must be idempotent. When an Agent calls tools, retries may cause duplicate write operations. Generate a deterministic ID for each tool call and deduplicate on the server side; for write operations, require the model to provide a unique key.
- Concurrency and rate limiting. The concurrency cap is 2500, but the real bottleneck is often token throughput. Use a token bucket to rate-limit by tokens rather than by request count, and apply backoff during peak periods.
- Multi-turn state management. Do not append all history indefinitely, or the cached prefix will frequently become invalid. The strategy is: fixed prefix (cache) + rolling summary (compressed history) + the most recent N turns of raw text.
- Truncation detection. Check whether finish_reason indicates length truncation; if truncated, continue with a "continue from the preceding text" prompt rather than reissuing the complete task.
- Pitfalls of thinking mode. Thinking mode is enabled by default, and the output may contain thinking content; FIM supports only non-thinking mode; the combination of conversation prefix continuation and thinking mode must be verified separately.
Another reminder: JSON Output, Tool Calls, Responses API, Anthropic API, conversation prefix continuation, and FIM are all supported, but the capability matrix is not fully orthogonal—FIM is available only in non-thinking mode. When designing fallback paths, test by "capability combinations" rather than by a "capability checklist."
Summary and Best Practices
- Selection convergence: V4.1-Flash comprehensively surpasses V4 Pro on benchmarks (GPQA Diamond 90.9, Codeforces 3471, MathArena Apex 65.6, Terminal-Bench 2.1 90.6, CyberGym 88.1), so it can be used as the default primary model, and the "strong model plans + weak model executes" layering is no longer needed.
- Rename immediately: uniformly use
deepseek-flash; the old namesdeepseek-v4-flashanddeepseek-v4-flash-vision-exphave been taken offline and go through compatibility routing. - Watch 9-14 12:00 closely: from that moment, all deepseek-v4-pro requests are routed to V4.1-Flash and billed at Flash pricing. Costs drop but behavior may drift, so be sure to run shadow comparisons in advance.
- The three cost levers: maximize caching for stable prefixes (50x price difference between hits and misses), move non-real-time tasks to idle periods (price is half of peak), and keep outputs as structured and short as possible (384K is the upper limit, not the goal).
- Explicitly declare behavior: clearly specify thinking intensity (low/high/max) and
response_format; do not rely on defaults; FI