Router Core is not yet published to a registry. Run from
dari-router-core/ in the Dari monorepo.Try The Example
1
Install and run
2
Make a real provider call
Create A Server
- OpenAI
- Anthropic
dari_routing and the X-Router-Selected-Model header. The incoming model is a caller-facing router name — it does not force the policy to pick that model.
Use From A Sibling Project
1
Build the package
2
Add the dependency
dist/. It requires Bun or Node.js 22.19+ and uses web-standard Request, Response, and AbortSignal. Bun can serve router.fetch directly; Node needs a Request/Response adapter.
Next Steps
Models
Declare candidates and eligibility.
Policies
Write routing policies.
Pi Runtime
Credentials for multiple providers.
Custom Executors
Integrate another SDK.
Protocols And Streaming
Request and streaming details.