Table of contents

Thousands of companies trust Merge to accelerate AI from PoC to production.
Get a demo

LM routers vs LLM proxies: which one do you actually need?

Dmytro Klymentiev
at Merge

If you’ve shipped anything on top of LLMs, you’ve probably heard ”proxy," and "router" used as if they mean the same thing. 

They don't. 

They solve two different problems, and knowing which one you’re actually reaching for saves you from adding a layer you don't need, or skipping one you do.

Here’s the short version: a proxy moves requests, a router decides where they go. Most production gateways bundle both, but the concerns are separable, and it’s worth telling them apart before you pick a tool.

What an LLM proxy does

A proxy sits between your application and one or more model providers and forwards requests. 

LLM proxy overview

An LLM proxy typically includes:

  • One endpoint, many providers: Your app calls a single OpenAI-compatible URL and the proxy translates to OpenAI, Anthropic, Google, or a self-hosted model. You won’t have to maintain the SDKs yourself
  • Auth and key management: Provider keys live in the proxy, not scattered across services. Virtual keys with per-team budgets sit here too
  • Observability: Because every request passes through, the proxy is the natural place to log model, tokens, latency, cost, and the prompt and completion
  • Resilience: Retries, rate-limit handling, and failover to a backup provider when one is down
  • Caching: Exact-match and semantic caching, so a repeated prompt never reaches a provider.

A proxy can be completely static by sending everything to one model through a clean, observable, and cacheable layer. It doesn’t decide which model is best for a given request.

You want a proxy when you’re calling more than one provider, when you can’t answer "why did our bill jump last week," or when a single provider outage can take down your product.

What an LLM router does

An LLM router answers a different question: given this specific request, which model should handle it? Routing is a decision layer, not a transport layer.

It generally comes in two flavors:

  • Rule-based routing: Write policies that define where requests get sent. For example, short classification prompts go to a cheap small model, long reasoning tasks go to a frontier model, and anything touching regulated data stays on an approved provider. The approach is simple, transparent, and it captures most of the available cost savings
  • Learned routing: A model predicts, per request, the cheapest option that’ll still produce a good-enough answer, and routes accordingly. This approach can beat hand-written rules at high volume, but it adds a model to your hot path and a layer of behavior you have to trust and monitor
LLM router overview

LLM routing exists because of economics.

Frontier models often cost ten to fifty times a capable small model, and a large share of production traffic is easy: classification, extraction, short answers. Route that share to a cheaper model and your bill drops without users noticing. Route it badly and quality drops instead, which is why routing is the part you roll out carefully and measure.

You want an LLM router when your traffic is genuinely mixed in difficulty and your spend is large enough that sending everything to the most expensive model is wasteful.

LLM router vs LLM proxy

In practice, most tools you’ll evaluate do both. 

A proxy that also picks the model per request is what most people mean by an LLM gateway

Merge Gateway, for example, sits in the request path as a proxy (unified access, logging, budgets, policy controls) and routes by cost, latency, quality, or policy on top of that. LiteLLM is proxy-first with routing rules added. A predictive router is router-first and expects you to bring your own transport.

The useful mental model is layers, not products:

1.  Transport layer (proxy): get the request to a provider, observably and resiliently.

2.  Decision layer (router): choose which provider and model, per request.

A product can own one layer or both. And your architecture question is which layers you need, not which brand name you've heard most.

Do you need an LLM proxy, an LLM router, or both?

Here are some scenarios to help you decide: :

  • One provider, low volume, prototype: Neither; the provider SDK plus a log line is enough. A gateway here is premature
  • Multiple providers, production traffic, unpredictable cost: A proxy. You need the unified endpoint, observability, and failover before you need clever routing
  • Mixed-difficulty traffic and high LLM spend: Add routing on top of the proxy. Start with rule-based routing you can read and reason about, and reach for learned routing only once static rules stop paying off
  • Regulated or multi-team. Both, plus the governance that usually comes with a proxy: policy controls, per-team budgets, audit-ready logs.

The order matters. You’ll generally want to put in the proxy first, get visibility, then use that visibility to design routing rules. Teams that try to build learned routing before they can even see their own traffic usually end up routing in the dark.

Try this without a budget

Both a proxy and a router are easier to design once you've watched a few models handle your real prompts side by side, and you don't need a budget to do that.

Most providers, and aggregators like OpenRouter's free tier or Merge Gateway's expose enough free open-weight models to prototype routing decisions before you spend anything.

Run the same hundred production prompts through a small model and a frontier model, compare the outputs, and your routing rules will mostly write themselves.

{{this-blog-only-cta}}

Dmytro Klymentiev
@Merge

Dmytro Klymentiev builds self-hosted AI infrastructure and writes about running LLMs in production here

Read more

Outperform frontier models with Merge Fusion

Company

AI governance platforms: what to look for and the leading options

AI

Embedded Routing Stack: Give your customers control over model routing

Company

Subscribe to the Merge Blog

Get stories from Merge straight to your inbox

Subscribe

Route and proxy LLM requests with Merge Gateway

The LLM gateway combines proxy and router capabilities; it provides the transport/control layer for model access and routes requests across models based on cost, latency, quality, or policy.

Get started for free
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text
But Merge isn’t just a Unified 
API product. Merge is an integration platform to also manage customer integrations.  gradient text