A Model-Router Skill: Routing Across Grok 4.5, Opus 4.8, Fable 5, and GPT
Stop hardcoding one model. Build a router that sends cheap high-volume work to Grok 4.5, hard long-horizon work to Fable 5, and the balanced middle to Opus 4.8 — with a decision table you can copy.
A Model-Router Skill: Routing Across Grok 4.5, Opus 4.8, Fable 5, and GPT
Most skills pick one model and marry it. You wire in a client, hardcode a model string, and every request — the one-line classification and the ten-step refactor — goes to the same place at the same price. That was defensible when the frontier was one or two models deep. As of July 2026 it isn't.
Artificial Analysis's Intelligence Index now ranks Grok 4.5 at #4 of roughly 170 models, behind only Fable 5, GPT-5.5, and Opus 4.8. Those four are close enough on raw capability that the interesting question is no longer "which model is best" — it's "which model is best for this task, at this price." Grok 4.5 landed on July 8 with a headline price more than 60% below Opus 4.8 and GPT-5.5, which means the cheapest frontier-class option and the smartest one are now different models. A router is how you use both.
This piece is a build guide for a model-router skill: a thin layer that inspects a task and dispatches it to the right model instead of the default one. You'll get a decision matrix grounded in the independent index and per-token price, a routing table you can copy, and the failure modes that make naive routers worse than no router at all.
Key Takeaways
- The frontier is now four models wide. Fable 5, GPT-5.5, Opus 4.8, and Grok 4.5 (rank #4, Index 54) are close on capability but far apart on price — that gap is what a router monetizes.
- Route by task shape, not by vibes. Cheap/high-volume work goes to Grok 4.5; the hardest long-horizon reasoning goes to Fable 5; the balanced middle goes to Opus 4.8.
- Price is the tiebreaker, not the headline. Grok 4.5 at roughly
$2/$6per million tokens (in/out) undercuts Opus 4.7's$5/$25— so anything that doesn't need the top of the frontier should default down. - A router is ~20 lines plus a table. The hard part is the classification rule and the fallback, not the dispatch.
- SDK compatibility makes this cheap to build. Grok's API is OpenAI- and Anthropic-SDK compatible, so most models sit behind one interface with a swapped base URL and model string.
Why a router beats a default
Picking one model is a bet that your tasks are uniform. They almost never are. A single skill can contain a dozen classification calls (short input, short output, low stakes) and one deep agentic loop (huge context, many tool calls, high stakes). Sending both to the same frontier model means you either overpay for the cheap work or underserve the hard work.
The economics are stark once the prices diverge. If Grok 4.5 costs a fraction of Opus 4.8 per million output tokens, then every high-volume, low-difficulty call you route to Grok instead of Opus is money you keep — at capability that the independent index says is a single rank apart. The router captures that spread automatically, on every request, without you re-deciding each time.
There's a capability argument too, not just a cost one. Fable 5 currently leads the Intelligence Index and, on xAI's own launch benchmarks, leads all four of the coding evals xAI published. When a task genuinely is the hardest thing your agent does all day — a long-horizon refactor, a multi-file migration, a plan that has to hold across twenty steps — you want the top of the frontier and you don't want price to talk you out of it. The router lets you spend up exactly where it matters because you're saving everywhere else.
The decision matrix
Three inputs decide the route: difficulty, volume, and context size. Everything else is noise you can add later.
- Difficulty — does the task need frontier-leading reasoning, or is it a bounded transform? Classification, extraction, formatting, and short summaries are low-difficulty. Multi-step planning, cross-file reasoning, and long agentic loops are high.
- Volume — how many times per day does this run? A router earns the most on the high-frequency, low-difficulty quadrant, because that's where a cheaper model at near-equal quality compounds.
- Context size — Grok 4.5 ships a 500K-token context window. That covers most work, but not a whole monorepo dump. If a task genuinely needs more, that's a routing signal in its own right (and a reason to check the cheaper
grok-4.3, which the docs list at 1M context).
Map those onto the four models:
| Task shape | Route to | Why |
|---|---|---|
| High volume, low difficulty (classify, extract, tag, format) | Grok 4.5 | Frontier-class quality (Index #4) at >60% below Opus/GPT price — the spread compounds |
| Balanced day-to-day (drafting, medium reasoning, tool use) | Opus 4.8 | Top-3 on the index; the reliable default when quality matters more than pennies |
| Hardest long-horizon (deep refactors, 20-step plans, migrations) | Fable 5 | Leads the Intelligence Index and all four of xAI's own launch coding evals |
| Specialized (voice, image, GPT-native tools/ecosystem) | GPT-5.5 / provider-native | Route by the capability the task actually requires, not by default |
Treat this as a starting policy, not scripture. The right table for your workload depends on your task mix — but the structure (cheap-and-common down, hard-and-rare up, balanced in the middle) holds regardless of the exact numbers.
A minimal router
Because Grok's API is OpenAI- and Anthropic-SDK compatible, you can hide most of the frontier behind one interface. The router is a classifier plus a lookup. Here's the shape in Python — adapt the client wiring to your stack, and confirm the exact model strings and base URL at docs.x.ai before you ship, since IDs drift.
# Routing policy: task shape -> model string.
# Confirm exact IDs / base URLs at docs.x.ai and each provider's docs.
ROUTES = {
"bulk": "grok-4.5", # high-volume, low-difficulty
"balanced": "opus-4-8", # the reliable default
"hard": "fable-5", # hardest long-horizon reasoning
}
def classify(task) -> str:
# Cheap, deterministic signals first — no model call needed.
if task.est_tokens > 400_000:
return "hard" # long context -> send up (or a 1M-context model)
if task.high_stakes or task.multi_step:
return "hard"
if task.high_volume and not task.needs_deep_reasoning:
return "bulk"
return "balanced"
def route(task):
tier = classify(task)
model = ROUTES[tier]
try:
return call_model(model, task)
except ModelError:
# Fallback climbs UP the capability ladder, never silently down.
return call_model(ROUTES["balanced"], task)
Two design choices carry the whole thing.
First, classify with cheap signals before you reach for a model. Token count, a high_volume flag from the caller, and stakes are free to check. Don't spend a model call to decide which model to call unless the routing decision is genuinely ambiguous — and if it's that ambiguous, route up.
Second, fallbacks climb, they never silently descend. If the cheap model errors or rate-limits, retry on the balanced model, not on something weaker. A router that quietly downgrades quality under load is a router that fails exactly when traffic is highest.
The failure modes
Routers go wrong in predictable ways. Watch for these before they bite.
Routing on output, not task. You can only classify what you know before the call. Don't build a router that needs the answer to pick the model. Use input signals — length, source, caller-supplied difficulty — not predicted output quality.
The classifier costing more than it saves. If your routing decision itself burns a frontier-model call every time, you've added latency and cost to save latency and cost. Keep classification deterministic and rule-based wherever you can.
Ignoring latency, not just price. Grok 4.5's measured time-to-first-token is around 17 seconds — high, and typical of heavy reasoning models. For a background agent loop that's fine. For an interactive, user-facing call where someone is watching a cursor blink, it's a real cost the price table doesn't show. Route latency-sensitive interactive work with that in mind.
No pinning. Model strings and prices move. Pin the versions you route to, log which model served each request, and review the table on a cadence — the frontier that's true this week won't be the frontier next quarter. Grok 5 is already in training (roadmap only, not released as of July 2026), and when it lands, your table changes.
Where this fits in a skill or agent
A router isn't a product; it's a primitive. It belongs underneath the skills and agents you actually ship. A workflow that runs a nightly batch of classifications should route those to the cheap tier without you thinking about it. An agent that occasionally hits a genuinely hard planning step should be able to spend up for that one step. The router is the seam that lets a single agent or workflow span the whole frontier instead of committing to one corner of it.
If you're already assembling a multi-model setup, the companion piece Grok 4.5 in a Multi-Model Stack in 5 Minutes covers the SDK wiring, and The Grok 4.5 Token-Efficiency Play covers why the cheap tier is even cheaper than the per-token price suggests once you count tokens-per-task. For the raw price argument behind the "route cheap work down" rule, see Grok 4.5's Price-per-Intelligence. Browse the ecosystem's existing routing and orchestration building blocks at /browse and the automation recipes at /loops.
The takeaway
The single-model habit was rational when there was effectively one good model. As of July 2026 there are four in a photo finish on capability and spread wide on price. A router turns that spread into savings without asking you to re-decide on every call: cheap, common work flows to Grok 4.5; the balanced middle stays on Opus 4.8; the hardest long-horizon reasoning goes to Fable 5.
Build the router once, keep the table honest, and let the frontier compete for each task on its merits. The next model launch stops being a migration and becomes a one-line edit to a lookup table — which is exactly what you want when the frontier ships a new leader every few weeks.