litellm/litellm-proxy-extras
Shivam Rawat ab3bcb95ef perf(db): index LiteLLM_SpendLogs on (api_key, startTime)
The Logs tab filters LiteLLM_SpendLogs by api_key inside a startTime
window. The table only had indexes on startTime, (startTime, request_id),
end_user and session_id, so the api_key predicate degraded to a full scan
of the window on both the pagination count and the paged select, re-run on
every page turn. On a multi-month table that pinned a customer's Aurora
writer near 100% CPU for ~50 minutes.

Built CONCURRENTLY: this is the largest table on most deployments, and a
blocking build would stall spend-log inserts for the whole build.
2026-08-18 14:17:17 -07:00
..
dist adding build 2026-03-21 22:55:04 -07:00
litellm_proxy_extras perf(db): index LiteLLM_SpendLogs on (api_key, startTime) 2026-08-18 14:17:17 -07:00
tests [Fix] v2 resolver: swallow non-connection DB errors; wrap resolve failures 2026-04-21 15:53:07 -07:00
build_and_publish.md build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00
LICENSE install prisma migration files - connects litellm proxy to litellm's prisma migration files (#9637) 2025-03-29 15:27:09 -07:00
migration_runbook.md [Infra] Add freshness and destructive guards to migration workflow 2026-04-21 12:00:23 -07:00
pyproject.toml bump: litellm-enterprise 0.1.55 -> 0.1.56, litellm-proxy-extras 0.4.85 -> 0.4.86 2026-08-15 11:10:10 -07:00
README.md build: migrate packaging, CI, and Docker from Poetry to uv (#25007) 2026-04-09 11:46:23 -07:00

Additional files for the proxy. Reduces the size of the main litellm package.

Currently, only stores the migration.sql files for litellm-proxy.

To install, run:

uv add litellm-proxy-extras

OR

uv tool install 'litellm[proxy]' # installs litellm-proxy-extras and other proxy dependencies

To use the migrations, run:

litellm --use_prisma_migrate