@claritylabs/cl-router-policy) is a pure, zero-runtime-dependency TypeScript package that encodes the routing vocabulary of cl-router, the task-aware inference proxy from Tools for Enlightenment. It exports task and provider identifiers, reviewed default model routes, capability metadata, human-rating defaults, static challenger and fallback helpers, and a versioned price manifest for cost attribution.
The package contains data and pure functions only. It does not execute model calls, read environment variables, persist state, or contain tenant configuration. Live routing state and telemetry belong to the cl-router service itself, which is a private deployment.
Only
@claritylabs/cl-router-policy is published to npm. The cl-router server and Convex runtime packages are private. Use this package when you build a cl-router client and need to agree with the router on tasks, routes, and prices.Key features
Task vocabulary
MODEL_TASKS, known SDK task kinds, and helpers that resolve a specific call to its route vocabulary.Reviewed default routes
MODEL_TASK_ROUTES maps every task to a reviewed provider and model, plus special fallback and quality routes.Routing safety
Static challenger sets, required cross-provider fallbacks, and the human-rating promotion defaults.
Capabilities and prices
Token limits, image and audio support checks, and a versioned nano-USD price manifest.
When to use it
Use this package when your code needs to stay in lockstep with cl-router without calling it:- Resolve which task vocabulary a specific SDK call maps to before sending it to the router.
- Seed static candidate routes, challengers, and cross-provider fallbacks in a client-side snapshot.
- Attribute costs with the same reviewed price manifest the router uses.
- Check whether a model route supports a task, image input, or audio input.
Install
Node.js 24 or newer is required.Quick example
Next steps
Tasks and routes
Learn the task vocabulary and how calls resolve to default routes.
Routing safety
Understand challengers, fallbacks, and rating-based promotion defaults.