Skip to main content
A model declaration is a candidate, not necessarily the model that will serve a request. Before calling your policy, the router filters out candidates that cannot satisfy the request.

Declaring models

The simplest declaration names the model and the executor that serves it:
The executor name must match a key in createRouter({ executors }). See Custom Executors for the executor contract.

Metadata

When a policy or executor needs more than the ID, declare the metadata it uses:
The satisfies RouterModel annotation preserves the literal reasoning-level types in standalone declarations. Inline declarations are contextually typed. The executor name selects the implementation in createRouter({ executors }). If a model omits executor, createRouter uses its default executor option. A model without either is a configuration error. Named executors take precedence over the default. When omitted, provider defaults from the ID prefix, api defaults from the executor name, reasoning defaults to off, and capabilities default to false. Set metadata explicitly when those defaults are not true for your transport.

Eligibility

The policy sees only candidates that support the request. Filtering covers image input, tools and tool history, structured output, streaming, and explicit reasoning effort. If no candidate remains, the request fails before the policy runs. A policy cannot select an ineligible candidate. A request without a reasoning constraint may select any effort exposed by a candidate. A request with one is a hard constraint. Framework reasoning levels are off, minimal, low, medium, high, xhigh, and max; executors map them to provider-specific controls.