Model router
Send each prompt to the cheapest model that can handle it.
Classifies difficulty, tool use, output length and stakes in one call, then routes: small model for lookups and rewrites, mid-size for everyday work, frontier for hard or sensitive tasks, reasoning for research-grade problems. Most traffic is easy; stop paying frontier prices for it.
Try it live
Real calls to Jev. Pick an example or paste your own.
Pick an example or paste your own input, then run it.
Under the hood
Every question and rule, in the open. Fork it to change any of them.
What it asks
Reads prompt, then asks 4 questions in one call.
- Q1DifficultyPick one
How hard is the
promptfor a language model to answer well?TrivialStandardHardExpert - Q2Needs toolsYes / no
Does answering the
promptrequire live data, browsing, running code or calling tools? - Q3Long outputYes / no
Does the
promptask for a long output (a full document, many files, or a detailed report)? - Q4High stakesYes / no
Does the
promptinvolve medical, legal, financial or safety-critical decisions?
How it decides
Rules run in code, top to bottom. The first one that matches gives the verdict.
- 1If Difficulty is ExpertReasoning model
- 2If High stakes ≥ 0.7Frontier model
- 3If Difficulty is HardFrontier model
- 4If Difficulty: confidence < 0.45Mid-size model
- 5If Difficulty is Trivial and Needs tools < 0.5Small model
- ·DefaultMid-size model
Call it from your code
Every template runs as-is with an API key, no setup: POST /api/v1/judges/model-router/run.
curl -X POST https://tryevally.com/api/v1/judges/model-router/run \ -H "Authorization: Bearer $EVALLY_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "input": { "prompt": "Make this sentence sound friendlier: '\''Your request has been denied.'\''" }}'Seen in the wild
Community builds on Jev that use this pattern. Not affiliated with Evally.
More in Agents
- Agents
Tool-call firewall
Judge every agent tool call before it touches your machine: allow, ask a human, or deny.
AllowAsk a humanDeny10 questions - Agents
Is the task done?
Don't trust an agent's "done". Check the transcript for proof, open errors and skipped work.
DoneDone, but unprovenNot done5 questions - Agents
Agent loop & drift detector
Spot an agent that's stuck in a loop, drifting off-goal, or blocked, and stop wasting tokens.
ContinueNudge: change approachStop and escalate4 questions - Agents
Tool router
Pick the right tool for a request without an LLM tool-calling round trip.
Ask to clarifyConfirm firstWeb search+62 questions - Agents
Context relevance filter
Decide what an agent keeps in context: keep, compress or drop each chunk.
KeepCompressDrop3 questions - Agents
Memory gate
Decide which messages in an agent's chat are worth remembering next session, and which change what it already knows.
Save itReplace a lineSkip4 questions