One SDK to rule them all — and it's actually good.
Plot twist: the most useful LLM library in 2026 is a thin wrapper that pretends every provider is OpenAI.
The Setup
LiteLLM ships a single completion() function that speaks fluent OpenAI to over 100 providers — Anthropic, Gemini, Mistral, Groq, Bedrock, Ollama, your weird vLLM box in the closet. You install it once and stop rewriting clients.
pip install litellm
export ANTHROPIC_API_KEY=sk-ant-...
export OPENAI_API_KEY=sk-...The Money Pattern
Change provider with a string. That's the whole pitch and it works. Same response shape, same streaming, same tool-calling schema — across vendors that historically loved being incompatible just to spite you.
from litellm import completion
messages = [{"role": "user", "content": "Summarise hail claim 4821 in one line."}]
# OpenAI
a = completion(model="gpt-4o-mini", messages=messages)
# Anthropic — same call, different string
b = completion(model="anthropic/claude-sonnet-4-5", messages=messages)
# Local Ollama on the M4 — same call again
c = completion(model="ollama/llama3.2", messages=messages, api_base="http://localhost:11434")
print(a.choices[0].message.content)The Catch
Streaming edge cases still bite — some providers send partial tool-call deltas that LiteLLM has to reassemble, and occasionally a provider ships a breaking change on a Tuesday and your pinned version drifts. Pin it. Read the changelog. Don't pip install -U on a Friday.
The Verdict
LiteLLM won. The "build your own client per provider" era is over and nobody's coming back. If you're still writing if provider == "anthropic" branches in 2026, you're cosplaying as an early adopter. Install it and move on with your life.