litellm/tests/test_litellm/proxy/common_utils
Yuneng Jiang c41567eaa0
fix(budget_reset): use raw SQL for IS NOT NULL filter on Json? columns
The periodic budget-window reset job filtered keys/teams with
`where={"budget_limits": {"not": None}}`. The prisma-client-python
library does not support null-filtering on `Json?` columns (no
DbNull/JsonNull sentinel — upstream issue #714). The client drops the
`None` value during serialization and the engine rejects the query with
`MissingRequiredValueError: where.budget_limits.not: A value is
required but not set`, so neither the key nor team reset path runs.

Switch those two `find_many` calls to `query_raw` with
`WHERE budget_limits IS NOT NULL`, selecting only the PK and the
`budget_limits` column. Writes still go through the ORM. Add unit tests
covering the expired/unexpired paths for keys and teams, string-encoded
JSON payloads, empty payloads, error isolation between the two paths,
and a regression guard asserting the query still uses `IS NOT NULL`.
2026-04-23 12:26:25 -07:00
..
test_callback_utils.py Prompt Compression - add it to the proxy (#25729) 2026-04-20 15:08:00 -07:00
test_custom_openapi_spec.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_get_routes.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_http_parsing_utils.py Merge remote-tracking branch 'origin/litellm_internal_staging' into litellm_yj_apr17 2026-04-17 17:36:40 -07:00
test_key_rotation_e2e.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
test_key_rotation_integration.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_key_rotation_lock.py Litellm ishaan april4 2 (#25150) 2026-04-04 23:09:42 +00:00
test_key_rotation_manager.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_load_config_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openai_endpoint_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_path_utils.py test: add unit tests for path_utils safe_join and safe_filename 2026-04-16 03:25:42 +00:00
test_reset_budget_job.py fix(budget_reset): use raw SQL for IS NOT NULL filter on Json? columns 2026-04-23 12:26:25 -07:00
test_timezone_utils.py fix(budget): fix timezone config lookup and replace hardcoded timezone map with ZoneInfo (#21754) 2026-02-21 19:35:06 -08:00
test_upsert_budget_membership.py fix: give each team member an independent budget instead of sharing the team default 2026-04-21 17:58:50 -07:00