LiteLLM
Python SDK and self-hosted proxy that put many LLM providers behind one OpenAI-style API.
About
Calling Anthropic, Bedrock, Vertex AI, Azure, Groq or a local vLLM server usually means juggling different SDKs and payload shapes; LiteLLM translates one OpenAI-style request into each provider's native format and maps responses and errors back, for chat plus embeddings, image, speech, rerank and batch routes. It comes in two forms. The Python library exposes completion() and related calls, a router with retries and fallbacks, and cost calculation from a maintained price table. The proxy server, started with the litellm CLI or the official Docker image, is a central gateway with virtual API keys, per-key and per-user spend tracking in Postgres, Redis for caching, load balancing, guardrails, logging callbacks to tools like Langfuse, an admin UI, and gateways for MCP servers and A2A agents. Terraform modules and a Helm chart cover production, and images are cosign-signed. Everything outside the enterprise folder is MIT; single sign-on past five users, key rotation, IP allowlists and some governance features need a commercial license from BerriAI. Platform teams centralizing LLM access and costs are the main audience.
Should you use LiteLLM?
Pick it when
Pick LiteLLM when an app or team calls several hosted providers like OpenAI, Anthropic, Bedrock, and Azure and wants one OpenAI-format API with fallbacks, load balancing, and spend tracking, as a Python SDK or a proxy.
Look elsewhere when
Skip it if you need to actually run models; it routes requests and still needs a backend such as vLLM or Ollama for self-hosted inference. If you only want automatic strong-or-cheap model selection, RouteLLM targets that directly.
Alternatives to LiteLLM
- Portkey AI Gateway
Close MIT-licensed substitute with 50-plus inline guardrails and request caching, but its observability and prompt management sit in the hosted Portkey tier.
- OmniRoute
Aimed at individual developers chaining free provider tiers into coding tools with fallback, less oriented to team spend control.
- RouteLLM
Learns which queries can go to a cheaper model to cut costs, a narrower job that can sit alongside a gateway like LiteLLM.
- Helicone
Centered on logging, caching, and monitoring LLM traffic, the better pick when observability matters more than multi-provider routing.
Reviews (0)
Leave a Review
No reviews yet. Be the first to review!
Details
- Category
- LLM Inference & Serving
- Price
- Free
- Platform
- Hybrid
- Difficulty
- Easy (2/5)
- License
- MIT
- Added
- Jan 29, 2026
Tags
Related Tools
Browse all LLM Inference & Serving toolsMentioned in
The Best Self-Hosted AI Stack for Small Teams in 2026
An opinionated reference architecture for self-hosted team AI in 2026: vLLM, Open WebUI, LiteLLM, Qdrant, and...
Billy C
Securing Self-Hosted AI Stacks in 2026: A Defensive Playbook
175,000 exposed Ollama hosts, an RCE chain in Triton, memory corruption in vLLM, and prompt injection...
Billy C
LLM Gateways in Production: LiteLLM vs Portkey vs Bifrost
A working comparison of LiteLLM, Portkey, and Bifrost on routing, caching, budgets, observability, and real...
Max P