A local policy
reasoningEffort to use the candidate’s default. The TypeScript field is reasoningEffort; wire JSON uses reasoning_effort.
Inspect or serve a selection
router.evaluatePolicy(request) is stateless: it runs the policy without reading or writing leases and without firing hooks. Use it for previews, logs, or tests.
router.select(request) is the authoritative serving primitive. It reads an existing lease, applies a new lease returned by the policy, and fires onSelection. router.fetch() uses the same semantics.
Self-hosted selector policy
The advancedcreateDariRoutingPolicy uses a selector model (an LLM that answers routing questions) and the deterministic policy engine to assemble evidence, ask the selector, and validate its answer. It is public from /policy-engine because it is more opinionated than the core policy interface.
runtime: pi is valid here: it configures the selector used by createDariRoutingPolicy. It is not a createRouter option.
For self-hosted createDariRoutingPolicy, provide your own pricing and observed output-token averages. Router Core does not ship or infer them. Cache state and model metadata remain optional; unknown cache state means the engine makes no cache-savings claim.
Custom rules
RoutingPolicy directly; for full preparation/finalization control, use the advanced policy engine.