litellm/tests/unit/accounting
ishaan-j-berri e23535b635
feat(customer-portal): show token usage and cache costs (#52601)
* feat(customer-portal): show token usage and cache costs

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(customer-portal): keep usage lint and OpenAPI in sync

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(customer-portal): type legacy cache cost lookup

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* feat(customer-portal): move cache usage into the organization overview

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* feat(customer-portal): group the token breakdown in one column

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* feat(customer-portal): chart the full organization token breakdown

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* feat(customer-portal): show cache hit rate in the tokens column

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* test(customer-portal): cover mixed cache costs in daily usage

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(accounting): preserve recorded zero cache charges

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* revert(accounting): defer zero cache charge logging fix

This reverts commit b11c898095.

Co-Authored-By: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>

* fix(customer-portal): use a dash for missing cache costs

* refactor(customer-portal): keep usage totals immutable

* test(customer-portal): isolate cache usage fixtures

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ishaan Jaffer <155045088+ishaan-berri@users.noreply.github.com>
Co-authored-by: Tin <tin@berri.ai>
2026-11-18 18:49:08 -08:00
..
__init__.py feat(accounting): add accounting contracts, PricingSnapshot and ledger schema (LIT-10193) (#48862) 2026-10-28 14:39:25 -07:00
test_application.py feat(proxy): enforce customer org, team and member budgets and limits on the request path (#51489) 2026-11-12 20:43:44 -08:00
test_delivery_projection.py feat(customer portal): set budgets per customer and gateway app (#52477) 2026-11-18 17:31:03 +00:00
test_metrics.py fix(accounting): stop delivery metrics from scanning retained receipts on every flush (#50565) 2026-11-07 18:21:32 -08:00
test_projection.py feat(customer-portal): show token usage and cache costs (#52601) 2026-11-18 18:49:08 -08:00
test_worker.py feat(proxy): enforce customer org, team and member budgets and limits on the request path (#51489) 2026-11-12 20:43:44 -08:00