litellm/tests/unit/litellm_proxy_extras
Mrinal Chanshetty ce2dd040ee fix(proxy): keep the daily tag spend unique key and record the virtual key's team
Swapping the unique key on LiteLLM_DailyTagSpend broke older proxies during a rolling upgrade,
because their ON CONFLICT target no longer matched an index. The key now stays as it is and
team_id is a plain column, stamped only when a team's virtual key authenticated the request.
That key already pins each row to one team through api_key. JWT, custom auth, OAuth2, UI
sessions, the master key and team-less keys get ''

On conflict a non-empty team overwrites the stored one, so rows an older proxy wrote are filled
in by the next write and a key moved mid-day lands under its latest team. The two migrations
that built the new unique index and dropped the old one are removed, and the remaining two are
renamed to sort after main's latest migration
2026-10-31 08:36:15 -07:00
..
__init__.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_litellm_proxy_extras_logging.py ci: move caching, proxy-extras, gateway and enterprise tests into tests/unit and run them from litellm-tests (#42902) 2026-09-24 15:49:59 -07:00
test_litellm_proxy_extras_utils.py fix(proxy): keep the daily tag spend unique key and record the virtual key's team 2026-10-31 08:36:15 -07:00
test_migration_data_checks.py feat(proxy): replace the pre-migration row check with a rolled-back dry run of the pending migrations (#48961) 2026-10-29 09:39:26 -07:00
test_migration_dry_run.py feat(proxy): replace the pre-migration row check with a rolled-back dry run of the pending migrations (#48961) 2026-10-29 09:39:26 -07:00
test_prisma_toolchain.py test: migrate proxy security, schema migration and MCP legacy tests (#45937) 2026-10-11 16:17:24 -07:00
test_request_log_indexes.py fix(proxy-extras): build the SpendLogs indexes in the migration job instead of in migrations (#43948) 2026-10-01 14:12:22 -07:00