Portkey → LiteLLM
What it saves, what actually moves, what you rebuild — and the thing that catches people.
What it costs, and what it saves
Portkey's paid tiers scale with request volume. LiteLLM self-hosted is a proxy container — effectively free.
Moves cleanly
The gateway concept and your provider keys. Both present an OpenAI-compatible interface.
You rebuild
Routing rules, fallback chains and cache configuration.
What Portkey costs you today
There is a free developer tier; paid plans start around $99/month for the pro feature set, with enterprise pricing on request. The gateway itself is separately available as open source under the MIT licence, so the subscription buys the hosted control plane, dashboards, guardrails and support rather than the routing engine. Verified against Portkey's published pricing on 2026-07-30; AI pricing moves quickly, so confirm before committing.
What actually holds you in
Light by the standards of this market, and worth saying so plainly — the gateway speaks the OpenAI-compatible API, so pointing your client at a different base URL is usually the whole migration. What does not move is the accumulated layer around it: prompt templates, guardrail configuration, virtual keys and the observability history all live in Portkey's control plane.
What you are moving to
LiteLLM is the de facto open gateway for this layer: a proxy that exposes an OpenAI-compatible endpoint in front of 100+ providers, with virtual keys, per-team budgets, rate limits, fallbacks and logging. You run it, so prompts never leave your infrastructure and there is zero markup on token spend — you pay the model providers directly. At 55k GitHub stars with commits landing daily it is the most widely adopted option here. Licensing is worth reading precisely: the core is MIT, while everything under the repository's enterprise/ directory carries a separate commercial licence.
Free and self-hosted — you pay the model providers directly with no markup, plus hosting for a small VM (roughly $20–50/month). A paid enterprise tier exists for SSO, audit logs and support.
LiteLLM strengths
- Zero markup — provider tokens are billed to you at cost
- Prompts and completions never leave your infrastructure
- Virtual keys, per-team budgets and rate limits built in
- 100+ providers behind one OpenAI-compatible endpoint; 55k stars, daily commits
What you give up
- You run it: deployment, upgrades, monitoring and uptime are yours
- Observability is basic out of the box — expect to pair it with a tracing tool
- The MIT core stops at the enterprise/ directory; SSO and audit logging sit behind a commercial licence
- A proxy you operate is another production dependency to keep healthy
The migration, step by step
- 1Deploy the LiteLLM proxy with a config.yaml listing your models and providers
- 2Move provider API keys into the proxy rather than the application
- 3Repoint applications at the LiteLLM endpoint
- 4Recreate routing and fallback logic in config
- 5Add Redis if you want caching and rate limiting to survive restarts
The gotcha
LiteLLM is now a single point of failure for every model call in your stack. Running one instance with no health check means an LLM gateway outage looks like every AI feature breaking at once.
When to stay on Portkey
You want the observability and guardrails Portkey bundles, which LiteLLM leaves to you.
More Layer 4 migrations
Figures verified 2026-07-30 against vendor pricing pages. Prices change and migrations differ by estate — treat the cost delta as a starting model, not a quote. Rankings and recommendations here are merit-only; affiliate income never changes a verdict. See our methodology.