Skip to content

claude-opus-5 / claude-sonnet-5 price at $0, and the documented models.dev.json override is never loaded #509

Description

@willwashburn

Two composing defects leave the ledger blind on two of the three Anthropic models in daily use. Observed on burn 4.0.0 (burn summary --since 7d: claude-opus-5 … $0.00, claude-sonnet-5 … $0.00, with the no pricing for model(s) warning, while claude-fable-5 prices correctly).

1. Vendored snapshot is missing the models. crates/relayburn-sdk/data/models.dev.jsonanthropic.models contains claude-fable-5 and the 4.x line, but not claude-opus-5 or claude-sonnet-5. Current first-party rates (per MTok):

model input output cache_read (0.1×) cache_write (1.25×, 5m TTL)
claude-opus-5 $5 $25 $0.50 $6.25
claude-sonnet-5 $3 $15 $0.30 $3.75

(Sonnet 5 has intro pricing of $2/$10 through 2026-08-31; the table above is the sticker rate.) pnpm run pricing:update should pick both up from models.dev.

2. The user override file is documented but never read. The README ("User overrides live at $RELAYBURN_HOME/models.dev.json") and the summary command's own warning hint ("add an override at $RELAYBURN_HOME/models.dev.json", crates/relayburn-cli/src/commands/summary/human.rs:597) both point at the override path — but every non-test call site passes load_pricing(None):

  • query_verbs/summary/mod.rs (3 sites)
  • query_verbs/sessions.rs:51,200
  • query_verbs/compare.rs:129

load_pricing(Some(path)) and the shallow-merge logic exist and are unit-tested (pricing.rs), but no runtime path resolves $RELAYBURN_HOME/models.dev.json and passes it in. Verified empirically: writing a correct override there, then burn state rebuild index && burn ingest, still reports $0 with the no-pricing warning.

Fix shape: resolve <ledger_home>/models.dev.json wherever the ledger home is already resolved and thread it into load_pricing at the query-verb call sites, plus refresh the vendored snapshot. Either half alone unblocks; both are correct.

Why it matters: budget enforcement built on burn summary --session silently under-reports any opus-5/sonnet-5 seat as free — the exact models most worth metering.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions