feat(deepseek): DeepSeek-V4.1-Flash, and V4 Pro's retirement onto it - #925
Merged
Conversation
`deepseek-flash` is DeepSeek's current line: 1M context, 384K max output, thinking on by default, and the first DeepSeek model that accepts an image — it folds in the retired `deepseek-v4-flash-vision-exp`, so a screenshot no longer needs a fusion model on this provider. It becomes the provider default and the whole subagent tier table. That is the vendor's arrangement, not a simplification: DeepSeek says V4.1 Flash "has comprehensively surpassed V4 Pro in performance, cost, speed, and total time", and from 2026-09-14 routes every `deepseek-v4-pro` request to it at the Flash price — so an opus-tier row naming v4-pro buys nothing after that date and costs up to 4.4x more before it. Every older spelling still resolves, so a pinned session keeps working. Pricing moves on two axes, both read off the request's timestamp: * V4.1 Flash is CHEAPER than the V4 flash card it replaces — 0.15/0.6/0.003 against 0.22/0.66/0.007 off-peak — and the retired flash ids share it, since DeepSeek serves them from V4.1 Flash and bills them at its price. * `deepseek-v4-pro` keeps its own card until 2026-09-14 12:00 Beijing (04:00 UTC) and prices as Flash from that instant. A date axis rather than a card edit because both sides are live: flattening pro onto the flash card outright would restate an August session 4.4x low, and leaving it on the pro card would over-report every later request by the same factor. The peak/off-peak schedule composes with both, unchanged. One structural change: `ModelConfig.claims_prefix`. `deepseek-flash`'s prefix base under `get_model_config`'s fallback is the bare family name, so registering it would have captured `deepseek-chat`, `deepseek-reasoner` and OpenRouter's `deepseek/…` ids — the last of which is pinned at the 200K default. The row opts out of the fallback and stays reachable by its exact id. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SVGGzhJqfzCVVgK4XuA6vp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
deepseek-flash— DeepSeek-V4.1-Flash — is DeepSeek's current line: 1M context, 384K max output, thinking on by default, and the first DeepSeek model that accepts an image. It folds in the retireddeepseek-v4-flash-vision-exp, so a pasted screenshot no longer needs a fusion model on this provider.Spec and rates read from api-docs.deepseek.com/quick_start/pricing on 2026-09-10.
The DeepSeek line collapses onto it
It becomes the provider default and the whole subagent tier table (opus/sonnet/haiku). That's the vendor's arrangement rather than a simplification — DeepSeek says V4.1 Flash "has comprehensively surpassed V4 Pro in performance, cost, speed, and total time" and from 2026-09-14 routes every
deepseek-v4-prorequest to it at the Flash price. An opus-tier row naming v4-pro buys nothing after that date and costs up to 4.4× more before it.deepseek-v4-pro,deepseek-v4-flash,deepseek-chatanddeepseek-reasonerall still resolve and stay listed, so a pinned session keeps working (and the subagent resolver doesn't degrade it to inherit).Pricing moves on two axes, both read off the request's timestamp
$0.15$0.60$0.003deepseek-v4-prokeeps its own card until 2026-09-14 12:00 Beijing (04:00 UTC) and prices as Flash from that instant. A date axis rather than a card edit because both sides are live: flattening pro onto the flash card outright would restate an August session 4.4× low, and leaving it on the pro card would over-report every later request by the same factor.compute_costalready carried the request timestamp for the peak schedule, so the retirement rides the same value.On the agent token mix issue #904 measured (95.6% cache read), 1M tokens off-peak now costs $0.0107 against $0.0536 on the old pro card.
One structural change
ModelConfig.claims_prefix.deepseek-flash's prefix base underget_model_config's fallback (key.rsplit("-", 1)[0]) is the bare family name, so registering the row would have captureddeepseek-chat,deepseek-reasonerand OpenRouter'sdeepseek/…ids — the last of whichtest_deepseek_prefix_cache.pypins at the 200K default as "decision #1". The row opts out of the fallback and stays reachable by its exact id. Every other row keeps the defaultTrue.Tests
New coverage for the cutover (instant, Beijing→UTC conversion, composition with the peak windows, and that history isn't restated), the retired ids sharing the flash card, the prefix opt-out, and vision being flash-only. Existing DeepSeek cards, windows and subagent-tier expectations updated.
🤖 Generated with Claude Code