Skip to main content
Install the Dari CLI, then launch Pi through your organization’s default router:
On first use, Dari signs you in if needed, creates and privately caches a Routing key, and starts the installed pi executable with an invocation-local Dari provider extension. Your existing Pi configuration is left intact. Every following argument is forwarded to Pi:
Pi sends Chat Completions requests through your organization’s default router at /v1. The launcher configures a one-million-token context window and session-affinity headers, which keep long sessions from compacting too early and group all requests from one session under the same conversation in Activity. Dari chooses the model and reasoning level per request. The launcher’s extension also shows the routing state in Pi’s footer after each response: the model that served the turn, its thinking level when one is enabled, and how many turns remain on the current routing lease. The values come from the X-Dari-Selected-Model, X-Dari-Thinking-Level, and X-Dari-Lease-Turns-Remaining response headers, which every router response includes; the lease header is present only while a lease is active. Set DARI_ROUTING_API_KEY before launching to use an existing Routing key instead of the CLI-managed key.

Manual Configuration

If you do not want to use the launcher, create a Routing API key:
Add this provider to ~/.pi/agent/models.json:
"reasoning": false keeps Pi from sending a fixed reasoning level; Dari still chooses one per request. "contextWindow": 1000000 matches the window shared by every model in the default router. "sendSessionAffinityHeaders": true gives Dari a stable session identifier even after compaction rewrites message history. To use a different model set, edit the default router or Create A Router with public or Custom Models. For a specific router, use manual configuration, point baseUrl at https://routing.dari.dev/{router_id}/v1, and set contextWindow to the smallest window among its enabled models. Query its reported value with: