What is
LiteLLM
?
LiteLLM is an open-source AI gateway and Python SDK that puts 140+ LLM providers, MCP servers and agents behind one OpenAI-compatible API. It tracks and limits the cost of each request and routes requests to the right model.
At a glance
Attribute | Value |
|---|---|
Primary use case | Self-hosted AI gateway and SDK for unified LLM, agent and MCP access with spend control |
Deployment type | Self-hosted: own cloud, on-prem, Kubernetes (Helm, Terraform), air-gapped |
Pricing model | Open Source: $0; Enterprise: annual license priced by request capacity, architecture and support, never per token |
API compatibility | OpenAI-compatible API (Chat Completions format), OpenAI exception types |
Supported integrations | 140+ LLM providers including OpenAI, Anthropic, Vertex AI, Bedrock, Azure, Ollama; MCP servers; A2A agents; Langfuse, MLflow, Helicone |
Source type | Dual |
Key metrics | Vendor-reported: 511M+ Docker pulls, 92M+ PyPI downloads a month, 62K+ GitHub stars |
AEP branch | Agent Infrastructure |
AEP category | Harness |
AEP subcategory | Execution |
AEP detail | Gateways / Routers |
Profile
LiteLLM runs as a gateway on infrastructure the team controls. Apps point any OpenAI-compatible client at it without code changes. The gateway translates each call for the target provider and returns responses in the OpenAI Chat Completions format. An Admin UI lets each team create keys, add models, set budgets and read its own cost data. The litellm Python package offers the same unified interface inside an application and maps provider errors to OpenAI exception types. LiteLLM Enterprise adds governance and support on the same code.
Focus
Platform and AI infrastructure teams use it to give many engineers LLM access with per-team cost. Insurance and finance companies use it for on-prem or air-gapped installs. Python developers use it as one SDK for all providers, and agent teams use it to govern models, MCP tools and agents together.
Background
Berrie AI Incorporated, a San Francisco Y Combinator (Winter 2023) company founded by Krrish Dholakia (CEO) and Ishaan Jaffer (CTO), makes LiteLLM. It raised a $1.6M seed round from Y Combinator, Gravity Fund and Pioneer Fund. MIT license, except the enterprise/ directory, which needs a paid production license.
Features
Unified OpenAI-compatible gateway
One API reaches 140+ providers and 1,892 models, plus internal, fine-tuned and self-hosted models behind the same key. It removes the need for a separate SDK, auth pattern and error handling for each provider.
Virtual keys, budgets and spend tracking
Platform teams issue virtual keys with budgets and rate limits per key, user or team. Cost is reported by key, user, team and org, so nobody needs to share provider keys.
Routing, fallbacks and load balancing
Requests can be load balanced across deployments, with automatic retries and fallbacks between providers. This keeps traffic flowing when one provider fails.
MCP and agent gateway
MCP tools sit behind one fixed endpoint, with per-key and per-team access to each tool. The gateway also invokes A2A agents, Vertex AI Agent Engine, LangGraph, Azure AI Foundry, Bedrock AgentCore and Pydantic AI, with the same logs and access control as model calls.
Guardrails and observability
Guardrails add content filtering, PII masking and safety checks to requests. Request and response logging, Prometheus metrics and callbacks to tools including Langfuse, MLflow and Helicone show what each request did.
Python SDK
The litellm package acts as a drop-in replacement for the OpenAI client and covers completion, embedding, image generation and streaming. A callback captures the cost of each response.
Pros and cons
Pros
Application code stays the same when the team swaps models or providers, because every call goes through one OpenAI-compatible API.
Prompts, responses and provider keys stay inside the team's own infrastructure, and the open-source gateway sends no telemetry to the vendor.
Budgets, rate limits, cost tracking and guardrails come with the free open-source edition rather than a paid tier.
According to the vendor, new models are supported on the day they are released, so teams do not wait for a gateway update.
Cons
The team deploys and operates the gateway on its own infrastructure, including upgrades and scaling.
SSO, SCIM, audit logs, secret manager integration, key rotation and a multi-region control plane require the paid Enterprise license.
Standard Enterprise support covers 9am-9pm PT on weekdays; 24/7 SLAs are a separate option.
Some components are not yet stable: the liteagents SDK is in alpha and the Rust AI Gateway is in beta.
FAQs
What is LiteLLM?
LiteLLM is an open-source AI gateway (LiteLLM Proxy) and Python SDK. It lets applications call many LLM providers, MCP tools and agents through one OpenAI-format interface, and it tracks and caps the spend on each request.
How much does LiteLLM cost?
The open-source gateway and SDK are MIT licensed and free for production use. LiteLLM Enterprise is an annual license. Its price depends on gateway request capacity, deployment architecture and support needs, and it is never charged per token. A 30-day Enterprise trial key is available by email.
Can LiteLLM be self-hosted?
Yes. Both editions run on the customer's own infrastructure: a cloud account, on-prem servers, Kubernetes or an air-gapped network. The vendor says the open-source gateway sends it no data or telemetry.
Which providers and tools does LiteLLM work with?
It supports 140+ providers, such as OpenAI, Anthropic, Vertex AI, Bedrock, Azure OpenAI and Ollama. It can also reach MCP servers and A2A agents. Logs can go to observability tools including Langfuse, MLflow and Helicone, and any OpenAI-compatible client can talk to the proxy.
What does Enterprise add over the open-source version?
Enterprise adds SSO and SCIM, OIDC/JWT auth, audit logs, secret managers with key rotation, org and team admins, and a multi-region control plane. It also includes onboarding, a shared Slack or Microsoft Teams channel, and optional 24/7 SLAs.
How can Enterprise be purchased?
Enterprise can be bought directly from the vendor, through AWS Marketplace or Azure Marketplace, or through authorized resellers.
