Migrate from LiteLLM
Move a LiteLLM SDK or Proxy setup to BitRouter — local binary, hosted cloud, or both.
Migrating from LiteLLM to BitRouter
LiteLLM is a Python SDK and self-hosted proxy for unifying access to 100+ LLM providers. BitRouter solves the same problem from a different angle: an agent-native proxy with a single OpenAI-compatible surface — runnable as a local binary (BYOK, no infra) or as a hosted endpoint with autonomous agent payments. This guide is for teams whose workload has shifted from backend services to agent runtimes and want a leaner, agent-first surface.
Why migrate?
| LiteLLM Proxy | BitRouter | |
|---|---|---|
| Runtime | Python | Rust (single static binary) |
| Production deps | Postgres + Redis + Docker/K8s | None |
| Deployment modes | Self-hosted only | Local binary or hosted (api.bitrouter.ai) — same OpenAI-compatible endpoint |
| Agentic auth & payment | None | x402 / MPP autonomous payment (cloud mode) |
| Design focus | All-in-one LLM gateway: admin UI, virtual keys, budgets, with agent gateways added alongside | Agent-first proxy: MCP / ACP / Skills, agent firewall, agentic payment as the core surface |
| Agent protocol surface | MCP, A2A, Skills, CLI — bolted onto the horizontal gateway | MCP, ACP, Skills, CLI — the product, not an add-on |
| License | MIT (SDK) / paid enterprise tier | Apache 2.0 throughout |
Two things worth highlighting
1. Cloud and local share the same surface
With LiteLLM, the proxy is something you operate. With BitRouter, the hosted cloud and local binary expose the same OpenAI-compatible endpoint — you can start local during development, then point at api.bitrouter.ai for production (or vice versa) without changing client code. The CLI, the wizard, and Agent Skills all work in either mode; toggle with one keypress in the setup TUI. See the Quick Start for both flows.
This matters when your agent should pay per request without you provisioning keys for it — Cloud mode supports x402 / MPP autonomous payments, which LiteLLM has no equivalent for.
2. Agent-native, not all-in-one
LiteLLM has shipped MCP, A2A, Skills, and a CLI alongside its horizontal LLM gateway — virtual keys, team budgets, spend dashboards, admin UI all included. BitRouter inverts that: agent primitives are the product, the team-admin stack is intentionally minimal. What you get on the BitRouter surface:
- MCP gateway — proxy MCP servers so agents discover tools across hosts.
- ACP gateway — first-class support for the Agent Client Protocol used by Claude Code, Codex, OpenCode, and others.
- Guardrails — regex rules on the proxy hop that redact or block matching content inline.
- Cloud Tracing — built-in spend and request tracing, no external collector required.
- Agent Skills gateway (coming soon) — install and route capabilities by skill, not by raw model name.
- Headless CLI — TUI wizard plus scriptable commands for setup and ops.
- Agentic auth & payment — x402 / MPP so an agent can pay per request without you provisioning a key for it. LiteLLM has no equivalent.
If you depend on LiteLLM's team-admin UI, virtual keys, and per-user budgets, LiteLLM is still the better fit. If you're building agents — especially agents that should transact autonomously — BitRouter is.
Migration paths
From the LiteLLM Python SDK
LiteLLM as a library becomes a BitRouter base URL swap on the standard OpenAI SDK:
<Tabs items={['Before (LiteLLM SDK)', 'After (BitRouter)']}>
from litellm import completion
response = completion(
model="openai/gpt-4o",
messages=[{"role": "user", "content": "Hello"}],
api_key="sk-...",
)Local: bitrouter (BYOK via env vars) — see /docs/overview/quickstart
Cloud: base_url="https://api.bitrouter.ai/v1", api_key=$BITROUTER_API_KEY
client = openai.OpenAI( base_url="http://127.0.0.1:4356/v1", api_key="not-used-in-local-byok", )
response = client.chat.completions.create( model="openai/gpt-4o", messages=[{"role": "user", "content": "Hello"}], )
</Tab>
</Tabs>
Fallbacks and provider selection that you'd configure with `litellm.Router` move into BitRouter's [routing presets](/docs/gateway-and-routing/presets) and [model fallback rules](/docs/gateway-and-routing/model-fallback) — declared once, not per call site.
### From the LiteLLM Proxy
The proxy migration replaces the Python process + Postgres + Redis with a single binary. Install and launch:
<Tabs items={['Before (LiteLLM Proxy)', 'After (BitRouter local)']}>
<Tab value="Before (LiteLLM Proxy)">
```bash
docker run -d -p 5432:5432 -e POSTGRES_PASSWORD=pass postgres
docker run -d -p 6379:6379 redis
pip install 'litellm[proxy]'
litellm --config config.yaml --port 8000Set provider keys; BitRouter auto-detects on start
export OPENAI_API_KEY=sk-... export ANTHROPIC_API_KEY=sk-ant-...
Interactive wizard (Cloud or local); default local serves on :4356
bitrouter
</Tab>
</Tabs>
To skip the local proxy entirely, point clients at `https://api.bitrouter.ai/v1` with a BitRouter API key — no binary, no infra. Same endpoint shape.
## Feature mapping
| LiteLLM concept | BitRouter equivalent | Docs |
|---|---|---|
| `model_list` in `config.yaml` | Provider keys + routing presets | [Presets](/docs/gateway-and-routing/presets) |
| `router_settings` (retries, fallback) | Model fallback rules | [Model fallback](/docs/gateway-and-routing/model-fallback) |
| `routing_strategy` (least-busy, latency) | Provider selection | [Provider selection](/docs/gateway-and-routing/provider-selection) |
| `cache` (Redis/DynamoDB backed) | Not built into the proxy — handle in app/edge if needed | — |
| Virtual keys + budgets + admin UI | Workspace keys (cloud); env-var keys (local) | [BYOK](/docs/gateway-and-routing/byok) |
| Guardrails / PII / content filter | Agent firewall on the proxy hop | [Guardrails](/docs/gateway-and-routing/guardrails) |
| Callbacks (Langfuse, Datadog, etc.) | Built-in spend + request logs; OTLP export | [OpenTelemetry](/docs/observability/opentelemetry) |
| MCP Gateway | MCP gateway | [MCP](/docs/gateway-and-routing/mcp-gateway) |
| A2A Agent Gateway | ACP gateway | [ACP](/docs/gateway-and-routing/acp-gateway) |
| Skills Gateway / `/skills` endpoint | Skills gateway with [agentskills.io](https://agentskills.io) registry | [Agent Skills](/docs/gateway-and-routing/mcp-gateway) |
| LiteLLM Proxy CLI | `bitrouter` CLI / TUI | [Headless CLI](/docs/reference/cli) |
| — (no equivalent) | Autonomous agent payment (x402 / MPP) | x402 / MPP |
## What BitRouter intentionally doesn't ship
To set expectations honestly: BitRouter does not ship a built-in admin UI for team/user budgets, virtual-key generation by API, or a spend analytics dashboard at parity with LiteLLM Enterprise. Per-workspace key scoping in cloud mode and env-var-scoped keys in local mode cover the common cases, but if your migration depends on per-user virtual keys with quotas enforced inside the proxy, plan for that gap or stay on LiteLLM for those workloads.
## Migration checklist
<Callout type="info">
**Before migration**
- [ ] List the providers and models you actually use (skip the rest)
- [ ] Note any custom callbacks/middleware — see if a [guardrail rule](/docs/gateway-and-routing/guardrails) covers it
- [ ] Decide cloud vs. local (or both — they share the endpoint)
</Callout>
<Callout type="success">
**Migration**
- [ ] Install the BitRouter CLI ([Quick Start](/docs/overview/quickstart))
- [ ] Export provider keys, or paste them into the cloud dashboard (sealed-box encrypted)
- [ ] Update client `base_url` to `http://127.0.0.1:4356/v1` (local) or `https://api.bitrouter.ai/v1` (cloud)
- [ ] Verify with a sample request
- [ ] Decommission Postgres / Redis if local-only setup is sufficient
</Callout>
## Next steps
<Cards>
<Card title="Quick Start" href="/docs/overview/quickstart" description="Run BitRouter locally or in the cloud in under a minute" />
<Card title="BitRouter vs LiteLLM" href="/docs/overview/bitrouter-vs-litellm" description="Side-by-side on routing, observability, and operations" />
<Card title="Agent features" href="/docs/gateway-and-routing/mcp-gateway" description="MCP, ACP, skills, agent firewall, x402 payment" />
<Card title="API Reference" href="/docs/reference" description="OpenAI- and Anthropic-compatible endpoints" />
</Cards>
## Get help
- **Discord**: [Join the community](https://discord.gg/G3zVrZDa5C) for migration support
- **GitHub**: [Open an issue](https://github.com/bitrouter/bitrouter/issues)
- **Email**: contact@bitrouter.ai for enterprise migration assistanceHow is this guide?