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

> ## Agent Instructions
> For agents: install the OpenWork desktop app with `brew install --cask openwork` (macOS) or from https://openworklabs.com/download. Do not run `npx openwork`; the npm package named `openwork` is a different project.
> Connect an agent to OpenWork with the MCP Gateway: `claude mcp add --transport http openwork https://api.openworklabs.com/mcp/agent`. Teams sign up at https://app.openworklabs.com?mode=sign-up.
> Step-by-step agent guide: https://openworklabs.com/docs/start-here/use-openwork-from-an-ai-agent.md
> Connect Slack (any organization admin): https://openworklabs.com/docs/slack/connect-slack.md. OpenWork in Slack (@openwork bot) is private alpha for approved organizations. Setup guide: https://openworklabs.com/docs/slack/overview.md. Agent skill: https://openworklabs.com/.well-known/agent-skills/set-up-openwork-slack/SKILL.md.

# Smart Model Router

> Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.

The Smart Model Router lets members choose a **Smart** model instead of a specific one. You create Smart Routers, each with a name, the people it applies to, and a few AI Gateway models tagged with the tasks they're good at. For every prompt, OpenWork sends it to the model whose tasks fit it best, and decides how much that model should think.

You set it up in OpenWork Cloud under **AI Gateway → AI Providers**, where Smart Routers are listed above your providers. Members don't configure anything: each Smart Router that applies to them appears at the top of their model picker as **Smart:** followed by the router's name, for example **Smart: Engineering**.

> [!NOTE]
>
> The Smart Model Router is rolling out on OpenWork Cloud. If you don't see **Add a Smart Router** under AI Providers, ask OpenWork to turn it on for your organization.

## Why use it

* **Lower cost without thinking about it.** Members no longer run every small question through the most expensive model.
* **Better answers on hard work.** Difficult prompts go to the model you tagged for that work, with more thinking, even when a member forgot to switch.
* **Different setups for different teams.** Engineering can route code review and debugging to one set of models while Support routes summaries and translations to another.
* **Same rules as any other model.** Smart Routers only use models already in your AI Gateway. Access, limits, usage counting and costs work exactly as if the member had picked the model themselves.

## Set it up

**1. Add the models to your AI Gateway**

A Smart Router can only use models that are already in your AI Gateway, in an active model group. If you haven't yet, [add a provider](https://openworklabs.com/docs/cloud/share-with-your-team/managed-llm-provider.md) and its models first.

**2. Add a Smart Router with its models and tasks**

Open **AI Gateway → AI Providers** and select **Add a Smart Router**, next to **Add a provider**. Give it a name; a router named Engineering appears to members as **Smart: Engineering**.

Choose a model, then add the tasks it should handle. Pick tasks your organization already uses from the list, or type a new one and press Enter. A task can be one word ("translation") or several ("debugging failing tests"), and the same task can be added to more than one model. Select **Add model** for each other model you want it to use.

Select **Continue**.

![The Add a Smart Router page with the name Engineering, Claude Haiku 5.5 and the tasks Debugging and Code review](https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?fit=max\&auto=format\&n=p1h7Mw3WSzzH2OZe\&q=85\&s=493e6e42f4559429ff21d51431014809)

Step one: name the router and give each model its tasks.

**3. Choose who can use it**

Choose who the router applies to: everyone in the organization, teams, or individual people. If some of them can't use one of its models, the model is marked; hover over the mark to see who. Those people's prompts go to the router's other models.

Select **Save**. Until you do, the router applies to nobody and shows **Give access** in the list.

![Step two with the Who can use it block and the router's model and tasks](https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?fit=max\&auto=format\&n=p1h7Mw3WSzzH2OZe\&q=85\&s=1e421173d16a6cfd6649ca8ae169e85e)

Step two: who can use it.

> [!TIP]
>
> Give each model a few specific tasks. "Quick questions", "short emails" for a fast model and "debugging", "architecture", "planning" for your strongest model route better than one vague task per model.

Smart Routers are listed at the top of AI Providers, like providers. Select **Manage** to change one's models, tasks or who can use it.

![AI Providers listing Smart: Engineering above the Acme AI Gateway provider, with Add a Smart Router next to Add a provider](https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?fit=max\&auto=format\&n=p1h7Mw3WSzzH2OZe\&q=85\&s=d8634a629af41123eee6b6585a9db81a)

Smart Routers are listed first under AI Providers.

## What members see

Members see one **Smart:** option (such as **Smart: Engineering**) at the top of the desktop model picker for every Smart Router that applies to them and that has at least one model they can use. Smart manages thinking itself.

![The desktop model picker with Smart: Engineering, Picks the best model for each task, at the top](https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?fit=max\&auto=format\&n=wRHxpK06ZLXDB2y-\&q=85\&s=479f7b51a58d8a5354809e8748af0dff)

Each Smart Router that applies to a member is at the top of their model picker.

Each reply shows which model answered it and at which thinking level, next to the reply's time.

![A chat reply labelled Claude Haiku 5.5 · High](https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?fit=max\&auto=format\&n=sDEZq1ewY6lvBha3\&q=85\&s=ff06714cd57600dc92c532d386a77c54)

Each Smart reply names the model and thinking level that answered it.

## How it works

The Smart Model Router runs inside the AI Gateway. Every Smart request still uses the member's own AI Gateway key, as described in [How requests flow](https://openworklabs.com/docs/ai-gateway/how-requests-flow.md).

```mermaid theme={null}
sequenceDiagram
  participant App as OpenWork desktop
  participant GW as AI Gateway
  participant Jev as Jev (routing model)
  participant P as Chosen model's provider
  App->>GW: Prompt, model "Smart: Engineering", member's AI Gateway key
  GW->>GW: Keep only the router's models this member can use
  GW->>Jev: Latest prompt + every task of those models
  Jev-->>GW: How well the prompt fits each task, and how much thinking it needs
  GW->>GW: Add up each model's task scores, pick the highest
  GW->>P: The same request, as if the member picked that model
  P-->>GW: Response
  GW-->>App: Response, plus which model and thinking level answered
```

1. **Only your models, only theirs.** The gateway starts from the Smart Router's models and drops any model the member doesn't have access to.
2. **Every task is scored.** At the start of each task the member gives the agent (when they send a message), the gateway asks [Jev](https://docs.typesafe.ai/primitives/score), a fast routing model from TypeSafe, to score how well the message fits each of the router's tasks, from 0 (unrelated) to 1 (clearly that task). Jev sees the member's latest message, a short excerpt of the conversation and your task names. It never sees model names, provider ids or keys. The decision usually takes well under a second.
3. **The best total wins.** Each model's tasks are added up, and the model with the highest total answers. A model with two good matches beats a model with one slightly better match. If totals tie, the model listed first answers.
4. **Thinking to match.** Jev also scores how much reasoning the message needs (none, light, moderate or deep), and the chosen model runs at the closest thinking level it supports.
5. **Consistent within a task.** The steps that follow while the agent works (tool results, follow-up calls) keep the same model and thinking level, so the model's context and prompt cache stay intact.
6. **Sent like a normal request.** The gateway forwards the request to the chosen provider exactly as if the member had picked that model: the same access checks, [limits](https://openworklabs.com/docs/ai-gateway/limits.md), [usage counting](https://openworklabs.com/docs/ai-gateway/counting-usage.md) and [costs](https://openworklabs.com/docs/ai-gateway/token-costs.md) apply, and the request log records the real model. Smart translates the request for the provider when needed, so Anthropic, OpenAI, Google Gemini, Amazon Bedrock, Azure OpenAI and OpenAI-compatible providers can all be mixed.
7. **A safe fallback.** If Jev can't answer in time, the first model in the router answers at its default thinking level.

## Tasks

Tasks are shared across your organization, so every Smart Router offers the same list to choose from. Names are matched without regard to capitals: "Code review" and "code review" are the same task. A task is removed from the list once no Smart Router uses it anymore.

## Remove a Smart Router

Open a Smart Router with **Manage** and select **Remove**. Its Smart model disappears from members' model pickers the next time their app syncs with your organization, and requests already using it stop routing.

## Self-hosted

The Smart Model Router is offered on OpenWork Cloud first. Where it is available on a self-hosted install, give the AI Gateway a TypeSafe API key through the Helm chart's `secret.values.typesafeApiKey` (or the `TYPESAFE_API_KEY` key in your existing Secret). Without a key, Smart is off: **Add a Smart Router** explains how to add the key, and members don't see Smart models. See the chart's README for details.


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