# LiteLLM

LiteLLM is a model provider option for building AI agents. Self-hosted proxy that speaks one API to 100+ providers, with keys and budgets.

## Facts

- Layer: Model provider (What thinks)
- Vendor: BerriAI (github.com/BerriAI/litellm)
- Licence: open source
- Pricing: open source
- Self-hostable: yes
- SDKs: py, ts
- Install: `pip install 'litellm[proxy]'`
- Docs: https://www.litellm.ai/
- Last verified: 2026-08-21

## When to reach for it

- You are choosing a model provider component — what thinks.
- You need to run it on your own infrastructure, or your procurement process requires source access.
- You want to start without a commercial conversation.

## Worth knowing

Give every agent its own virtual key so you can attribute and cap spend per surface.

## Alternatives in the model provider layer

| Option | What it does | Licence | Self-host |
| --- | --- | --- | --- |
| Anthropic | Claude Opus, Sonnet and Haiku. Strong tool use and long-horizon agentic work. | proprietary | no |
| OpenAI | GPT and o-series via the Responses API. | proprietary | no |
| Google Gemini | Gemini models with very long context and native multimodality. | proprietary | no |
| Amazon Bedrock | Frontier models inside your AWS account, with IAM and VPC boundaries. | proprietary | no |
| Google Vertex AI | Claude and Gemini under GCP billing, IAM and regional controls. | proprietary | no |
| DeepSeek | Strong reasoning and coding at a fraction of frontier pricing, with the weights published so you can move off the API later. | proprietary | no |
| OpenRouter | One API key, several hundred models, automatic failover. | proprietary | no |
| Hugging Face | One OpenAI-compatible endpoint routed across Groq, Together, Fireworks, Cerebras and Replicate — with the open-weight catalogue behind it. | proprietary | no |
| Venice AI | Hosted open-weight inference with no prompt logging or retention, plus an anonymising proxy in front of the frontier APIs. | proprietary | no |
| Groq | Open-weight models at very low latency. | proprietary | no |
| Ollama | Open-weight models on your own machine. Nothing leaves the box. | open source | yes |
| vLLM | High-throughput open-weight serving on your own GPUs. | open source | yes |

Head to head:

- https://newagent.build/compare/litellm-vs-anthropic
- https://newagent.build/compare/litellm-vs-openai
- https://newagent.build/compare/litellm-vs-google-gemini
- https://newagent.build/compare/litellm-vs-bedrock
- https://newagent.build/compare/litellm-vs-vertex
- https://newagent.build/compare/litellm-vs-deepseek
- https://newagent.build/compare/litellm-vs-openrouter
- https://newagent.build/compare/litellm-vs-huggingface

## Add it to a stack

```bash
curl -fsSL "https://newagent.build/api/stack?model=litellm&format=sh" | sh
```

## Machine interfaces

- `GET https://newagent.build/api/registry` — every component as JSON
- `GET https://newagent.build/api/vendors` — vendors, with the repo and releases feed to watch
- `GET https://newagent.build/api/advise?q=<plain english>` — recommended stack for a description
- `GET https://newagent.build/api/stack?<layer>=<id>&format=sh|json|md|yml|agents|env` — a stack as files
- `GET https://newagent.build/llms.txt` — the whole registry in one fetch

Any page here also returns markdown if you send `Accept: text/markdown`.