~/.pi/agent/models.json:
/v1. It chooses from the router’s current managed model set. Check Activity in the dashboard to see each selection.
Configuration Reference
"reasoning": false keeps Pi from sending a fixed reasoning level; Dari still chooses the model’s reasoning level for each request.
"contextWindow": 1000000 matches the window shared by every model in the default router. Set this explicitly. Pi assumes 128000 for custom models, and it compacts once a conversation passes the context window minus a 16K reserve — so leaving it unset makes Pi summarize and discard history at roughly 112K tokens, even though the router can accept far more. Compaction loses detail and costs an extra model call, so an unnecessarily low value degrades long sessions.
"sendSessionAffinityHeaders": true makes Pi send a stable session identifier with every request. Dari uses it to keep all turns from one session under the same conversation on the Activity tab, including turns that arrive after compaction rewrites the message history. Without it, each request appears as its own conversation.
Custom Routers
To use a different model set, edit the default router or Create A Router with public or Custom Models. Set that router as the default to keep this same configuration, or pointbaseUrl at https://routing.dari.dev/{router_id}/v1.
A router accepts only as much context as its smallest model, so set contextWindow to the smallest window among the models you enable. Claude Haiku 4.5 accepts 200K, for example, and enabling it caps that router at 200000 no matter what the other models support. Query your router to read the value it reports:
context_window field in the response is the value to copy into models.json.