LeetLLM
My PlanLearnGlossaryTracksPracticeBlog
LeetLLM

Your go-to resource for mastering AI & LLM systems.

Product

  • Learn
  • Glossary
  • Tracks
  • Practice
  • Blog
  • RSS

Legal

  • Terms of Service
  • Privacy Policy

© 2026 LeetLLM. All rights reserved.

Blog
DeepSeekOpen ModelsAI InfrastructureAgentic Coding+1

DeepSeek V4 and the US AI Lab Squeeze

DeepSeek V4 pairs open weights, 1M context, and low hosted pricing with strong agentic coding claims. Use cheaper lanes when evals pass, and escalate when quality or policy requires it.

LeetLLM TeamApril 27, 2026Updated July 26, 202611 min read

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 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 on routine steps, Pro on harder steps, and a premium closed model on the failures that remain. Keep all three 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 is a 284 billion parameter model 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]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424[2]Reference 2DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencehttps://huggingface.co/deepseek-ai/DeepSeek-V4-Pro

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 DeepSeek released

DeepSeek calls V4 a preview, but the release is concrete enough to test now: Hugging Face weights, hosted API endpoints, OpenAI-compatible Chat Completions, Anthropic-compatible access, and agent setup guides.[1]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424[3]Reference 3Integrate with AI Toolshttps://api-docs.deepseek.com/guides/coding_agents

V4-Pro is the hard-reasoning and agentic-coding lane: 1.6T total parameters, 49B active, 1M context. V4-Flash is the faster routine lane: 284B total, 13B active, 1M context. Total parameters describe the full weight pool; active parameters describe how much runs for one token. That's why "1.6T" and "49B active" can both be true. For the underlying architecture idea, see mixture-of-experts architecture.

The Hugging Face model card also says the instruct checkpoints use mixed precision: MoE expert weights use 4-bit floating point (FP4), while most other parameters use 8-bit floating point (FP8). Base checkpoints are FP8 mixed.[2]Reference 2DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencehttps://huggingface.co/deepseek-ai/DeepSeek-V4-Pro Lower precision reduces storage pressure, but it doesn't remove the need for serious serving hardware.

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 model card describes Compressed Sparse Attention (CSA) and Heavily Compressed Attention (HCA), and reports that V4-Pro at 1M context uses 27% of DeepSeek-V3.2's single-token inference FLOPs and 10% of its KV cache.[1]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424[2]Reference 2DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencehttps://huggingface.co/deepseek-ai/DeepSeek-V4-Pro

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.

Dense long-context attention compared with DeepSeek V4 hybrid attention: a recent dense block, sparse selected positions, compressed HCA memory, and lower reported FLOPs and KV cache at 1M context. Dense long-context attention compared with DeepSeek V4 hybrid attention: a recent dense block, sparse selected positions, compressed HCA memory, and lower reported FLOPs and KV cache at 1M context.
V4's model card describes recent dense attention, sparse selected positions, and compressed memory. Bars show its release-reported 1M-context ratios relative to DeepSeek-V3.2.

Coding benchmarks are promising, not decisive

DeepSeek positions V4 directly at coding agents. The release claims leading agentic coding results among open-weight models and lists integrations with Claude Code, OpenClaw, and OpenCode.[1]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424[3]Reference 3Integrate with AI Toolshttps://api-docs.deepseek.com/guides/coding_agents

The model card reports V4-Pro-Max at 80.6% on SWE Verified, 67.9 on Terminal Bench 2.0, 73.6% on MCPAtlas Public, and 93.5% on LiveCodeBench. V4-Flash-Max is close on several agent tasks, including 79.0% on SWE Verified and 69.0% on MCPAtlas.[2]Reference 2DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligencehttps://huggingface.co/deepseek-ai/DeepSeek-V4-Pro

Treat those as vendor-reported numbers, not deployment proof. The vendor chose the harness, effort settings, retry rules, and comparator table. A coding team still needs workload-local evals: real repos, real issue types, real tests, real latency limits, and clear failure categories. Put one premium closed model and one cheaper open-weight lane through the same task pack before changing routing.

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 switch the model to deepseek-v4-pro or deepseek-v4-flash. The API supports OpenAI Chat Completions and Anthropic formats.[1]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424

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]Reference 1DeepSeek V4 Preview Releasehttps://api-docs.deepseek.com/news/news260424

Migration status: DeepSeek's legacy alias deadline has passed. Pin deepseek-v4-pro or deepseek-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.[3]Reference 3Integrate with AI Toolshttps://api-docs.deepseek.com/guides/coding_agents

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.[4]Reference 4Rate Limithttps://api-docs.deepseek.com/quick_start/rate_limit/ 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.[5]Reference 5Thinking Modehttps://api-docs.deepseek.com/guides/thinking_mode[4]Reference 4Rate Limithttps://api-docs.deepseek.com/quick_start/rate_limit/ For latency-sensitive background tools, use stream: true or disable thinking with thinking: { "type": "disabled" } on the Anthropic-compatible path.[5]Reference 5Thinking Modehttps://api-docs.deepseek.com/guides/thinking_mode

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 July 26, 2026. DeepSeek's pricing page lists V4-Flash 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.[6]Reference 6Models and Pricinghttps://api-docs.deepseek.com/quick_start/pricing

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.[7]Reference 7OpenAI API Pricinghttps://developers.openai.com/api/docs/pricing[8]Reference 8GPT-5.6 Sol Modelhttps://developers.openai.com/api/docs/models/gpt-5.6-sol[9]Reference 9Prompt cachinghttps://developers.openai.com/api/docs/guides/prompt-caching 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.[10]Reference 10Anthropic Model Pricinghttps://platform.claude.com/docs/en/about-claude/pricing[11]Reference 11Context windowshttps://platform.claude.com/docs/en/build-with-claude/context-windows 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.[12]Reference 12Gemini API Pricinghttps://ai.google.dev/gemini-api/docs/pricing

Hosted laneInput per 1MOutput per 1MFleet example: 2M input + 0.5M output
DeepSeek V4-Flash$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
Cited daily cost comparison for two million input and half a million output tokens across DeepSeek V4, Gemini 3.1 Pro Preview, Claude Sonnet 5, and GPT-5.6 Sol pricing lanes. Cited daily cost comparison for two million input and half a million output tokens across DeepSeek V4, Gemini 3.1 Pro Preview, Claude Sonnet 5, and GPT-5.6 Sol pricing lanes.
Every bar matches the cited fleet-spend table, including Gemini prompt tiers, GPT-5.6 Sol below and above 272K input tokens, and Sonnet 5 pricing before and after September 1, 2026.

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, $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 V4-Pro a laptop model.

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.[13]Reference 13DeepSeek-V4https://docs.sglang.io/cookbook/autoregressive/DeepSeek/DeepSeek-V4 vLLM also publishes dedicated V4-Pro recipes, including 8-GPU B300 and H200 options, with context constraints depending on hardware.[14]Reference 14DeepSeek-V4-Pro vLLM Recipehttps://recipes.vllm.ai/deepseek-ai/DeepSeek-V4-Pro

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.[15]Reference 15Build with DeepSeek V4 Using NVIDIA Blackwell and GPU-Accelerated Endpointshttps://developer.nvidia.com/blog/build-with-deepseek-v4-using-nvidia-blackwell-and-gpu-accelerated-endpoints/ 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 if you have steady traffic, privacy needs, or existing inference staff. Treat V4-Pro self-hosting as a cluster project, 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:

Diagram showing Incoming agent step, Private data or policy lock?, yes, and Self-hosted open-weight plus same guardrails. Diagram showing Incoming agent step, Private data or policy lock?, yes, and Self-hosted open-weight plus same guardrails.
Incoming agent step, Private data or policy lock?, yes, and Self-hosted open-weight plus same guardrails.

Default lane to test: V4-Flash for low-risk summaries, classification, and repo inspection; V4-Pro for multi-file code edits and harder agent work; premium closed models for highest-risk reasoning or policy work; self-hosted open models when data residency or private inference dominates.

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.

Routing quadrant places chat and repo scans in V4-Flash, refactors in V4-Pro, EU data on self-hosted models, and contracts on frontier APIs. Routing quadrant places chat and repo scans in V4-Flash, refactors in V4-Pro, EU data on self-hosted models, and contracts on frontier APIs.
Move right as capability demands rise. Move up when privacy, residency, or policy constraints dominate.

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.
PreviousHow to Become an AI Engineer from Zero in 2026NextBest AI Plans for OpenClaw in 2026
Share this article
XFacebookLinkedInBlueskyRedditHacker NewsEmail
References

DeepSeek V4 Preview Release

DeepSeek · 2026

DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence

DeepSeek-AI · 2026

Integrate with AI Tools

DeepSeek · 2026

Rate Limit

DeepSeek · 2026

Thinking Mode

DeepSeek · 2026

Models and Pricing

DeepSeek · 2026

OpenAI API Pricing

OpenAI · 2026

GPT-5.6 Sol Model

OpenAI · 2026

Prompt caching

OpenAI · 2026

Anthropic Model Pricing

Anthropic · 2026

Context windows

Anthropic · 2026

Gemini API Pricing

Google · 2026

DeepSeek-V4

SGLang · 2026

DeepSeek-V4-Pro vLLM Recipe

vLLM · 2026

Build with DeepSeek V4 Using NVIDIA Blackwell and GPU-Accelerated Endpoints

NVIDIA · 2026