All 121 Dependencies
Every package LiteLLM depends on, ranked by repo health score.
LiteLLM is an open source AI gateway and Python SDK from BerriAI (Y Combinator S23) that gives engineering teams a single, OpenAI-compatible interface for calling more than 100 LLM providers, including OpenAI, Anthropic, Azure, Bedrock, Vertex AI, Cohere, Hugging Face, and self-hosted models served through Ollama or vLLM. Instead of writing provider-specific integration code for every model a team wants to use, developers call `litellm.completion()` in Python, or POST to a `/chat/completions`-style endpoint, and LiteLLM handles the translation, so switching providers becomes a config change instead of a rewrite.
The project ships two ways to use it. The Python SDK embeds directly in application code and adds a Router with retry and fallback logic, load balancing across multiple deployments of the same model (for example several Azure regions), and cost tracking. The AI Gateway is a standalone FastAPI proxy server meant to run as shared infrastructure for a whole organization: it adds authentication, per-project and per-user virtual keys, budgets and spend tracking backed by PostgreSQL and Redis, and an admin dashboard UI, so a platform team can hand out scoped LLM access to internal teams without every team managing its own provider credentials.
Beyond routing requests, LiteLLM bundles a guardrails framework for content moderation, PII detection, and prompt-injection checks; more than 80 logging and observability integrations covering tools like Langfuse, Datadog, Arize, and MLflow; semantic and exact-match response caching backed by Redis, Qdrant, or S3; and gateways for newer agent protocols including MCP (Model Context Protocol) and A2A (Agent-to-Agent). A growing Rust core (`litellm-rust`, exposed via a PyO3 bridge) is being phased in underneath the Python proxy for latency-sensitive request transforms, while auth, routing, and callbacks stay in Python.
Because it is self-hosted, LiteLLM sits opposite hosted LLM routing services like OpenRouter: teams get the same "one API for many models" convenience but keep credentials, logs, and spend data inside their own infrastructure, at the cost of running and operating the proxy themselves.