litellm/tests/unit/repositories
ishaan-j-berri 8d80898178
feat(customer portal): set budgets per customer and gateway app (#52477)
* feat(customer-portal): set budgets per customer and gateway app

Let administrators choose Teams, Projects, or Virtual Keys as the gateway-wide app scope and assign customer budgets from existing budget groups.

Includes the shared budget-group integration from PR #52411 and builds on the existing app accounting implementation.

* fix(customer-portal): show app usage and resolve CI regressions

Use the existing dashboard controls and compact budget rows. Add app filtering to customer usage and retain trusted app context for budget rejections.

Update request-header handling, tracing registry coverage, bounded app discovery, and optional caller-metadata tests.

* fix(customer-portal): enforce app caps and charge each window once

Enforce an authenticated app budget when optional customer and app headers are omitted. Normalize overlapping scalar and explicit budget windows to a single charge with the stricter cap and explicit reset time.

Cover all app primitives through native HTTP auth and use realistic empty gateway configuration in existing test doubles.

* fix(customer-portal): reuse budget controls and admission

Use shared customer budget controls for app forms and resolve member budgets at one owner. Remove unused app lifecycle and listing routes.

Parse request identity once, check each global and app scope once, and keep app counters alive through the existing database flush window.
2026-11-18 17:31:03 +00:00
..
__init__.py test: add __init__.py to new tests/unit packages 2026-09-20 12:36:13 +00:00
test_alert_repository.py feat(alerts): display prompt cache advisories in existing alerts (#51943) 2026-11-16 14:49:52 -08:00
test_chunked_in.py ci: fail on new unbounded SQL IN lists and add a Prisma chunking helper (#42629) 2026-09-26 13:40:44 -07:00
test_daily_activity_repository.py feat(proxy): add a surcharge on customer requests (#52406) 2026-11-19 00:45:10 +08:00
test_daily_activity_sql.py feat(customer portal): set budgets per customer and gateway app (#52477) 2026-11-18 17:31:03 +00:00
test_database.py feat(auth): read virtual keys, jwt key mappings and model access groups through rust repositories (#52173) 2026-11-18 03:53:37 +00:00
test_gateway_activity_repository.py refactor(proxy): inject gateway activity through a typed repository (#49116) 2026-10-30 16:25:11 -07:00
test_performance_alert_repository.py feat(alerts): display prompt cache advisories in existing alerts (#51943) 2026-11-16 14:49:52 -08:00
test_plugin_publication.py feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
test_plugin_upload_repository.py feat(skills): show download counts and downloader history (#50165) 2026-11-05 05:25:08 -08:00
test_repositories.py refactor(proxy): inject deployment warning ignores through repositories (#48592) 2026-10-30 22:57:55 +00:00
test_rust_database.py feat(auth): read virtual keys, jwt key mappings and model access groups through rust repositories (#52173) 2026-11-18 03:53:37 +00:00
test_skill_submission_repository.py feat(skills): add sortable Skills Hub catalog and publication audit (#50195) 2026-11-06 00:57:33 +00:00
test_spend_log_insert.py feat(accounting): add opt-in SpendLogs ledger (#49856) 2026-11-04 17:49:15 -08:00
test_unit_of_work.py fix(proxy): keep carried end-user spend when a budget reset is retried (#51143) 2026-11-14 01:03:19 +00:00