Skip to main content
The Jev Router (typesafe/jev-router) selects a model and reasoning effort for each request. Jev, TypeSafe’s decision model, assesses the task, its difficulty, and the potential benefit of a stronger model. The routing policy balances those signals against estimated cost and your preferences. Use it as a model, or add the jev-router plugin to choose a cost tier and set model preferences. Jev makes the routing decision; the selected model generates the response.

How it works

  1. Assess the request. Jev evaluates the conversation to identify what the task needs.
  2. Select a model and effort. The router applies the selected cost policy, available model capabilities, and your model and provider restrictions.
  3. Adapt across turns. During supported agentic workflows, the router can retain a model, adjust its effort, or switch models as the task progresses. When the policy permits it, an expert advisor can assist the model doing the work.
The available models and routing policies can change over time. A cost tier is a routing preference, not a fixed model, guaranteed score, or per-request price cap.

Usage

Set model to typesafe/jev-router. No plugin is required:
cURL
The response model field reports the model that served the request. The router works with Chat Completions, Responses, and Messages, streaming and non-streaming.

Plugin parameters

The plugin is optional. Add it to configure routing for a request: All fields except id are optional. Unknown fields and invalid values return 400; for example, allowed_model is not accepted as an alias.

Cost tiers

cost_tier selects the routing policy, not the model’s reasoning effort: Set cost_tier to choose a policy for your request. Your model and provider restrictions still apply. If you omit cost_tier, Jev uses its default routing policy. To explicitly choose the medium policy, set cost_tier: "medium". An unrecognized tier name returns 400. Changing cost tiers can change the selected model, even within the same conversation.

Reasoning effort

The router normally chooses reasoning effort. You can supply the standard top-level reasoning.effort field as a hint, independently of cost_tier:
The legacy top-level reasoning_effort field is also accepted. The router can select a different effort or adapt it across turns, so a hint is not a guarantee of the setting sent to the final model. reasoning.max_tokens and reasoning.mode: "pro" are not supported and return 400. See Reasoning tokens for the standard reasoning fields.

Model preferences

Combine a cost tier with include and exclude preferences when needed:
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-latest alias, such as ~openai/gpt-luna-latest, which matches every revision of that family.
Each list takes up to 1,024 patterns, with at most 1,024 characters per pattern and 65,536 characters total per list.

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, and excluded_models still applies. This keeps requests working when an entry is misspelled or names a model outside the pool. The pipeline stage reports list_fallback: "models_ignored".
  • Exclusions are never ignored. If excluded_models removes every pool model, the request fails with 404 instead of routing to an excluded model.
  • The lists can lower the capability tier. When a hard request needs stronger models than the lists leave, the router can lower its capability requirement. The stage reports this as list_tier_cap; it is not the low/medium/high cost tier.
  • 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 uses an eligible model without an advisor, and the stage reports max_fallback: "deep".
If no eligible model remains in the pool, the request fails with 404. The error names the fields you sent, such as widen allowed_models or remove excluded_models.

Seeing what the router did

The response’s model field identifies the model that served the request. Send X-OpenRouter-Metadata: enabled for more detail in router metadata. The jev-router entry in openrouter_metadata.pipeline includes:
cURL

Availability and errors

Jev Router is available only in the global data region and is not supported for HIPAA workspaces. Access to the router and the selected models is still required. Do not combine typesafe/jev-router with another router model in the same request.
  • Jev: the decision model behind the router
  • Auto Router: a separate router with its own cost-tier behavior
  • Router metadata: the openrouter_metadata response field