Skip to content
Jev

Use Cases / llm-routing

Jev Model Routing

Sending every request to the frontier model is wasteful. Hand rules miss nuance; another LLM router adds latency and cost.

Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.

Why Jev

A cheap typed complexity/choice decision can pick the model tier before the expensive call — Jev’s intended lane. Your gateway then calls the chosen provider; Jev never proxies the generative call.

When to use Jev

  • Multi-model gateways
  • Cost-aware agent planners
  • Simple vs complex ticket splitters

When not to use Jev

  • Training your own router from scratch when you need custom ML
  • Tasks that always need the frontier model
  • Non-text modalities without a text state

Sample input and output

From the live tool template. Run it in the playground for a real API response — sample labels below are illustrative until you click Run.

Input

prompt: Summarize this 2-sentence email in one line.

models: fast-mini, balanced, frontier

Sample display fields

  • recommended_tier: fast · 80%
  • complexity: simple · 78%

Failure modes and human fallback

  • Upstream or network errors: retry with backoff; do not invent a decision.
  • Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
  • Schema drift: keep a golden fixture set in CI so label changes fail the build before production.

API example

Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.

curl
curl https://jevtypesafe.org/api/v1/decide \
  -H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"state":"Model routing\nPrompt:\nSummarize this 2-sentence email in one line.\nCandidates: fast-mini, balanced, frontier","questions":{"recommended_tier":{"type":"choice","instructions":"Which model tier should handle this prompt?","criteria":{"fast":"short / simple — cheapest tier","balanced":"typical reasoning","frontier":"hard reasoning or long context"}},"complexity":{"type":"choice","instructions":"How complex is the prompt?","criteria":{"simple":"trivial","moderate":"standard","hard":"difficult"}}}}'

FAQ

Does this call OpenAI for me?
No. Jev only returns the routing decision. Your gateway then invokes the chosen provider.
What if routing confidence is low?
Default to a safer (usually more capable) tier or ask a human when the decision is high-stakes. Log route + confidence for offline tuning.

Related use cases

Ready to build?

Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.