opencode executable with session-local configuration. Your OpenCode config files are left intact.
On first launch, setup opens an Accounts page where you can connect one or more ChatGPT subscriptions, connect an API key (Vercel AI Gateway, OpenRouter, or direct provider keys), or choose Dari managed billing. Later launches go straight to the agent; run dari accounts to open the page again. Without the Autorouting plan, OpenCode starts on your router’s first model and /models switches between them; run dari accounts and choose Get auto-routing to subscribe so Dari picks for you. In the model picker, each model shows what pays for it (a subscription, an API key, or Dari credits), preferring a subscription; press s to change it.
Every following argument is forwarded to OpenCode:
OPENCODE_CONFIG_CONTENT, replacing any value you set for that variable. It adds a Dari provider with the dari/routing model, a one-million-token context window, and image input, and pins OpenCode’s built-in agents (including Scout), subagents, and title, summary, and compaction tasks to dari/routing. OpenCode sends its session ID as the x-session-affinity header, so requests from one session group under the same conversation in Activity. Subagents appear in that conversation’s Subagents view, each with its own routing lease. The launcher’s plugin also labels title generation as Auxiliary and context compaction as Compaction, both served by the cheapest routable model. Dari chooses the model and reasoning level per request.
OpenCode normally connects to a shared background service, which would not see session-local configuration. Interactive, run, mini, api, models, and stats launches therefore add --standalone to start a private server. --server and pair are rejected because they use a server Dari cannot configure; run dari opencode serve to connect other clients. Management commands such as service, session, and auth run without Dari’s configuration, so OpenCode’s long-lived background service never picks it up. --help and --version skip sign-in and onboarding.
A launcher plugin shows the routing state in OpenCode’s prompt footer: the model that served the turn, its thinking level when one is enabled, how many turns remain on the current routing lease (or pinned when Session Pinning holds the model), and a link to the turn’s conversation in Activity. Routing values come from the X-Dari-Selected-Model, X-Dari-Thinking-Level, X-Dari-Lease-Turns-Remaining, and X-Dari-Session-Pinned response headers, and the link from X-Request-Id.
Set DARI_ROUTING_API_KEY before launching to use an existing Routing key instead of the CLI-managed key. Set DARI_OPENCODE_PATH when opencode is not on PATH.
Manual Configuration
If you do not want to use the launcher, create a Routing API key:~/.config/opencode/opencode.json:
"reasoning": false keeps OpenCode from sending a fixed reasoning level; Dari still chooses one per request. The routing status footer is available only through the launcher.
To use a different model set, edit the default router or Create A Router. To launch dari opencode on that router, add OpenCode to its card on the Routers page or run dari router assign-agent <router_id> opencode; the X on the card moves it back to the default router. With manual configuration instead, point baseURL at https://routing.dari.dev/{router_id}/v1 and set limit.context to the smallest window among its enabled models.
Setup Across Computers
The CLI loads your router configuration and subscription preferences from the server. A new computer reuses the existing models and thinking levels rather than applying launcher presets again. Subscription opt-outs are saved per organization, user, and launcher. Local files cache authentication and Routing keys, not setup completion. Use the dashboard ordari router update to change the shared model configuration. Run dari accounts to manage connected accounts, see each plan’s usage, or buy another.