LiteLLM Proxy Extras
LiteLLM Proxy Extras (`litellm-proxy-extras`) is a supplementary Python package for the LiteLLM Proxy, providing additional files and components like database migration scripts (Prisma `schema.prisma` and migrations folder). Its primary purpose is to reduce the size of the main `litellm` package by externalizing these non-core proxy components. As of April 2026, it is at version `0.4.65` and is an actively maintained part of the LiteLLM ecosystem, following the frequent release cadence of `litellm`.
Warnings
- gotcha The `litellm-proxy-extras` package is not intended for direct Python imports or programmatic use. It is an internal dependency for the `litellm` proxy, providing components like database migration files that are utilized by the `litellm` CLI or framework, not by user-written Python code directly referencing `litellm-proxy-extras`.
- breaking When upgrading LiteLLM Proxy via `pip` (which includes `litellm-proxy-extras`), database migrations are *not* automatically applied. Users must manually regenerate the Prisma client and run migrations. This is a common footgun, as Docker deployments typically handle this automatically.
- gotcha A supply chain attack affected `litellm` versions `1.82.7` and `1.82.8` on PyPI, which were live briefly on March 24, 2026. While `litellm-proxy-extras` itself was not explicitly named as containing the malicious payload, it is a core component of the `litellm` ecosystem, and caution is advised regarding all packages within that timeframe.
- gotcha When dealing with LiteLLM Proxy database schema, the `schema.prisma` file located within the `litellm-proxy-extras` package is considered the definitive source of truth. Using `schema.prisma` files from other sources (e.g., older versions, Git repository) can lead to migration issues or data corruption.
Install
-
pip install litellm-proxy-extras -
pip install 'litellm[proxy]'
Imports
- None
This package is not meant for direct Python import or usage in user code.
Quickstart
import os
# Ensure litellm[proxy] is installed
# pip install 'litellm[proxy]'
# To apply database migrations provided by litellm-proxy-extras
# This command starts the LiteLLM proxy and runs pending migrations.
# Ensure your database environment variables (e.g., POSTGRES_URL) are set.
# Example: os.environ['POSTGRES_URL'] = 'postgresql://user:password@host:port/database'
# In a terminal, run the following command:
# litellm --use_prisma_migrate
print("Refer to LiteLLM documentation for proxy setup and migration usage.")
# Example of starting the proxy with a model (requires API key in environment)
# os.environ["OPENAI_API_KEY"] = os.environ.get("OPENAI_API_KEY", "sk-your-openai-key")
# litellm --model openai/gpt-4o