Models from Pi
pi.model() reads the Pi model catalog and supplies provider, API, reasoning, and capability metadata:
provider/model-id name. See Pi Runtime for credentials and execution.
Custom declarations
For a model outside Pi’s catalog, declare the metadata your policy and executor need: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.