A switchboard.
Every call to any model goes through one desk. It checks keys, budgets and limits, writes everything down, and reroutes when a line is down.
LiteLLM is a gateway: one API in front of 100+ model providers, with keys, budgets, fallbacks and logs. theloop sits one level up and runs the whole loop: model, then tools, then model again until the answer is done. Different jobs, and they stack.
Every call to any model goes through one desk. It checks keys, budgets and limits, writes everything down, and reroutes when a line is down.
Talks to the model, fetches what it asks for from your tools, comes back, and repeats until the answer is done. Then hangs up and forgets.
| Question | LiteLLM | theloop |
|---|---|---|
| What is it? | A Python SDK and a self-hosted proxy, the AI gateway | A stateless HTTP service that runs the agent loop |
| Main job | One OpenAI-style API over many providers | Model → tools → model until a final answer |
| Providers | 100+ LiteLLM wins | Anthropic, OpenAI, DeepSeek, GLM, GigaChat, MiniMax and anything OpenAI-compatible |
| Your tools | Can run tools from MCP servers registered in the gateway | Calls your own HTTPS endpoints, through a host allowlist |
| Risky actions | Set per MCP server. With approval set to never, the gateway runs tools itself |
Write tools never run: they answer deferred, and your system approves |
| Keys and budgets | Virtual keys, team budgets, rate limits, fallbacks, caching | A key per request, per-key queues, token and cost budgets per run |
| Cost tracking | Spend per key, team and user | Usage per provider attempt, failed ones included |
Better together. Put LiteLLM behind theloop's openai-compatible provider. LiteLLM handles routing and budgets, theloop runs the loop. It just has to be reachable over HTTPS on an allowlisted host.