What is a large language model gateway?

Definition

A large language model gateway, commonly called an LLM gateway, sits between an application and model providers. It can provide a common API, authentication, routing, logging, rate limits, retries and provider failover for model calls.

A gateway can measure individual calls but may not understand the full behavior of an agent run. Loops, growing context, tool output and subagents can increase total spending inside the application, so run-level controls may be needed above the gateway.

ELI5

A large language model gateway is a managed doorway between an application and several AI model services. The application sends requests to the gateway, which chooses or reaches the right provider and applies shared rules.

For example, a coding tool could use one compatible gateway to connect a user's key to different model providers. The gateway can simplify switching, but it must keep keys private and clearly report where each request went.

What does an LLM gateway control?

It can control authentication, provider routing, rate limits, retries, logging and policy checks around model API calls.

Why might an LLM gateway miss runaway agent spending?

It sees model calls but may lack the run-level context needed to understand loops, subagents and expanding prompts.

  1. Nachiket Paranjape and Swaroop Chitlur Haridas beside the words AI Quality Is a Team Sport
  2. Tisha Chawla and Susheem Koul beside the words Control the Token Burn
  3. Matthew Berman looking concerned beside the words OpenAI Cuts Cursor Off
  4. Jack Roberts and Nick Saraev beside the words The Free Model Mystery
  5. Justin Joyce beside the words AI Agents Scale GTM Teams
Definition card for large language model gateway: What is a large language model gateway?

A large language model gateway is an intermediary that standardizes, routes and monitors application calls to one or more language-model providers.