Original fictional teaching example. No model result is prefilled.
An editable starting point
- 1 · Text to check
- Prompt: Our Q3 invoice export is off by one day for customers in UTC+13. Find the bug in the date-handling module and propose a fix with tests.
- 2 · Your question
- Which handler should receive this prompt?
- 3 · Define 2–6 options
- Fixed code path
A lookup or a rule answers it; no language model is needed.
- Small, fast model
A short, routine answer with no multi-step reasoning.
- Reasoning model
Multi-step analysis, code changes or careful trade-offs.
- A person
Needs authority, private context or a judgment the system must not make.
- Fixed code path
These are model probabilities, not measured accuracy or a guarantee. Yes and No describe your rules; choices are relative to the options you supplied.
Can Jev choose which model handles a prompt?
Yes. TypeSafe lists model routing among its example use cases: a custom router that chooses which language model receives each prompt. Its intent-routing pattern shows the shape. One Choice question classifies the incoming request, and ordinary code sends each class to a handler: a database lookup, a specialist model or a human agent.
Jev does not write the reply. It makes the small decision in front of the expensive one, so that a routine prompt does not occupy a reasoning model and a hard one does not reach a model that cannot solve it.
Open the editable routing template. It contains one fictional engineering prompt and four handlers. Loading it creates a draft; a check starts only when you request it.
Describe handlers by what they are for
Model names change; responsibilities last longer. The template describes each destination by the work it suits, and your code maps the label to whatever model currently fills that role.
| Handler | Send a prompt here when |
|---|---|
| Fixed code path | A lookup or a rule answers it; no language model is needed. |
| Small, fast model | The answer is short and routine, with no multi-step reasoning. |
| Reasoning model | It needs multi-step analysis, code changes or careful trade-offs. |
| A person | It needs authority, private context or a judgment the system must not make. |
Change one thing and compare
- Run the template and note the selected handler and the other probabilities.
- Replace the prompt with “What are your support hours?” and run it again.
- Try “Cancel my contract and refund this year’s fees.” Decide beforehand whether your policy lets software act on it.
No expected answer is prefilled, and a few runs do not measure routing quality. To evaluate a router, label a few hundred real prompts with the handler you would have chosen and compare, including what each mistake costs.
Use confidence as the fallback
In TypeSafe’s intent-routing example, the code checks confidence before it looks at the label: below a floor, the request goes to a person whatever the selected class. The confidence-gated routing pattern adds that the floor should follow the stakes, low for a harmless action and much higher for one that moves money. Pick your numbers from your own labelled prompts; the documented values illustrate the pattern and are not recommendations. Probability versus confidence explains the two signals.
What about trimming context?
A related idea asks a yes/no question per earlier message, such as “is this still needed?”, and drops the rest. Be careful. One community author reported on 18 September 2026 that a naive relevance filter gave no gain at best on a long-memory benchmark and a large drop at worst. That is a single author-reported experiment with one filtering method, but it is a useful warning: a dropped message cannot be recovered downstream. Measure answer quality with and without the filter before relying on it.
Routing mistakes are quiet, because a weaker model still produces fluent text. Log every decision, review a sample, and see where Jev’s limits are.
Sources & further reading
Official documentation and linked community reports support this guide. Community observations are attributed to their authors.
How we check our sources