Product
AI model routing, explained: how JEV and Laya pick the right model for every request
A one-line fix and a twenty-page report should not cost the same. What model routing is, the rules that keep it from making answers worse, and how the two routers in GroutApp and GroutCode differ.
Anish Menon · CEO & Founder, Grout
· 7 min read
Most people choose one AI model and send everything to it. Pick a strong model and every "thanks", every quick lookup and every one-line rewrite is billed at strong-model prices. Pick a cheap one and the hard questions get weak answers. Students and schools on a budget feel both.
Model routing makes that choice per request instead of once. GroutApp and GroutCode now ship two routers for it, JEV and Laya. This post explains what routing does, the rules that keep it safe, and when to choose which router.
Fair warning: Grout makes GroutApp and GroutCode. This is a product post, written to show exactly what the feature does and does not do.
What model routing is
A router sits between you and the model. It reads the request, judges how hard it is, and runs the cheapest model that can do it well. "What is the capital of France?" goes to a light model, which answers it as well as any. "Prove there are infinitely many primes and generalise the argument" goes to a strong one.
The models it chooses between form a short ladder, built from the models you can actually use, cheapest first: a light rung, your usual model in the middle, and a strong rung at the top. The router's job is to put each request on the lowest rung that will get it right the first time.
The rules that keep routing from making answers worse
Saving Merits is only worth it if answers stay as good. Both routers sit behind the same rules:
- Unsure means no downgrade. If the router is not confident, it never moves you to a cheaper model; at most it moves you one step up.
- Long conversations keep their model. Switching models re-sends the whole conversation, so once a chat is long the saving disappears.
- Your pick stands. Choose a model by hand for a message and it runs, untouched.
- It fails open. If routing fails, is slow, or the routed request is turned down, the model you selected runs. Nothing waits on the router.
- Some things are never routed: local AI, voice, and image generation stay on the model chosen for them.
JEV: routing on Grout Cloud, with nothing to set up
On Grout Cloud, JEV sits inside the AI service. It reads the request, picks the cheapest model that clears the bar, and you pay in Merits for the model it picked, exactly as if you had chosen it yourself. There is no key to paste and nothing to install.
You can steer it. The leaning setting moves it toward saving Merits or toward quality, and two lists name models to prefer and models it must never use. If you have your own JEV key, the decision is made from your computer instead, and the request runs on the model JEV names.
Laya: routing on your own computer
Laya is an open decision model that runs on your own computer. You download it once, about 1.7 GB, and every piece is checked against its fingerprint before it is used. After that, it reads only your message and answers one question: how hard is this, from trivial to hard. On a recent laptop that takes about a fifth of a second.
The answer becomes a light, balanced or strong model from your ladder. Your leaning moves the lines: Save Merits keeps more requests on light models, Best quality sends more of them to strong ones. Nothing is sent anywhere to decide, and deciding costs no Merits and needs no key.
Laya is honest about its limits. The current model is the English one, so a message mostly in another script keeps your selected model. So does any request that arrives while Laya is still loading, or when it cannot decide in time on a slower computer. A speed test in the settings tells you how it does on yours.
Routing on your own provider key
Many students and teachers bring their own OpenAI, Anthropic or Google key. Laya, and JEV with your own JEV key, route those requests too: they choose among your provider's current models, the newest of each family, so an Anthropic key routes between the current Haiku, Sonnet and Opus rather than an old model that happens to be cheap.
There is one more rule here, because your provider bills you directly: routing never picks a model that costs more than the one you selected. It can only save. JEV on Grout Cloud is the service's own router, so it does not run on someone else's key.
JEV or Laya: which to choose
- Choose JEV on Grout Cloud if you want zero setup and work in any language.
- Choose Laya if you want the decision on your own computer, free, and mostly write in English.
- Choose either if you use your own provider key, except JEV on Grout Cloud.
- Only one runs at a time. Turning one on turns the other off.
Turning it on
- Open Model routing. In GroutApp, open AI settings and choose Model routing. In GroutCode, open Settings → Model routing.
- Pick a router. JEV on Grout Cloud, JEV with your JEV key, or Laya. For Laya, the model downloads once.
- Set a leaning and the features. Choose how hard to save, and switch routing on or off for each AI feature.
- Work as usual. A JEV or LAYA chip next to the model picker shows where routing is on. Routing results lists every decision, why it was made and what it cost against your selected model.
What it does not do
Routing does not make a weak model strong; it decides which model to use. It does not route local AI, where nothing is billed and switching models means loading gigabytes into memory. And it never overrides a model you pick by hand. If you want one model for a whole session, pick it, or switch routing off for that feature.
Frequently asked questions
Does model routing cost extra?
No. On Grout Cloud you pay in Merits for the model JEV picks. Laya's decision itself is free. The aim is to spend fewer Merits on requests a cheaper model handles just as well.
Can routing make an answer worse?
It is built not to: no downgrade when unsure, no switch in a long conversation, your hand-picked model always stands, and your selected model runs whenever routing is slow or unavailable.
Is Laya private?
Yes. Laya runs on your computer and reads only your message to decide; nothing is sent anywhere to make the decision. The answer itself then comes from whichever model runs.
Does it work in GroutCode?
Yes. GroutCode has the same two routers under Settings → Model routing, for the agent (with Plan and Debug), Ask, Team and bots.