AI & Machine Learning · AI Development Platforms
LiteLLM
One OpenAI-compatible gateway for 100+ model providers
LiteLLM is an open source Python SDK and gateway for calling more than 100 model providers through one interface. The project is MIT licensed outside its enterprise directory, and self-hosting costs $0. LiteLLM also sells a separately licensed Enterprise edition for governance and support, with annual pricing based on request capacity, architecture, and support needs rather than token volume.
Key facts
- License
- MIT (core); proprietary enterprise license
- Main language
- Python, Rust, Go, TypeScript
- Maintainer
- BerriAI Incorporated
- Latest release
- v1.106.2, October 21, 2026
- GitHub stars
- 61,779, October 2026
- Hosted option
- Enterprise self-hosted license, annual pricing based on request capacity, architecture, and support
What LiteLLM is
LiteLLM is an open-source AI gateway and Python SDK maintained by BerriAI Incorporated. Krrish Dholakia and Ishaan Jaffer founded the company. The project says LiteLLM was released on July 27, 2023, after their Y Combinator Winter 2023 batch. GitHub lists 61,779 GitHub stars, and the contributor listing shows Ishaan Jaffer with 15,232 contributions. Netflix appears among adopters named in the README. LiteLLM supports more than 100 providers, including OpenAI, Anthropic, Gemini, Bedrock, Azure, Vertex AI, vLLM, and NVIDIA NIM. BerriAI says it raised a $1.6 million seed round from Y Combinator, Gravity Fund, and Pioneer Fund. Calls more than 100 model providers through one OpenAI-compatible interface from the Python SDK or proxy gateway.
How it works
LiteLLM has two main operating modes. Developers install the Python package and call providers through a common function interface, or platform teams run the proxy as a shared service. A typical proxy setup defines models and provider credentials, then exposes an OpenAI-compatible endpoint to application clients. The gateway provides virtual keys, users, teams, budgets, rate limits, spend tracking, request logging, Prometheus metrics, routing, fallbacks, guardrails, and an administrative UI. The README lists support for chat completions, responses, embeddings, images, audio, batches, reranking, A2A agents, and MCP tools. Existing OpenAI SDK clients can point at LiteLLM while the proxy selects a configured deployment.
Architecture and recent releases
The repository is primarily Python and includes Rust, Go, and TypeScript components; the README describes a Rust core direction. LiteLLM publishes Docker images and Helm charts, while official Terraform modules deploy componentized stacks on AWS and Google Cloud. Production deployments use PostgreSQL for keys, teams, users, spend logs, and configuration. Redis handles rate limiting, router state, and caching across instances. The deployment guide supports a monolithic service or separate gateway, backend, and UI services. Release v1.106.1 fixed issues involving token counting, tool calls, batches, vector stores, and MCP. Release v1.106.2 followed on October 21, 2026 with fixes for Bedrock token counting, batch billing and translation, and proxy spend accounting.
License and pricing
The repository applies the MIT license to content outside the enterprise directory, while enterprise content has separate licensing. MIT permits commercial use, modification, distribution, sublicensing, and sale, subject to retaining the copyright and permission notice. LiteLLM's open source gateway costs $0 to self-host. Enterprise is an annual license priced according to annual request capacity, deployment architecture, and support requirements, never per token. Enterprise adds SSO, SCIM, OIDC or JWT authentication, audit logs, secret-manager integration, key rotation, organization and team administration, multi-region control, support agreements, and air-gapped deployment. The pricing page documents a 30-day Enterprise trial and does not publish a fixed amount.
Limitations and how it compares
Self-hosting gives teams control over gateway placement, credentials, databases, and traffic, but it also creates operational responsibilities. Operators must handle PostgreSQL migrations, Redis configuration, secret protection, backups, version pinning, and provider differences. OpenRouter is a hosted model-access service, removing much infrastructure work while routing requests through its service. Portkey is a proprietary gateway with managed options, while Helicone combines gateway and observability functions. LiteLLM suits teams needing one API across multiple providers, private deployment, routing or spending controls, and Python integration, offered they accept responsibility for operating the gateway. It exports Prometheus metrics and supports request-logging callbacks for external observability and tracing systems.
Main features
- Unified provider API. Calls more than 100 model providers through one OpenAI-compatible interface from the Python SDK or proxy gateway.
- Gateway access controls. Provides virtual keys, users, teams, budgets, rate limits, and administrative controls for shared model access.
- Routing and fallbacks. It routes requests across configured deployments while supporting retries, fallbacks, load balancing, and model selection.
- Spend tracking. Tracks usage and calculates spend by virtual key, user, team, project, organization, and model configuration.
- Observability integrations. It exports Prometheus metrics and supports request-logging callbacks for external observability and tracing systems within the project workflow.
- MCP and agent gateway. Connects MCP servers and A2A agents to supported models through SDK helpers and gateway endpoints.
- Cloud deployment modules. Publishes Docker images, Helm charts, and Terraform modules for Kubernetes, AWS, and Google Cloud deployments.
Self-hosting LiteLLM
LiteLLM can be installed with pip or uv, run from Docker images, deployed with Helm, or provisioned through official AWS and Google Cloud Terraform modules. Production proxy deployments use PostgreSQL for keys, teams, users, spend logs, and configuration. Redis is required once multiple instances need shared rate limiting, router state, or caching. The documented cloud stacks also include object storage. The deployment guide does not publish minimum CPU or memory requirements. Pin image and chart versions, run migrations as a separate upgrade step, back up PostgreSQL, protect the master and salt keys, and verify Docker image signatures before rollout.
Strengths
- One API covers more than 100 providers and reduces provider-specific client code.
- The $0 self-hosted edition includes virtual keys, budgets, spend tracking, routing, and an administrative UI.
- Helm and Terraform support covers Kubernetes, AWS, and Google Cloud deployment patterns.
- Self-hosting keeps gateway traffic, provider keys, and operational data within the customer's infrastructure.
Drawbacks
- The gateway adds PostgreSQL, Redis, migrations, secret management, and upgrade responsibilities to model integration.
- Provider differences remain because endpoint support and request behavior vary across the provider matrix.
- Enterprise governance and support require a separate license with quote-based pricing.
What teams replace with it
Teams usually evaluate LiteLLM when they want to move off OpenAI API Platform, Portkey, OpenRouter.
For side-by-side commercial comparisons, browse our alternatives hub.
Open-source alternatives to LiteLLM
- Envoy AI Gateway
- Kong AI Gateway
- OpenRouter
- Helicone
- Bifrost
Frequently asked questions
Is LiteLLM free to use?
The open source gateway and Python SDK are free to self-host with no LiteLLM license fee, according to the pricing page. Provider charges remain separate because LiteLLM routes requests to model services. Enterprise capabilities such as extended governance, support, and some security controls require a commercial license.
Can companies use LiteLLM commercially?
The repository applies MIT to content outside the enterprise directory. MIT permits commercial use, modification, distribution, sublicensing, and sale when the copyright and permission notice are retained. Enterprise content has separate licensing, so companies should review which components they deploy and the Enterprise terms before packaging or distributing those features.
How do I self-host LiteLLM, and what services are required?
For evaluation, LiteLLM can run from its Python package or Docker image. Production deployments use PostgreSQL for keys, teams, users, spend logs, and configuration. Redis is required when multiple instances need shared rate limits, router state, or caching. Helm supports Kubernetes, while Terraform modules cover AWS and Google Cloud. The project does not publish minimum CPU or memory requirements.
How does LiteLLM compare with OpenRouter?
LiteLLM is primarily a self-hosted SDK and gateway that you operate and connect to chosen providers. OpenRouter is a hosted model access service. LiteLLM gives teams control over gateway placement, credentials, databases, routing policy, and internal traffic, while OpenRouter removes much of that operational work. The better choice depends on control requirements and willingness to run infrastructure.
Does LiteLLM keep model traffic private?
A self-hosted deployment runs the gateway in the customer's infrastructure, and the pricing page says customer data and keys do not leave that infrastructure. Requests still travel from the gateway to the selected upstream model provider unless that provider is also controlled by the customer. Security depends on deployment controls, provider contracts, secret handling, network policy, logging configuration, and maintenance.
Similar projects to compare
- Envoy AI GatewayApache-2.0Agent Router is an Apache-2.0 Go project that exposes hosted providers, self-hosted inference, and MCP servers through an OpenAI-compatible interface. It supports local execution and Kubernetes deployment with Envoy Gateway resources, including a documented two-tier routing pattern. Teams manage provider credentials, quotas, failover, and usage attribution, while sizing and production operations remain their responsibility.
- HeliconeApache-2.0Helicone is an LLM observability platform and AI gateway for developers who need request logs, cost and latency metrics, prompt management, evaluations, and provider routing. Its repository uses Apache-2.0, and a hosted service offers 10,000 free requests, with paid plans starting at $79 per month plus usage-based charges.
- BifrostApache-2.0Bifrost is an Apache-2.0 Go gateway for applications that need one OpenAI-compatible API across more than 20 model providers. It supports routing, failover, budgets, caching, observability, and MCP controls. The free OSS edition is self-managed, while Maxim offers a custom-priced Enterprise edition with a 14-day trial.
- ACI.devApache-2.0ACI.dev is an Apache-2.0 platform from Aipotheosis Labs for connecting AI agents to more than 600 SaaS integrations. It targets developers building agent products with SDKs, a unified MCP server, OAuth, secrets, permissions, and tool discovery. A managed service exists at aci.dev, but published product pages do not list hosted pricing.
- AgentOSApache-2.0AgentOS is a Python toolkit for building, running, tracking, and sharing reinforcement learning agents through the Python Component System. It targets researchers and developers who need explicit dependencies, virtual environments, and experiment runs. AgentOS and PCS use Apache-2.0. Documentation describes a public registry, but no paid hosted AgentOS service is listed.
- AgnoApache-2.0Agno is a Python SDK and AgentOS runtime for building, serving, and managing agents, teams, and workflows. The runtime is Apache-2.0 licensed and self-hostable. A hosted control plane starts at $150 per month for one live connection and three team seats. This provides a concise description of its development components, runtime model, licensing, deployment option, and hosted pricing.