Most of what a coding agent does is routine. Small edits, quick file lookups, short questions, a bit of boilerplate. None of that needs your most expensive model, yet by default it all runs on whatever model the tool reaches for, and that choice drives your bill. Smart model routing fixes this in one move: it serves the cheapest capable model for each request, so the easy work runs on a lighter model and your top model is saved for the hard parts. You pay top rates only when the work actually needs it.
This post explains what smart routing is, how it saves money, and how to turn it on without touching a single dial. For the visual version, see the smart model routing page.
Why coding agents overpay
Claude Code, Codex, and OpenCode pick a model on their own, and they tend to lean on a strong default. That is fine for a hard problem. It is wasteful for the dozens of routine requests that fill a normal working session. The price gap between models is not small either. In our own test, the same coding task ranged about 12 times in cost depending on the model, from a couple of dimes to over three dollars for the identical prompt. We wrote that up in cheapest models for Claude Code and Codex.
So the waste is structural. If routine work rides on a premium model, you are paying premium prices for jobs a cheaper model would have handled just as well. The fix is not to ban the strong model. It is to use it only when it earns its cost.
What smart model routing does
Smart routing puts the model choice back where you can control it. You allow a set of models on a policy, from a strong flagship down to lighter, cheaper options, and you leave the forced model off. From then on, for every request, Clawgate sizes up how demanding it is — a quick file lookup versus a tricky bug fix — and serves the best allowed model for that level of work.
The result is simple to describe:
- Routine requests run on a lighter, cheaper model.
- Hard requests still get your strongest allowed model.
- You never pick manually. It happens per request, automatically, with nothing to tune.
This is different from the model controls you may already use. A forced model pins every request to one model. An allowed list whitelists what a key may use and substitutes the best allowed model when a request asks for something you do not permit. Smart routing goes one step further: within the models you allow, it makes a fresh, difficulty-aware choice on every single request instead of always reaching for the strongest one. Sizing up a request uses a small, fast model call, which is passed through at cost — never marked up — and shows on your dashboard as its own line, so you always see exactly what routing costs against what it saves.
How it saves money
The saving comes from the price spread between models and the fact that so much agent traffic is routine. When a lighter model costs a fraction of a flagship model, moving the easy work onto it removes a large slice of your bill that was pure waste. Your hard requests are untouched, so quality holds where it matters.
A few things make the effect bigger:
- The more routine traffic you have, the more you save. Teams doing lots of small edits and lookups have the most to gain.
- It stacks with your other controls. Routing lowers the per-request rate, while hard-stop budgets cap the total and opt-in prompt compression cuts the token count itself, up to 92 percent on heavy workloads. Together they compound.
- No accuracy tax. Because routing weighs accuracy alongside cost and only picks from models you approve, you are never forced to downgrade work that needs full power.
This is the same idea that let Clawgate cut our own AI bill by 70 percent before it was ever a product. Smarter model choice was a big part of it, alongside compression. The full story is in how we cut 70 percent of our AI costs.
How to turn it on
Smart routing is a single switch per policy. There is nothing to configure beyond that.
- Allow the models you want in play. Include a strong model for the hard work and one or more lighter models for everything else.
- Leave the forced model off. Routing and a forced model are mutually exclusive, so turning routing on frees the choice.
- Flip the switch. Clawgate auto-balances accuracy and cost from there. No weights, no formulas.
Nothing changes for your developers. Claude Code, Codex, and OpenCode keep working exactly as before. The savings happen quietly behind the gateway, and every run is still tracked so you can see the effect. You can track Claude Code usage per developer and per project the same way.
One lever among several
We built Clawgate because no single existing tool did all three things a team actually needs. It does not just meter your spend. It sets hard-stop budgets per user and per project so a bill can never run away, it cuts token usage with prompt compression, and it flags abuse and impersonation by checking that a request's content matches the project it claims. Smart routing is one more lever in the same dashboard, behind the same key: serve the right model, pay the right price.
Frequently asked questions
What is smart model routing?
Smart model routing lets the gateway choose which model runs each request instead of the coding tool. When a policy allows several models and none is forced, Clawgate sizes up how demanding each request is and serves the best allowed model for it. Routine requests go to a lighter, cheaper model and hard requests still get your strongest model.
How does routing save money?
A lot of coding-agent traffic is routine: small edits, quick lookups, short answers. Those requests do not need your most expensive model. In our own test the same task ranged about 12 times in price across models, so sending routine work to a cheaper capable model instead of a premium one removes a large slice of waste. You keep paying top rates only when the work actually needs it.
Will smart routing hurt answer quality?
No. Routing only ever picks from the models you allow, and it weighs accuracy alongside cost. Hard requests still get your strongest model, so you are never forced to downgrade work that needs full power. If you do not want a model used at all, leave it off the allowed list.
Do I have to configure weights or rules?
No. Smart routing is a single switch per policy. There are no weights to set and no formulas to learn. Clawgate auto-balances accuracy and cost for you on every request. You choose which models the team may use, and routing does the rest.
Written by Chathuranga K, an engineer at Virstack.
Serve the right model. Pay the right price.
Turn on smart routing, keep control of which models your team may use, and stop overpaying for routine work. See the full picture on the smart model routing page.