Project

litellm

BerriAI/litellm · Python · Apache-2.0

One import to talk to OpenAI, Anthropic, Google, Mistral and 100+ more.

LiteLLM normalises every provider behind the OpenAI SDK, adds retries, fallbacks, load balancing, caching and a proxy server with spend tracking — so swapping models is a config change.

80.3 / 100 · Score
★ 62k Stars
+387 30-day growth
5 min Time to first run
Needs a paid API key API key

Score

Trend 67
Activity 97
Quality 95
Community 94
Relevance 55

Setup at a glance

DeployPip, Docker
GPUNo GPU needed
API keyNeeds a paid API key
UI languagesen
Doc languagesen
Install
pip install litellm

Deep dive

LiteLLM puts 100+ LLMs behind one OpenAI-compatible interface: swap providers by changing a model string, and call chat, embeddings, images, audio and agent protocols from the same SDK instead of maintaining provider-specific client code.

As a production gateway it adds what teams actually need — virtual keys, per-team spend tracking, guardrails, load balancing and fallbacks — with published benchmarks showing 8ms P95 latency at 1k RPS.

Beyond chat it speaks the agent stack: MCP servers and A2A agents mount behind the same gateway, turning it into a single control plane for both model and tool access.

Use cases

Route production traffic across multiple LLM providers
Add automatic fallbacks when a model is down
Track per-team LLM spend in one place

Good for / Not ideal for

Good for

Teams shipping to production with LLMs
Products that must survive a provider outage
Cost-conscious multi-model apps

Not ideal for

A single one-off script with one provider
You want a full agent framework (pair it with one)

Trend · 30d