Files
routstr-core/tests
Jeroen UbbinkandClaude Opus 5 337be4895e fix(billing): a rate of zero is a price, not a missing price
The gate that decides a model cannot be priced on tokens asked
`input_rate and output_rate`, so a rate of zero read as an absent one and the
request was billed the whole reservation. The catalog serves such a model and
the router routes it — this PR says so in as many words — and then billing
charged it as if it had no price at all.

For a model that is free on both sides the reservation is the minimum-request
floor, so the overcharge is a msat. The bite is a model free on one side only:
the reservation there is the context window priced at the paid rate, charged
flat on every request no matter how few tokens it used. The catalog import
filter rejects only a both-zero price, so those models are ingested, served and
routed today.

Ask only whether each rate is usable. A zero rate now bills as what it is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014X8RZzzbAuQCbavhFjTvJ4
2026-08-26 15:47:44 +02:00
..
2025-08-06 20:31:55 -03:00