Declaring models
The simplest declaration names the model and the executor that serves it: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: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 areoff, minimal, low, medium, high, xhigh, and max; executors map them to provider-specific controls.