litellm/litellm-proxy-extras
Shivi Jain aa130f4e4c feat(proxy): add project-level model_itpm_limit/model_otpm_limit
We already support model_tpm_limit/model_rpm_limit per project, but
that treats input and output tokens as one combined bucket, which
doesn't match how Bedrock Mantle actually meters usage. This adds
model_itpm_limit/model_otpm_limit so a project can cap input and output
tokens separately, same shape as the existing fields.

There's already deployment-level itpm/otpm support in
router_utils/pre_call_checks/io_token_rate_limit_check.py, but that
code only ever deals with one deployment at a time, whereas the proxy
hook (parallel_request_limiter_v3.py) has to juggle key/team/org/project
limits together on the same request. Rather than bolt a second copy of
the reservation logic on, this just adds project-scoped ITPM/OTPM as
two more descriptors into the same reservation path the hook already
uses for TPM/RPM.

If a project sets both the combined TPM limit and the new itpm/otpm
limits on the same model, both get enforced, not one overriding the
other, matching what the deployment-level check already does. Input
and output are reserved separately up front, and if one side reserves
fine but the other is over limit, we roll back the side that already
went through so nothing gets left over-counted. On the way back,
cached prompt tokens get excluded from the ITPM count since that's how
Bedrock bills it, but that's purely for the rate limit math, cost and
usage logging still see the full token count.
2026-07-22 22:02:52 +05:30
..
dist adding build 2026-03-21 22:55:04 -07:00
litellm_proxy_extras feat(proxy): add project-level model_itpm_limit/model_otpm_limit 2026-07-22 22:02:52 +05:30
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-proxy-extras 0.4.79 -> 0.4.80, litellm 1.94.0 -> 1.95.0 (#34199) 2026-07-22 00:12:55 +00: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