Skip to content
All insights

LLM Gateways · Field note

Why every enterprise ends up building an LLM gateway

Many teams, many models, one bill. Routing, budgets, keys, and audit logs belong in one layer, not in every application.

By Asif Hussain2 min read

The pattern is remarkably consistent. One team starts with OpenAI. Another uses Azure OpenAI because that is where their data lives. A third tries Claude through Amazon Bedrock, and the data science group hosts an open-weight model of their own. Twelve months later there are five sets of API keys in five places, three invoices, and nobody can say how much a given application costs to run.

At that point someone proposes putting a single layer between the applications and the model providers. That layer is an LLM gateway, and in my experience almost every enterprise that uses generative AI seriously ends up with one, whether they plan it or not. Planning it is cheaper.

What a gateway actually is

A gateway is a single entry point for model traffic. Applications call one internal API, and the gateway decides which provider and model serve the request, applies policy, and records what happened. It is less a product category than an architectural layer, much like an API gateway for ordinary services.

What belongs in it

  • One API shape: applications speak one interface, so switching models does not mean rewriting code.
  • Routing and fallbacks: send each request to the right model, and fail over when a provider is slow or down.
  • Budgets and rate limits: per team and per application, so one runaway job cannot consume the month’s budget.
  • Key management: applications never hold provider keys; the gateway does.
  • Logging and audit: who called which model, with what, at what cost, with sensitive fields redacted.
  • Guardrails: consistent checks for personal data and content policy, applied once instead of in every app.
  • Caching: identical requests should not be paid for twice.

What does not belong in it

It is tempting to keep adding features until the gateway becomes an AI platform of its own. Resist that. Business logic, application-specific prompts, and agent orchestration belong in the applications. A thin gateway is easy to operate and easy to trust. A thick one becomes a bottleneck that every team has to queue behind.

Build, buy, or adopt open source

There are good commercial and open-source options, and cloud providers offer gateway features of their own. The choice matters less than the criteria. Check the added latency, especially for streaming responses. Check that it supports tool calling and the newer API features your teams depend on. Know where the logs are stored and who can read them. And decide up front who will operate it, because a gateway is production infrastructure from the day the first application depends on it.

How to roll one out

Start with pass-through mode: route existing traffic through the gateway without changing behavior, and simply log it. Within a few weeks you will have something most organizations lack, a true picture of who uses which models and what it costs. Then add budgets and rate limits. Then routing and fallbacks. Showing each team its own usage report changes behavior faster than any policy memo.

Showing each team its own usage report changes behavior faster than any policy memo.

The gateway is not the exciting part of generative AI. It is the part that lets the exciting parts scale without surprising the CFO or the CISO.

  • LLM gateways
  • Platform engineering
  • Cost control

More insights