# NousResearch/hermes-agent · DeepSeek v4 and Claude pricing data gaps

## Open now

- 2 issues, 0 PRs open on GitHub.
- #24141: insights: DeepSeek v4-pro/v4-flash pricing not matching + cost not rendered in output
- #43321: claude-fable-5 missing from _OFFICIAL_DOCS_PRICING → $0/unknown cost on direct Anthropic

Most 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.

## TL;DR

- 14 member(s): 2 open issue(s), 2 closed issue(s), 0 open PR(s), 2 merged PR(s), 8 PR(s) closed without merging.
- A fix was merged to main in PR #24579. Verify it addresses your case.
- **Recommended:** read PR #24579 (and any competing PRs below) before filing. Confirm the merged change covers your symptom.

## Maintainer resolution verdict

- Internal-tracker verdict over this cluster's issue members: `partially_resolved` · deciding PR(s): `pr-65607`. This is distinct from the fix status above. Weigh it yourself.

## How this cluster was grouped

- Link evidence (`STRUCTURAL_PARTIAL`): 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 member pairs that carry a link, counting a structural link in full and a relevance-only link at 0.36. `1.00` means every pair is linked.

## Open related issues

- #24141: insights: DeepSeek v4-pro/v4-flash pricing not matching + cost not rendered in output
- #43321: claude-fable-5 missing from _OFFICIAL_DOCS_PRICING → $0/unknown cost on direct Anthropic

## Closed / duplicate issues

- #24218: \[Bug\]: deepseek-v4-pro sessions show as unknown cost in \`hermes insights\`
- #41710: deepseek-v4-flash missing from _OFFICIAL_DOCS_PRICING → $0/unknown cost

## Prior & competing PRs

- **#24579: fix(pricing): add deepseek-v4-pro to official docs pricing table**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - 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**. merged to main · fix tier `verified`
  - maintainer direction: category `merged`; implication `superseded`
  - files: `agent/usage_pricing.py`, `scripts/release.py`, `tests/agent/test_usage_pricing.py`
  - fix hunks:
  - `agent/usage_pricing.py`

    ```diff
    @@ -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`

    ```diff
    @@ -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`

    ```diff
    @@ -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",
    ```

    ```diff
    @@ -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():
    ```

    ```diff
    @@ -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():
    ```

    ```diff
    @@ -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
    ```
- **#24195: fix(insights): show DeepSeek costs**. closed without merge
  - maintainer direction: category `silent_close`; implication `active`
- **#24216: feat(pricing): add deepseek-v4-pro to docs pricing snapshot**. closed without merge
  - maintainer direction: category `superseded_by_pr`; implication `superseded`; refs `#24579`, `#24327`
- **#24327: fix: add pricing for deepseek-v4-pro model**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#24579`
- **#32035: fix(pricing): add deepseek-v4-flash to official docs pricing table**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#40127`, `#41719`, `#40127`, `#65607`
- **#41719: feat(pricing): add deepseek-v4-flash pricing entry**. closed without merge
  - maintainer direction: category `merged_via`; implication `superseded`; refs `#40127`, `#65607`, `#41710`
- **#41723: fix(pricing): refresh stale deepseek-v4-pro rates (4x overstated)**. closed without merge
  - maintainer direction: category `implemented_elsewhere`; implication `superseded`; refs `#65607`, `#41719`
- **#43317: fix(pricing): add Claude Fable 5 usage pricing**. closed without merge
  - maintainer direction: category `uncategorized`; implication `needs_llm`
- **#59095: \[codex\] refresh DeepSeek v4 pricing**. closed without merge
  - maintainer direction: category `duplicate_of`; implication `duplicate`; refs `#32035`, `#32035`, `#41723`, `#41719`, `#40127`, `#41710`

## Fix status

- Merged to main in PR #24579 (cited above). No release data is tracked. Verify downstream.
- Fix last verified (merged) `2026-07-16`.
- Subsystem: `agent`
