A relay that sells kimi-k3 as moonshot-kimi-k3 answers as kimi-k3, and the
record keeps that as served, but the ledger priced only Record.Model, so
every such call showed "no price" and counted $0 although
relay-a/kimi-k3 has one ($3/$15, cache $0.3/$3 from models.dev).
pricer (which the ledger, the request page, sessions totals, OTel and
NewCoster all use) now falls back to EffectivePriceIn(provider, served)
when the model asked for has no price. The model asked for keeps its own
price whenever it has one, a zero set by the user included, so a ledger
that matched a vendor's bill still does; the served name is only used
where there was nothing. The cache key includes served. Documented
beside `magpie model price` in docs/reference.md.
Run: TestLedgerPricesARenamedModelAsTheOneServed (the reporter's record
byte for byte: priced at $0.0916398; a priced model keeps its own; a
user's 0 stays 0; a model priced by neither name stays unpriced), red on
the old pricer; go test -tags nogui ./internal/usage. Built magpie in a
sandbox HOME with the real models.dev cache and a relay-a custom
provider, the reporter's record in usage.jsonl: `magpie usage today`
shows "≈$0.092" where the old build shows "no price", and `usage --csv`
cost_usd 0.091640. gofmt -l, GOOS=linux/windows go vet clean.