LiteLLM or Envoy? Choosing an LLM gateway for Azure, OpenRouter, Vertex AI and Bedrock
You call models from several Azure accounts, OpenRouter, Google Cloud Vertex AI and AWS Bedrock, and you want one endpoint in front of all of them. Here is what the two main open-source gateways do, how they differ, and which one fits.
Short answer: if you deploy with Docker Compose or on a single VM, use LiteLLM. Run its signed Docker image, pinned by digest, on an internal network. If you already run Kubernetes and need high throughput, look at Agent Router, the Envoy-based gateway formerly called Envoy AI Gateway.
First, the names
- Envoy Gateway is a general Kubernetes API gateway. On its own it does not count tokens or translate between provider API formats.
- Agent Router is the LLM layer on top of Envoy Gateway. It was called Envoy AI Gateway until 2026, when it was renamed and moved to the Agentic AI Foundation. Its APIs did not change: the API group is still
aigateway.envoyproxy.ioand the CLI is stillaigw. Version 1.1.0 shipped in August 2026.
So "Envoy" in this comparison means Agent Router, not plain Envoy Gateway.
Provider coverage
| Provider | LiteLLM | Agent Router |
|---|---|---|
| Azure (several accounts) | Built in. List the same model name once per account, each with its own endpoint and key. The router load-balances across them and fails over between them. | Built in, with an API key or Azure credentials. One backend per account, with weights or a priority order. |
| OpenRouter | Built in. | Not in the provider list. It should work as a generic OpenAI-compatible backend, but that path is not documented. |
| Vertex AI | Built in, with service account credentials. | Gemini, and Claude on Vertex. Supports default credentials, service account keys and workload identity federation. |
| Bedrock | Built in, with IAM credentials and load balancing across regions. | Built in, translating OpenAI-style requests to Bedrock. |
How they differ
| LiteLLM | Agent Router | |
|---|---|---|
| Runs as | One container, plus PostgreSQL for keys and spend, plus Redis. | Kubernetes, installed with Helm on top of Envoy Gateway. The standalone aigw run mode is documented for local testing and development. |
| Client auth | Issues its own API keys, with teams, per-key and per-team budgets, and an admin UI. | Envoy Gateway security policies: API key, basic auth, JWT, OIDC or an external authorization service. |
| Limits | Request and token rate limits, plus dollar budgets, per key, team and model. | Token-based rate limits and total token quotas, both stored in Redis. A streamed response is counted when it finishes, so one long stream can go over the limit. |
| Fallback | Retries, fallbacks, and taking a deployment out of rotation while it returns 429 errors. | Backends in priority order, with retry policies. |
| Performance | Python service; adds more latency at high request rates. | Envoy proxy with Go components; fast and efficient. |
| Configuration | A YAML file or the admin UI. | Kubernetes custom resources, which suits GitOps. |
LiteLLM does more than route LLM calls
LiteLLM also routes three other kinds of traffic. All of them share the same keys, teams, logging and spend tracking as your model calls.
MCP gateway
- One
/mcp/endpoint in front of many MCP servers, over streamable HTTP, SSE or stdio. REST endpoints let you call tools without a model. - Access can be limited by key, team, organization, and individual tool.
- It handles auth to the upstream servers: API key, bearer token, basic auth, OAuth 2.0 or AWS SigV4.
- MCP tools work with any model, not just OpenAI's, through the chat completions or Responses endpoints. The proxy can run the tool calls itself.
Agent gateway (A2A protocol)
- Agents are called over the A2A protocol at
/a2a/{agent_id}, and/v1/agentslists the agents a key may use. - Supported agent sources include native A2A agents, Vertex AI Agent Engine, LangGraph, Azure AI Foundry, Bedrock AgentCore and Pydantic AI.
- Agents can also be called like a model through chat completions.
- Spend is attributed per agent, and a trace ID groups every model call in one agent run.
Pass-through API routing
- Maps a proxy path to any upstream HTTP API, with sub-paths, per-method routes, injected headers and per-request pricing.
- The built-in provider routes (Anthropic, Vertex AI, Bedrock, Gemini) check LiteLLM keys at no extra cost.
- The catch: on your own custom routes, key checking is an Enterprise feature. Without it, a custom route forwards traffic but does not enforce keys, budgets or rate limits. So either pay for Enterprise or put your own auth in front of those routes.
Connecting your application
- If your app calls an OpenAI-compatible API with a base URL and key you can set per model, moving to a gateway is a configuration change: point those models at the gateway's URL and give them a gateway key.
- Code that uses a provider's own SDK, such as a Gemini-specific or Groq-specific client, bypasses the gateway until you switch it to the OpenAI-compatible endpoint.
- If you already meter usage yourself, keep your own ledger as the source of truth, and use the gateway's spend data to reconcile against provider bills. Before switching traffic, check that token usage still comes back in responses when calls go through the gateway.
Security: the March 2026 LiteLLM incident
On March 24, 2026, attackers used stolen publishing credentials to push malicious litellm versions 1.82.7 and 1.82.8 to PyPI. They were live for about 40 minutes. The payload stole credentials, tried to spread across Kubernetes clusters, and installed a persistent backdoor. LiteLLM says its official Docker image was not affected, because the image pins its dependencies. Since v1.83.0, releases go through a rebuilt CI/CD pipeline and Docker images are signed with cosign.
If you adopt LiteLLM:
- Run the official Docker image, pinned by digest, and verify its cosign signature before deploying.
- Never install the
litellmpackage from PyPI without pinning a version. - Keep the gateway on an internal network, not exposed to the internet. It holds the credentials for every provider behind it.
How to choose
- You run Docker Compose or a single VM, and want keys, budgets and a UI now: LiteLLM.
- You want MCP, agents and plain APIs behind the same gateway as your models: LiteLLM, keeping in mind that key checking on custom API routes is an Enterprise feature.
- You are on Kubernetes, manage infrastructure through GitOps, and need high throughput: Agent Router.
What this is based on
This comparison comes from each project's documentation and security write-ups, read in September 2026. Neither gateway was load-tested here, and OpenRouter behind Agent Router was not tried.
- LiteLLM: MCP gateway, Agent gateway (A2A), Pass-through endpoints, Vertex AI, Bedrock, March 2026 security update
- Incident reports: PyPI, Datadog Security Labs
- Agent Router: Documentation, Repository
- Envoy Gateway: Security tasks