> ## Documentation Index
> Fetch the complete documentation index at: https://claritylabs.inc/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# CL Router Policy: Shared Model-Routing Vocabulary

> CL Router Policy ships the task vocabulary, reviewed default routes, capability metadata, and price manifest shared by every cl-router client.

CL Router Policy (`@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.

<Note>
  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.
</Note>

## Key features

<CardGroup cols={2}>
  <Card title="Task vocabulary" icon="tags" href="/docs/cl-router/tasks-and-routes">
    `MODEL_TASKS`, known SDK task kinds, and helpers that resolve a specific call to its route vocabulary.
  </Card>

  <Card title="Reviewed default routes" icon="route" href="/docs/cl-router/tasks-and-routes">
    `MODEL_TASK_ROUTES` maps every task to a reviewed provider and model, plus special fallback and quality routes.
  </Card>

  <Card title="Routing safety" icon="shield-check" href="/docs/cl-router/routing-safety">
    Static challenger sets, required cross-provider fallbacks, and the human-rating promotion defaults.
  </Card>

  <Card title="Capabilities and prices" icon="calculator" href="/docs/cl-router/capabilities-and-prices">
    Token limits, image and audio support checks, and a versioned nano-USD price manifest.
  </Card>
</CardGroup>

## 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.

```bash theme={"system"}
npm install @claritylabs/cl-router-policy
```

## Quick example

```typescript theme={"system"}
import {
  MODEL_TASK_ROUTES,
  findCrossProviderFallback,
  modelTaskForCall,
  recommendedChallengerRoutes,
  requiresCrossProviderFallback,
  safetyFallbackRoutes,
  taskFamilyForCall,
} from "@claritylabs/cl-router-policy";

const task = modelTaskForCall("extraction", "extraction_classify");
const family = taskFamilyForCall("extraction", "extraction_classify");
const initialRoute = MODEL_TASK_ROUTES[task];
const candidateRoutes = safetyFallbackRoutes(family);
const fallback = requiresCrossProviderFallback(family)
  ? findCrossProviderFallback(initialRoute, candidateRoutes)
  : undefined;
const challengers = recommendedChallengerRoutes(family);
```

## Next steps

<CardGroup cols={2}>
  <Card title="Tasks and routes" icon="route" href="/docs/cl-router/tasks-and-routes">
    Learn the task vocabulary and how calls resolve to default routes.
  </Card>

  <Card title="Routing safety" icon="shield-check" href="/docs/cl-router/routing-safety">
    Understand challengers, fallbacks, and rating-based promotion defaults.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.