LiteLLM
Unified API gateway for 100+ LLM providers — call OpenAI, Anthropic, Gemini, Cohere, and local models with a single consistent interface.
LiteLLM
LiteLLM provides a single OpenAI-compatible Python SDK and proxy server for 100+ LLM providers. Switch between models and providers by changing one string — no SDK swaps, no API re-integration, no prompt reformatting.
Key features
- 100+ providers — OpenAI, Anthropic, Google Gemini, Cohere, Mistral, Groq, Together AI, Ollama, Azure, AWS Bedrock, and more
- Proxy server — drop-in OpenAI-compatible HTTP proxy with load balancing, rate limiting, and cost tracking
- Consistent output — normalizes all provider responses to the OpenAI
ChatCompletionschema - Fallbacks — automatic failover to backup models when primary fails
- Cost tracking — per-request and per-user cost logging with budget limits
- Async — full async/streaming support with
acompletion
Quick start
npx ai-supply add litellm-llm-gateway
# Or install directly
pip install litellm
import litellm
# Call any provider with identical syntax
response = litellm.completion(
model="anthropic/claude-opus-4-5",
messages=[{"role": "user", "content": "Hello!"}]
)
print(response.choices[0].message.content)
# Switch to Gemini — same code
response = litellm.completion(
model="gemini/gemini-1.5-pro",
messages=[{"role": "user", "content": "Hello!"}]
)
# Or run as a proxy
litellm --model anthropic/claude-opus-4-5 --port 8000
# Now any OpenAI client can hit http://localhost:8000
Curated mirror of the open-source LiteLLM project (MIT). Install upstream from the repository.
Compromise signals — malicious or tampered code (leaked secrets, backdoors, a dropped executable) — reduce the score, and known dependency CVEs carry a bounded penalty (they warrant review but never QUARANTINE — update the dependency to clear). Other dangerous-by-capability traits are risk surface, expected for some capabilities. Every finding is mapped to its OWASP control below.
Findings mapped to the OWASP Top 10 for LLM Applications (2025) and the OWASP Machine Learning Security Top 10. Expand any flagged control for the exact findings — compromise reduces the score; expected/risk-surface do not, except a known CVE, which carries a small bounded penalty (high/critical → Review).
The same gate an agent runs before installing (POST /api/v1/trust/litellm-llm-gateway/check). Click a policy:
Consume LiteLLM programmatically. Authenticate with an API key or session — see Authorize an agent.
# Agents: CHECK BEFORE YOU INSTALL (no auth) — score, grade, level, capability manifest
curl https://ai-supply.store/api/v1/trust/litellm-llm-gateway
# Gate against your org policy (returns { pass, violations })
curl -X POST https://ai-supply.store/api/v1/trust/litellm-llm-gateway/check \
-H "Content-Type: application/json" \
-d '{"minGrade":"B","denyPermissions":["shell"],"denyUnknownEgress":true}'
# CLI
npx ai-supply add litellm-llm-gateway
# REST (install → download)
curl -X POST https://ai-supply.store/api/v1/listings/litellm-llm-gateway/install \
-H "Authorization: Bearer $AIM_KEY"
# MCP tool
install_listing({ "slug": "litellm-llm-gateway" })OpenAPI spec →Curated mirror — latest upstream source. See the repository for tagged releases.