Skip to content

Missing explicit pricing entry for Opus 4.8 (claude-opus-4-8) #133

@Ninhache

Description

@Ninhache

Summary

There's no explicit pricing entry for Opus 4.8 (claude-opus-4-8) in the pricing tables, even though it's the current top Opus model. The explicit table lists claude-opus-4-7, -4-6, and -4-5, but not -4-8.

Current behavior

Cost for claude-opus-4-8 is still calculated — but only because it falls through to the generic opus substring fallback, which returns the 4.7 rate:

  • cli.py:41-42if "opus" in m: return PRICING["claude-opus-4-7"]
  • dashboard.py:543if (m.includes('opus')) return PRICING['claude-opus-4-7'];

Opus 4.8 has the same API pricing as 4.7 ($5 / $25 input/output, $0.50 cache read, $6.25 cache write per MTok), so the numbers happen to be correct today.

Why it's still worth fixing

  1. Silent mis-costing risk — the fallback hard-codes 4.7. If 4.8 is ever priced differently, costs will be wrong with no signal.
  2. Inconsistency — 4-7/4-6/4-5 are explicit entries; the newest/most-used model isn't.
  3. Stale fallback default — the opus catch-all should point at the latest model (4.8), not a previous one.
  4. Touches the dual-pricing-table maintenance noted in Pricing table duplicated across cli.py and dashboard.py — make Python the single source of truth #82 — both cli.py and dashboard.py need the entry.

Proposed fix

Add an explicit claude-opus-4-8 entry to both pricing tables (same rates as 4.7) and bump the opus fallback default to claude-opus-4-8:

# cli.py PRICING
"claude-opus-4-8":   {"input": 5.00, "output": 25.00, "cache_read": 0.50, "cache_write": 6.25},
// dashboard.py PRICING
'claude-opus-4-8':   { input:  5.00, output: 25.00, cache_write:  6.25, cache_read: 0.50 },

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions