typesafe/jev-router) picks a model and reasoning effort for each request. Jev, TypeSafe’s decision model, reads the conversation and judges the task type, difficulty, and how much a stronger model would help. The router then chooses the cheapest candidate that meets that bar from a curated pool of models.
Usage
Setmodel to typesafe/jev-router. No plugin is required:
cURL
model field reports the model that served the request. The router works with Chat Completions, Responses, and Messages, streaming and non-streaming.
Restricting the candidate models
Pass thejev-router plugin to narrow the pool Jev chooses from:
Each entry can be:
- An exact model slug, such as
openai/gpt-6-luna. It matches every dated revision of that slug. - A dated revision, such as
openai/gpt-6-luna-20260922, which matches only that revision. - A wildcard pattern, such as
anthropic/*or*flash*. Matching is case-sensitive. - A
~author/family-latestalias, such as~openai/gpt-luna-latest, which matches every revision of that family.
400, so a misspelled field such as allowed_model fails instead of being ignored.
How the lists apply
The lists only narrow the router’s pool. They do not add models, and they do not change how Jev ranks the candidates that remain.- An include list that matches nothing is ignored. If no pool model matches
models, the router uses the whole pool, andexcluded_modelsstill applies. This keeps requests working when an entry is misspelled or names a model outside the pool. The pipeline stage reportslist_fallback: "models_ignored". - Exclusions are never ignored. If
excluded_modelsremoves every pool model, the request fails with404instead of routing to an excluded model. - The lists can lower the tier. When a hard request needs a stronger tier than the remaining models offer, the router uses the strongest tier the lists leave. The stage reports that tier as
list_tier_cap. - The lists can remove the advisor. For the hardest requests, the router can pair the chosen model with an expert advisor. If your lists remove every advisor, the router answers with a deep-tier model and no advisor, and the stage reports
max_fallback: "deep".
404. The error names the fields you sent, such as widen allowed_models or remove excluded_models.
Seeing what the router did
SendX-OpenRouter-Metadata: enabled to get router metadata on the response. The jev-router entry in openrouter_metadata.pipeline includes:
cURL
Related
- Jev: the decision model behind the router
- Auto Router: classifier-based routing with
allowed_models - Router metadata: the
openrouter_metadataresponse field