litellm/tests/unit/proxy/utils/prisma_and_spend
Mateo Wang 3f38730d2c
refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986)
* refactor(typing): clear basedpyright Any errors (wave 1)

* refactor(typing): clear basedpyright Any errors (wave 2)

* refactor(typing): clear basedpyright Any errors (wave 3)

* refactor(typing): clear basedpyright Any errors (wave 4)

* refactor(typing): clear basedpyright Any errors (wave 5)

* refactor(typing): clear basedpyright Any errors (wave 6)

* fix(typing): keep the cached-plan fallback's direct query_first calls so span naming resolves

* fix(logging): keep callbacks running when litellm_params is a params model

should_run_callback and the sync success and failure handlers read litellm_params through any object with a get method again, as they did before this branch, so a logging hook that returns a GenericLiteLLMParams no longer stops sync logging for that request

Adds behavior tests for the changed lines codecov listed as not run

* fix: read the regional uplift for every data residency again and reuse one dict TypeAdapter

The typed lookup only read the eu and us multipliers, so a deployment that set regional_processing_uplift_multiplier_fedramp stopped applying it. /model/update and the model write paths now share one module-level TypeAdapter instead of building one per call.

* fix: bill regional uplift multipliers float() accepts, bytes included

* fix: raise the in operator's own error from one shared json_contains, and name the bad uplift type
2026-11-06 13:31:15 -08:00
..
__init__.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
_harness_smoke_test.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
conftest.py feat(accounting)!: make the SpendLogs ledger the default accounting path (#49872) 2026-11-05 09:14:10 -08:00
test_cache_user_row.py refactor(proxy): expose public names for private proxy helpers (#45170) 2026-10-07 18:59:27 -07:00
test_config_param_cache.py fix(proxy): unset DB environment variables removed from the row on every worker by row revision (#46709) 2026-10-17 03:51:05 +00:00
test_password_helpers.py feat(proxy): hash UI passwords with PBKDF2 in FIPS mode (#49874) 2026-11-06 01:31:59 -08:00
test_prisma_client_engine_watcher.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
test_prisma_client_get_data.py refactor(typing): clear about 1,100 basedpyright Any errors across 303 files (#49986) 2026-11-06 13:31:15 -08:00
test_prisma_client_health.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
test_prisma_client_lifecycle.py refactor(proxy): inject database repositories through per-repository dependencies (#48507) 2026-10-30 22:57:54 +00:00
test_prisma_client_reconnect.py test(proxy): move utils, agent_endpoints and endpoint tests into tests/unit/proxy (#44006) 2026-10-01 11:06:42 -07:00
test_prisma_client_writes.py fix(users)!: validate custom IDs and reject concurrent duplicate creation (#49748) 2026-11-05 17:07:19 -08:00
test_proxy_update_spend.py fix(proxy): requeue spend logs when a Postgres restart tears down the prisma engine mid-write (#47571) 2026-10-20 09:08:18 -07:00
test_send_email.py feat: email affected owners before model deprecations (#50172) 2026-11-05 16:14:12 +08:00
test_spend_functions.py fix(proxy): treat Postgres restart and shutdown errors as DB unavailable, not poison spend-log rows (#50132) 2026-11-04 17:39:30 -08:00