What happened

Vercel’s AI Gateway is a proxy layer that routes an app’s LLM requests to whichever provider is configured. It now supports routing rules, firewall-style rules applied at the gateway level instead of inside application code. They control which models a team is allowed to call.

There are two types. A rewrite rule silently serves a request for one model using a different model. The app keeps requesting the original model name, and the Gateway swaps in the replacement behind the scenes. A deny rule blocks requests for a specific model outright, returning an error instead of letting the call through.

Why it matters

When a model provider retires or changes a model, the usual fix is a code change. Someone has to find every place the app references that model name and ship an update before the old one disappears. Vercel’s routing rules let you push one rule instead, and every request reroutes immediately.

That operational convenience can hide a product change. The replacement model may produce different answers, support a smaller context window, call tools differently, or reject a structured-output format the original accepted. A successful HTTP response does not prove that the fallback preserved the app’s behavior.

This isn’t a hypothetical problem. GitHub is deprecating Gemini 2.5 Pro and Gemini 3 Flash across Copilot on July 31, 2026, and telling customers to update their own workflows before then. That is exactly the kind of scramble routing rules are built to absorb: point traffic at the replacement model centrally, instead of racing a hard deadline to hunt down every reference in the code.

Who should care

If your app calls AI models through Vercel, this is worth knowing even if you didn’t set the Gateway up yourself and don’t know it’s there. It matters most if a model you depend on has ever gone down or gotten retired with little warning, and you had to scramble to fix it.

What builders should do next

Routing rules are in beta and set up through the Vercel CLI, there’s no dashboard toggle yet. The commands are short enough to run yourself, or to hand to your coding agent:

vercel ai-gateway rules add --type deny --source openai/gpt-5.5
vercel ai-gateway rules add --type rewrite --source anthropic/claude-opus-4.8 --destination anthropic/claude-haiku-4.5

A deny rule blocks a model outright, useful for models you don’t want your app calling by mistake. A rewrite rule quietly swaps one model for another. Set --source to the model getting retired and --destination to its replacement, and every request for the old name reroutes automatically, no code change required.

Before enabling a production rewrite, replay a small set of real requests against both models. Check answer quality, maximum input size, tool calls, JSON or other structured outputs, latency, and cost. Include at least one failure case and one request near your normal context limit.

If the destination passes, enable the rule and watch application errors and output quality. If you cannot test it first, use a deny rule and a visible error rather than silently serving behavior you have not verified.

Routing rules can buy time during an outage or deprecation. They are a control point, not proof that the replacement model is safe for production.


End of article