AI Gateway: Model Routing, Rate Limits, and Fallback

These pieces share one question: when an application calls several models, who decides which route to take, what happens on failure, and how cost is governed. Start with the overview, then read a concrete router’s design trade-offs, then the broader scheduling research.

Suggested reading order

Start with the overview

See a concrete implementation

One level up

Common questions

How is an AI gateway different from a regular API gateway?
A regular gateway forwards requests with auth and rate limits; an AI gateway also understands models, tokens, and cost, and routes, retries, and degrades across models. Read more
What should happen when an upstream model returns 429?
Separate retryable from non-retryable failures, then move down a bounded fallback chain and record the reason for each hop. Read more

Everything tagged “AI Gateway”