litellm/tests/test_litellm/proxy/db
yassin acd4f0eb04 fix(spend_tracking): attribute router-rejected requests to the model group provider
A request for a configured model group that the router rejects before picking a deployment (all deployments in cooldown, no healthy deployment) never gets a custom_llm_provider in its logging kwargs. The spend log payload persisted an empty provider, the daily spend tables carried it through, and the Admin UI Usage page rendered those requests under unknown even though every model in the group has a provider

get_logging_payload now takes the proxy router and, when the logged provider is missing, infers it from the model group's deployments. It only attributes when every deployment in the group resolves to the same provider; mixed groups, unknown groups and a missing router leave the value empty as before. Explicitly logged providers keep precedence

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-09-16 23:10:47 +00:00
..
db_transaction_queue Merge pull request #41313 from BerriAI/litellm_model_activity_response_time 2026-09-15 18:43:48 -07:00
mcp_server refactor(repositories): type prisma table access with one generic protocol 2026-08-25 12:14:17 +00:00
conftest.py test: count a zombie grandchild as killed in the fake prisma cli 2026-09-09 10:01:22 +00:00
test_autorouter_session_rollup.py feat(auto-router): show routed model and savings in Claude Code and Codex (#40330) 2026-09-11 12:52:42 -07:00
test_budget_window_spend_writer.py fix(proxy): keep persisted spend another pod has not incremented in the window seed 2026-08-31 15:49:03 -07:00
test_check_migration.py fix(proxy): kill the whole prisma process group when a boot migration command times out (#39509) 2026-09-08 10:06:53 -07:00
test_create_views.py feat(team): team-level model_max_budget with key-level overrides 2026-09-16 00:40:58 +00:00
test_daily_spend_bulk_upsert.py feat(ui): show average response time per model in usage model activity 2026-09-15 22:16:12 +00:00
test_db_spend_update_writer.py fix(spend_tracking): attribute router-rejected requests to the model group provider 2026-09-16 23:10:47 +00:00
test_db_url_settings.py fix(db): carry DATABASE_SSLMODE/DATABASE_SSLROOTCERT into the assembled writer and reader URLs (#40815) 2026-09-12 02:14:39 +00:00
test_exception_handler.py fix(proxy): recreate the Prisma client when the writer session turns read-only (#40610) 2026-09-10 13:53:42 -07:00
test_exception_handler_reconnect_retry.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_gateway_request_tracking.py perf(proxy): collapse per-worker SGR upserts into one statement per flush (#40362) 2026-09-09 10:48:06 -07:00
test_health_check_latest.py fix(health): skip background health check DB writes when the latest-row read fails 2026-09-14 23:03:30 +00:00
test_model_access_group_spend.py test(proxy): pass the window spend args in the access group requeue test 2026-08-29 16:36:04 -07:00
test_pgbouncer.py test(pgbouncer): stop the never-listens replacement test flaking under CI load (#40830) 2026-09-11 19:32:56 -07:00
test_prisma_client.py fix(db): carry DATABASE_SSLMODE/DATABASE_SSLROOTCERT into the assembled writer and reader URLs (#40815) 2026-09-12 02:14:39 +00:00
test_prisma_planned_engine_restart.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00
test_prisma_self_heal.py fix(proxy): recreate the Prisma client when the writer session turns read-only (#40610) 2026-09-10 13:53:42 -07:00
test_proxy_worker_heartbeat.py fix(proxy): count worker heartbeats on the primary so replica lag cannot undercount 2026-08-14 17:23:06 -07:00
test_query_engine_reaper.py test(proxy): isolate reaper state and reap Prisma fixture children 2026-09-08 17:35:43 -07:00
test_rds_iam_token_expiry.py fix(tests): stop DATABASE_URL env pollution from read-replica tests breaking DB e2e tests (#32653) 2026-07-09 14:37:49 -07:00
test_replica_identity.py fix(proxy-extras): kill the whole Prisma process group when a command times out 2026-09-02 18:29:55 -07:00
test_routing_prisma_wrapper.py fix(proxy): keep access-group raw SQL writes on the writer while writer_unavailable is stale 2026-09-15 19:55:07 +00:00
test_shadow_eval_funnel.py feat(shadow_eval): measure both arms' cost so a job reports what the router would have saved (#38631) 2026-08-28 15:13:19 -07:00
test_spend_counter_reseed.py perf(proxy): one MGET and one pipeline for post-call spend counters, no team/user/org refetch on the response path (#40841) 2026-09-12 16:05:50 +00:00
test_spend_log_batching.py fix(spend): bound each spend-log write statement by row count as well as bytes (#37758) 2026-08-21 09:49:51 -07:00
test_spend_log_tool_index.py fix(proxy): bound tool and guardrail index create_many by the spend-log statement budgets (#40561) 2026-09-12 19:00:47 -07:00
test_token_auth.py fix(proxy): keep token-auth URLs, toggles, and refresh sleeps safe 2026-08-20 12:59:58 -07:00
test_tool_registry_writer.py test: drop the cwd-relative sys.path.insert calls from the test suite (#37802) 2026-08-22 09:25:58 -07:00