Best LLM Router / Comparisons / LiteLLM vs Portkey
LiteLLM vs Portkey
Both are open-source gateways that sit in front of provider accounts you hold. LiteLLM is a Python SDK and proxy you run yourself. Portkey's gateway can be self-hosted too, and Portkey also runs it as a hosted service.
In one line: Both are sound open-source gateways; LiteLLM leans to cost control for platform teams, Portkey to routing rules, guardrails and a hosted option.
Facts checked 11 Nov 2026 against each vendor’s public docs.
LiteLLM
Self-hosted gatewaySelf-hosted
An open-source Python SDK and proxy you run yourself: one OpenAI-format interface to 100+ providers, with retries, fallbacks, virtual keys and cost tracking.
- Pricing model
- Open source: you pay providers and hosting
- ZDR on inference
- Not documented
- Web search in the call
- Not documented
Portkey AI Gateway
Open-source gatewayHosted or Self-hosted
An open-source gateway you can run yourself or use hosted, with retries, fallbacks, load balancing, conditional routing and guardrails.
- Pricing model
- Open source: you pay providers and hosting
- ZDR on inference
- Not documented
- Web search in the call
- Not documented
Side by side
| Criterion | LiteLLM | Portkey AI Gateway |
|---|---|---|
| Model coverage | 100+ LLM providers, including OpenAI, Anthropic, Vertex AI and Bedrock, called in the OpenAI format.Source, checked 11 Nov 2026 | The project states routing to 1600+ language, vision, audio and image models (the vendor's figure).Source, checked 11 Nov 2026 |
| Latency overhead | It runs in your infrastructure, so the overhead depends on where you deploy it and what you turn on. No figure is used here; measure it in your own setup.Source, checked 11 Nov 2026 | The vendor states under 1 ms of added latency. That is the vendor's own figure, not a measurement made here.Source, checked 11 Nov 2026 |
| Pricing model | MIT-licensed outside the repository's enterprise/ directory, which has its own licence. You pay each provider directly, plus your own hosting.Source, checked 11 Nov 2026 | The open-source gateway is free to run yourself; you pay providers and hosting. Hosted and enterprise plans are priced on portkey.ai.Source, checked 11 Nov 2026 |
| Privacy terms | Requests go from your servers to the providers you configure with your own keys, so retention is set by you and by each provider's terms.Source, checked 11 Nov 2026 | Self-hosted, requests stay on your servers until they reach your providers. For the hosted gateway, check retention terms in Portkey's docs.Source, checked 11 Nov 2026 |
| Routing and fallbacks | Built-in retry and fallback logic across deployments through its Router; the proxy adds virtual keys, cost tracking and an admin UI.Source, checked 11 Nov 2026 | Automatic retries, fallbacks, load balancing and conditional routing, plus guardrails on requests and responses.Source, checked 11 Nov 2026 |
Deployment
LiteLLM is self-hosted: a container or the CLI. Portkey's gateway can run on your servers or be used hosted, which lets you start hosted and move in later, or the reverse.
Routing rules
Both do retries and fallbacks. Portkey documents load balancing and conditional routing alongside guardrails on requests and responses. LiteLLM's Router handles fallbacks across deployments, and its proxy adds virtual keys, cost tracking and an admin UI.
Latency
Portkey states under 1 ms of added latency; that is the vendor's figure. LiteLLM publishes no single number because it depends on your deployment. Run both next to your app and measure p50 and p95 against a direct provider call.
Which suits whom
Choose LiteLLM if
- Your stack is Python and you want the SDK and proxy from one project
- Per-team virtual keys, budgets and cost tracking are the main need
Choose Portkey AI Gateway if
- You want the option of a hosted gateway as well as self-hosting
- Guardrails and conditional routing rules are the main need
Both are sound open-source gateways; LiteLLM leans to cost control for platform teams, Portkey to routing rules, guardrails and a hosted option.