Skip to content

Honest cost visibility #12

Description

@jellologic

Problem

Cost tracking for third-party models is broken across the whole ecosystem, and structurally so:

  • Claude Code writes zero-token usage rows for non-Anthropic models (ccstatusline#147, maintainer: "This is a bug with non-Anthropic models in claude code"). Every JSONL-reading tool inherits this.
  • ccusage's price lookup misses third-party model names entirely (#1201, #1473), and its fuzzy matching overcharges#934 has gpt-5.4-mini matching gpt-5.
  • Both requests to fix this were closed as not_planned (#656, #546).

Log-readers cannot solve this: the tokens aren't in the log.

Why we're positioned differently

We know the exact model id and its exact price per million tokens — we cached both at selection time. We don't have to infer either.

Proposal

Start honest and small: surface what a session would cost per million tokens at selection time, and estimate from whatever usage data is actually trustworthy.

Acceptance criteria

  • Show input/output/cache pricing for the configured models
  • Where usage data is available and non-zero, estimate spend
  • Never present an estimate as measured — label it clearly
  • Where the zero-token bug applies, say the data is unavailable rather than reporting $0.00
  • No pricing shown for providers whose catalog lacks it

Explicitly out of scope for now

Full usage tracking. Until the upstream zero-token bug is fixed, any per-session total would be a guess. Reporting a confident wrong number is worse than reporting nothing — that's precisely the failure mode we're differentiating against.

Metadata

Metadata

Assignees

No one assigned

    Labels

    costPricing and usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions