OpenAI's GPT-5.6 launch made the model menu more explicit: Sol for the hardest work, Terra for balanced intelligence and cost, and Luna for fast, cheaper throughput. That is useful, but it also creates a trap. If every request gets sent to the strongest model because nobody wants to own the routing decision, the system is simple to ship and expensive to run.
I would rather make model choice boring. A production AI feature should have a small routing contract, a budget ceiling, and an escalation rule that says when a cheap answer was not good enough. Vercel's AI Gateway is interesting here because the routing unit is just a model string and the budget unit can be an API key. That is enough machinery for most teams.
The shape of the problem
The common mistake is treating model selection as a product preference. It is really an operations control.
A support reply, issue summary, or title rewrite does not deserve the same default as a multi-step code review. The first task needs a fast model, a short timeout, and a hard output check. The second may need a stronger model, longer context, and a human-facing explanation of uncertainty.
GPT-5.6 sharpens this because the tiers are named as durable product choices instead of anonymous size suffixes. OpenAI positions Sol as the flagship tier, Terra as the lower-cost balanced tier, and Luna as the fastest and most affordable tier. That does not mean every app needs all three. It means the old boolean choice, cheap model or best model, is no longer enough for teams with mixed workloads.
The lazy design is not a generic model orchestration platform. It is a two or three tier table and a rule for moving up.
A small routing contract
I start with three fields per request:
| Field | Why it exists |
|---|---|
task | Names the workflow, not the provider |
risk | Separates harmless generation from user-visible or money-adjacent work |
check | Defines the cheapest verifier that can reject a weak answer |
That gives the router something concrete to inspect. It also keeps the call site readable.
import { generateText } from "ai";
type Tier = "fast" | "balanced" | "frontier";
const modelFor: Record<Tier, string> = {
fast: process.env.AI_FAST_MODEL!,
balanced: process.env.AI_BALANCED_MODEL!,
frontier: process.env.AI_FRONTIER_MODEL!,
};
function tierFor(input: { risk: "low" | "medium" | "high"; tokens: number }): Tier {
if (input.risk === "high") return "frontier";
if (input.tokens > 12000) return "balanced";
return "fast";
}
export async function runModel(input: { prompt: string; risk: "low" | "medium" | "high" }) {
const tier = tierFor({ risk: input.risk, tokens: input.prompt.length / 4 });
return generateText({
model: modelFor[tier],
prompt: input.prompt,
});
}
The important choice is not the heuristic. It is the interface. Product code asks for a capability and declares risk. Infrastructure code maps that to the current model string. When GPT-5.6 pricing, context windows, or provider availability changes, the routing table moves. The feature code stays quiet.
That pairs well with the state budget I use for production AI agents: decide what the system is allowed to remember, then decide what model tier is allowed to spend on that remembered state.
Budgets belong below the router
Vercel's June 2026 API key budgets are the part I would use before writing more application logic. A key can have a spend quota and refresh period. Once the budget is exceeded, Gateway rejects later requests on that key until the budget resets or changes.
That suggests a clean setup:
| Tier | Key | Budget style |
|---|---|---|
| fast | AI_FAST_GATEWAY_KEY | generous daily cap |
| balanced | AI_BALANCED_GATEWAY_KEY | moderate weekly cap |
| frontier | AI_FRONTIER_GATEWAY_KEY | tight daily or manual cap |
The point is not to prevent all waste. The changelog notes that the request crossing the cap can still complete, so this is not a transaction ledger. The point is to make runaway loops, demos, and unexpected traffic fail closed after a known spend boundary.
This is also where I would avoid clever fallback behavior. If the frontier key is out of budget, do not silently route high-risk work to a weaker tier. Return a typed error, degrade the product surface, or queue for review. For low-risk tasks, a fallback is fine if the output checker still passes.
Fallbacks are availability controls, not quality upgrades
Gateway model fallbacks are useful when a provider or model is unavailable. They should not be used as a hidden quality ladder.
For example, it is reasonable to try a primary balanced model and then a peer model if the first path fails. It is less reasonable to make a cheap model fail into a premium model for every vague prompt. That turns errors, timeouts, and weak validation into an unbounded cost path.
My rule is simple:
- Use fallbacks among peers for availability.
- Use explicit escalation for quality.
- Log both as different events.
That last line matters. If the cheap tier escalates 40 percent of the time, the router is lying. Either the task is harder than expected, the verifier is too strict, or the cheap model no longer fits the workload. This connects directly to the telemetry contract for production AI agents: every agent call should report model, provider, tier, retry, fallback, escalation, token count, and failure reason.
The rollout checklist
I would ship this in five small moves.
- Inventory the top ten AI calls by volume and user impact.
- Assign each call a default tier and one verifier.
- Put model IDs behind environment variables, not product code.
- Create separate Gateway keys per tier and set budgets.
- Review one week of spend, escalation rate, latency, and user-visible failures before adding more routing rules.
That is enough. A classifier model can come later if the simple rules leave money on the table. Most teams do not need that on day one because their workload shapes are already obvious: extraction, rewrite, summarize, classify, draft, reason, and review.
The forward-looking bet is that model routing will become part of release discipline, like cache policy or rate limits. GPT-5.6 gives teams a clearer tier vocabulary. Gateway budgets and fallbacks give the operational guardrails. The engineering job is to keep the router small enough that someone can still audit why a request spent what it spent.