litellm/tests/test_litellm/proxy/db
ishaan-berri 118ce3cc91
feat: add model leaderboard page (#43649)
* feat(proxy): add model leaderboard analytics

* feat: add model insights task and range constants

* feat: record task type from task tags in model usage rollup

* feat: serve 365 days of model insights by UTC date

* test: cover task tag resolution in model usage rollup

* test: update model insights range limit test to 365 days

* chore: regenerate dashboard api types for model insights

* feat: add model insights aggregation helpers

* test: cover model insights aggregation helpers

* feat: redesign model leaderboard with stacked bars, treemap and ranking

* test: update model leaderboard view test

* feat: mark model leaderboard as beta in sidebar

* chore: sync schema.prisma copies from root

* fix: only treat task: prefixed tags as model insight tasks

* feat: add metric type for model insights ranking

* fix: rank model insights by selected metric and scope detail queries to ranked deployments

* test: plain tags are not model insight tasks

* test: cover metric ranking, deployment scoping and rollup round trip

* fix: build model insights weeks and halves from the requested date range

* test: cover empty weeks and range-based change comparison

* fix: refetch by metric, show load errors and ignore stale responses

* test: cover metric refetch and error state

* feat: define model insight tasks in a JSON file

* feat: return task labels and categories from model insights

* feat: load model insight tasks from JSON

* refactor: validate rollup task tags against the JSON task list

* feat: serve the task list with model insights

* refactor: drop hardcoded task list from constants

* build: ship model insight tasks JSON in the wheel

* test: cover model insight task JSON

* refactor: take task labels and categories from the API

* test: pass task info to task tile builder

* refactor: color treemap by API-provided category

* test: include tasks in model leaderboard fixture

* fix: make daily model usage migration idempotent

* feat: bound the model insights task query size

* fix: compute task breakdown independent of the chart metric

* test: task breakdown is stable across chart metrics

* chore: regenerate lazy openapi snapshot for model insights

* chore: regenerate dashboard api types for model insights

* fix: keep previous ranking dimmed while a new metric loads

* test: cover stale metric state in model leaderboard

* refactor: drop task row cap constant

* fix: return the full task breakdown instead of a truncated one

* test: task query is not truncated

* feat: add task summary types for model insights

* feat: summarise tasks server-side on a separate model insights endpoint

* test: cover the model insights tasks endpoint

* chore: regenerate lazy openapi snapshot for model insights tasks

* chore: regenerate dashboard api types for model insights tasks

* refactor: drop client-side task aggregation

* test: remove client-side task aggregation tests

* feat: load task breakdown separately from the chart metric

* test: task breakdown is not refetched on chart metric change

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-09-28 19:40:04 -07:00
..
db_transaction_queue fix(proxy): park requeued spend logs in Redis so they survive a pod restart during a DB outage 2026-09-19 22:28:28 +00: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 gone in the migrate deploy timeout test (#42570) 2026-09-22 14:59:26 -07:00
test_autorouter_session_rollup.py feat(ui): add internal-user savings and auto-router usage 2026-09-19 17:01:36 -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 fix(proxy): keep the in-flight daily spend batch when shutdown cancels the flush (#42593) 2026-09-22 17:58:08 -07:00
test_db_lookup_gate.py fix(proxy): fail parked DB lookups at a deadline and flip readiness while they stall (#42654) 2026-09-24 10:09:49 -05:00
test_db_spend_update_writer.py fix(proxy): pass team member spend rows as jsonb so a $0 flush cannot poison the pool connection (#43029) 2026-09-24 20:44:56 +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): fail parked DB lookups at a deadline and flip readiness while they stall (#42654) 2026-09-24 10:09:49 -05:00
test_exception_handler_reconnect_retry.py feat(lint): add LIT013 flagging *-ok suppressions that suppress nothing and remove the 240 stale ones (#42793) 2026-09-23 17:50:09 -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_master_key_migration.py fix(proxy): stop the boot when the requested master key migration fails, unless allow_requests_on_db_unavailable tolerates the outage 2026-09-19 18:10:52 -07: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_model_insights_tasks.py feat: add model leaderboard page (#43649) 2026-09-28 19:40:04 -07:00
test_model_usage_rollup.py feat: add model leaderboard page (#43649) 2026-09-28 19:40:04 -07:00
test_pgbouncer.py fix(proxy): honor DATABASE_DISABLE_PREPARED_STATEMENTS in the litellm CLI (#42556) 2026-09-22 16:10:49 -05: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 fix(proxy): fail parked DB lookups at a deadline and flip readiness while they stall (#42654) 2026-09-24 10:09:49 -05: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