litellm/litellm-rust/crates/cost
yujonglee 1595adfb2f
docs(model-catalog): explain meter, band, channel and When (#49447)
* docs(model-catalog): explain meter, band, channel and When

Add a Concepts section to the model-catalog AGENTS.md with worked key
breakdowns, doc comments on the undocumented litellm-cost price types,
and a cost AGENTS.md that points to the concepts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(model-catalog): write concepts as nested lists

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(model-catalog): spell out band rules and channel fallbacks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-31 16:09:29 +00:00
..
src docs(model-catalog): explain meter, band, channel and When (#49447) 2026-10-31 16:09:29 +00:00
AGENTS.md docs(model-catalog): explain meter, band, channel and When (#49447) 2026-10-31 16:09:29 +00:00
Cargo.toml refactor(model-catalog): parse, lower and validate the catalog into typed prices (#48853) 2026-10-28 18:24:40 -07:00
README.md refactor(model-catalog): parse, lower and validate the catalog into typed prices (#48853) 2026-10-28 18:24:40 -07:00

litellm-cost

This crate holds the price data model that litellm-model-catalog lowers each catalog entry into, plus the usage, call context and priced outcome types that calculate will compute over. There is no calculate until the token pricing PR lands. UnitPrice is USD per unit and Usd is an amount, and only the operations that make sense between them exist, so a price is never added to an amount. Prices::band and Prices::rate resolve a token rate the way Python's _get_token_base_cost does