Replace find_many + Python-side aggregation with a single SQL GROUP BY query via query_raw in get_daily_activity_aggregated. This collapses rows across entities (users/teams/orgs) in the database, reducing ~150k rows to ~2-3k grouped rows before transfer to Python. Also adds composite indexes (entity_id, date) to all 6 daily spend tables for faster filtered queries. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| dist | ||
| litellm_proxy_extras | ||
| tests | ||
| build_and_publish.md | ||
| LICENSE | ||
| migration_runbook.md | ||
| poetry.lock | ||
| pyproject.toml | ||
| README.md | ||
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:
pip install litellm-proxy-extras
OR
pip install litellm[proxy] # installs litellm-proxy-extras and other proxy dependencies
To use the migrations, run:
litellm --use_prisma_migrate