DeepSeek v4 and Claude pricing data gaps
NousResearch/hermes-agent · cluster 24141 · agent
Data as of
2 open items. Fix merged in #24579. Check it covers your case.
The short answer
- Known?
- Yes. 14 related items grouped here, 2 issues already closed.
- Fix event
- A fix was merged to main in PR #24579. Check it covers your case. No release data is tracked.
- Tracker
- The maintainers' tracker marks this
partially resolved, deciding PR #65607. That is separate from the fix event. - Still open
- 2 issues and 0 PRs.
Next step: read #24579, then check whether your report is one of the 2 still open.
Read #24579Pick up a Lab taskMost members concern missing or incorrect pricing entries for DeepSeek v4-pro and v4-flash models, including a reported 4x overcharge on v4-pro rates. A smaller subset addresses a missing Claude Fable 5 pricing entry with similar unknown-cost symptoms.
Open issues2
Open PRs0
Fixes on record
-
#24579 fix(pricing): add deepseek-v4-pro to official docs pricing table
files:
agent/usage_pricing.py,scripts/release.py,tests/agent/test_usage_pricing.py -
#65607 fix(pricing): add deepseek-v4-flash entry + refresh stale DeepSeek snapshot to 2026-07 rates
files:
agent/usage_pricing.py,scripts/release.py,tests/agent/test_usage_pricing.pyShow the diff
-
agent/usage_pricing.py@@ -446,36 +446,52 @@ class CostResult: pricing_version="anthropic-pricing-2026-05", ), # DeepSeek + # Snapshot of https://api-docs.deepseek.com/quick_start/pricing (2026-07). + # deepseek-chat / deepseek-reasoner are deprecated 2026-07-24 and now alias + # deepseek-v4-flash's non-thinking / thinking modes — same rates. ( "deepseek", "deepseek-chat", ): PricingEntry( input_cost_per_million=Decimal("0.14"), output_cost_per_million=Decimal("0.28"), + cache_read_cost_per_million=Decimal("0.0028"), source="official_docs_snapshot", source_url="https://api-docs.deepseek.com/quick_start/pricing", - pricing_version="deepseek-pricing-2026-03-16", + pricing_version="deepseek-pricing-2026-07", ), ( "deepseek", "deepseek-reasoner", ): PricingEntry( - input_cost_per_million=Decimal("0.55"), - output_cost_per_million=Decimal("2.19"), + input_cost_per_million=Decimal("0.14"), + output_cost_per_million=Decimal("0.28"), + cache_read_cost_per_million=Decimal("0.0028"), source="official_docs_snapshot", source_url="https://api-docs.deepseek.com/quick_start/pricing", - pricing_version="deepseek-pricing-2026-03-16", + pricing_version="deepseek-pricing-2026-07", ), ( "deepseek", "deepseek-v4-pro", ): PricingEntry( - input_cost_per_million=Decimal("1.74"), - output_cost_per_million=Decimal("3.48"), - cache_read_cost_per_million=Decimal("0.0145"), + input_cost_per_million=Decimal("0.435"), + output_cost_per_million=Decimal("0.87"), + cache_read_cost_per_million=Decimal("0.003625"), + source="official_docs_snapshot", + source_url="https://api-docs.deepseek.com/quick_start/pricing", + pricing_version="deepseek-pricing-2026-07", + ), + ( + "deepseek", + "deepseek-v4-flash", + ): PricingEntry( + input_cost_per_million=Decimal("0.14"), + output_cost_per_million=Decimal("0.28"), + cache_read_cost_per_million=Decimal("0.0028"), source="official_docs_snapshot", source_url="https://api-docs.deepseek.com/quick_start/pricing", - pricing_version="deepseek-pricing-2026-05-12", + pricing_version="deepseek-pricing-2026-07", ), # Google Gemini ( -
scripts/release.py@@ -351,6 +351,7 @@ "[redacted:email]": "dirtyren", "[redacted:email]": "Code-suphub", "[redacted:email]": "Code-suphub", + "[redacted:email]": "shuangxinniao", "[redacted:email]": "brendandebeasi", "[redacted:email]": "dorokuma", "[redacted:email]": "liuwei666888", -
tests/agent/test_usage_pricing.py@@ -223,7 +223,8 @@ def test_deepseek_v4_pro_pricing_entry_exists(): Before this fix, deepseek-v4-pro sessions showed as unknown cost in hermes insights because the _OFFICIAL_DOCS_PRICING table had no - entry for that model. See #24218. + entry for that model. See #24218. Rates track the 2026-07 price cut + ($1.74/$3.48 → $0.435/$0.87). """ entry = get_pricing_entry( "deepseek-v4-pro", @@ -233,9 +234,9 @@ def test_deepseek_v4_pro_pricing_entry_exists(): assert entry is not None assert entry.input_cost_per_million is not None assert entry.output_cost_per_million is not None - assert float(entry.input_cost_per_million) == 1.74 - assert float(entry.output_cost_per_million) == 3.48 - assert float(entry.cache_read_cost_per_million) == 0.0145 + assert float(entry.input_cost_per_million) == 0.435 + assert float(entry.output_cost_per_million) == 0.87 + assert float(entry.cache_read_cost_per_million) == 0.003625 def test_deepseek_v4_pro_estimate_usage_cost(): @@ -248,8 +249,39 @@ def test_deepseek_v4_pro_estimate_usage_cost(): assert result.status == "estimated" assert result.amount_usd is not None - # 1M input × $1.74/M + 500K output × $3.48/M = $1.74 + $1.74 = $3.48 - assert float(result.amount_usd) == 3.48 + # 1M input × $0.435/M + 500K output × $0.87/M = $0.435 + $0.435 = $0.87 + assert float(result.amount_usd) == 0.87 + + +def test_deepseek_deprecated_aliases_price_as_v4_flash(): + """Invariant: deepseek-chat / deepseek-reasoner are deprecated aliases for + deepseek-v4-flash's non-thinking / thinking modes (deprecation 2026-07-24) + — they must bill at identical rates to the flash entry, or sessions on the + legacy names over/under-report cost.""" + flash = get_pricing_entry("deepseek-v4-flash", provider="deepseek") + assert flash is not None + for alias in ("deepseek-chat", "deepseek-reasoner"): + entry = get_pricing_entry(alias, provider="deepseek") + assert entry is not None, alias + assert entry.input_cost_per_million == flash.input_cost_per_million, alias + assert entry.output_cost_per_million == flash.output_cost_per_million, alias + assert ( + entry.cache_read_cost_per_million == flash.cache_read_cost_per_million + ), alias + + +def test_deepseek_rows_all_carry_cache_read_pricing(): + """Invariant: DeepSeek publishes a cache-hit rate for every current model; + every deepseek snapshot row must carry cache_read < input so cached + sessions estimate correctly instead of billing reads at full price.""" + from agent.usage_pricing import _OFFICIAL_DOCS_PRICING + + ds_rows = [k for k in _OFFICIAL_DOCS_PRICING if k[0] == "deepseek"] + assert ds_rows, "expected at least one deepseek pricing row" + for key in ds_rows: + entry = _OFFICIAL_DOCS_PRICING[key] + assert entry.cache_read_cost_per_million is not None, key + assert entry.cache_read_cost_per_million < entry.input_cost_per_million, key def test_bedrock_claude_rows_all_carry_cache_pricing(): @@ -415,3 +447,37 @@ def test_fireworks_rows_all_carry_cache_read_pricing(): entry = _OFFICIAL_DOCS_PRICING[key] assert entry.cache_read_cost_per_million is not None, key assert entry.cache_read_cost_per_million < entry.input_cost_per_million, key + + +def test_deepseek_v4_flash_pricing_entry_exists(): + """Regression test: deepseek-v4-flash must have a pricing entry. + + Before this fix, deepseek-v4-flash sessions showed $0.00 / cost_source + "none" because the _OFFICIAL_DOCS_PRICING table had an entry for + deepseek-v4-pro but not the (newer) flash model. DeepSeek's /models + endpoint returns no pricing, so the official-docs snapshot is the only + source for direct-provider routes. + """ + entry = get_pricing_entry( + "deepseek-v4-flash", + provider="deepseek", + ) + + assert entry is not None + assert float(entry.input_cost_per_million) == 0.14 + assert float(entry.output_cost_per_million) == 0.28 + assert float(entry.cache_read_cost_per_million) == 0.0028 + + +def test_deepseek_v4_flash_estimate_usage_cost(): + """Ensure deepseek-v4-flash sessions get a dollar estimate, not $0/none.""" + result = estimate_usage_cost( + "deepseek-v4-flash", + CanonicalUsage(input_tokens=[redacted:secret-assignment] output_tokens=[redacted:secret-assignment] + provider="deepseek", + ) + + assert result.status == "estimated" + assert result.amount_usd is not None + # 1M input × $0.14/M + 500K output × $0.28/M = $0.14 + $0.14 = $0.28 + assert float(result.amount_usd) == 0.28
-
8 PRs closed without merging
From the close comments: merged via another change 3 · closed without comment 1 · done elsewhere 1 · duplicate 1 · superseded by another PR 1 · other 1
- #24195 fix(insights): show DeepSeek costs · closed without comment
-
#24216 feat(pricing): add deepseek-v4-pro to docs pricing snapshot · superseded by another PR →
#24579,#24327 -
#24327 fix: add pricing for deepseek-v4-pro model · merged via another change →
#24579 -
#32035 fix(pricing): add deepseek-v4-flash to official docs pricing table · merged via another change →
#40127,#41719,#65607 -
#41719 feat(pricing): add deepseek-v4-flash pricing entry · merged via another change →
#40127,#65607,#41710
Closed issues · 2
How this cluster was grouped
-
Link evidence (
partly structural links): some members are connected by structural evidence (shared changed files, or a closing/superseded reference); the rest are joined by an automated relevance judgement over their text. - Members outside that structural core may belong to a different underlying problem.
-
Pairwise link density
0.14: the share of item pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36.1.00means every pair is linked.
Pick up a Lab task
Check whether a fix covers the open issues here, with your own agent. Bring back evidence for maintainers.
Open the Lab