> ## 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
> OpenWork in Slack 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.

# Auto Model Routing

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

Auto Model Routing lets members choose **Auto** instead of a specific model. For every prompt, OpenWork picks one of the models you listed, based on what the prompt asks for. Each model runs at the thinking level you chose for it. Quick questions go to a fast, inexpensive model. Hard coding, planning or debugging goes to your strongest model with more thinking. Anything else goes to your default model.

You set it up once for the organization in OpenWork Cloud under **AI Gateway → Auto Router**. Members don't configure anything: Auto appears at the top of their model picker.

> [!NOTE]
>
> Auto Model Routing is rolling out on OpenWork Cloud. If you don't see the **Auto Router** tab, 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 get your strongest model and more thinking, even when a member forgot to switch.
* **One choice for members.** People who don't know the difference between models pick Auto and get a sensible model each time.
* **Same rules as any other model.** Auto only uses 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**

Auto 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. Turn on the Auto Router and choose a default model**

Open **AI Gateway → Auto Router**, the tab right after AI Providers, and select **Turn on**.

![The Auto Router tab with its Turn on button](https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-off.png?fit=max\&auto=format\&n=sDEZq1ewY6lvBha3\&q=85\&s=c6ce8998e555822a4a348e20d621b9f5)

Before it is turned on, the Auto Router tab explains what it does.

You start by choosing the **default model**. Auto uses it whenever no other model's description matches the prompt, and whenever it can't decide. Its description is fixed: "Use this model when no other prompts and models match the input".

* **Model**: choose one of your AI Gateway models.
* **Thinking**: choose the one thinking level this model always runs at. Only the levels the model supports are shown. **Default** uses the model's own setting.

Select **Turn on**.

![The default model editor with the fixed Use when text, Claude Haiku 5.5 selected and High thinking](https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-editor.png?fit=max\&auto=format\&n=sDEZq1ewY6lvBha3\&q=85\&s=34c7adab7d26e6e484d2465995502f70)

The default model has a fixed description; you choose the model and its thinking level.

**3. Add more models and describe when to use them**

Select **Add model** for each other model you want Auto to use:

* **Use when**: describe, in plain words, the prompts this model should get. For example "Everyday questions, small edits and short answers", or "Hard coding tasks, architecture, debugging complex failures".
* **Model**: choose one of your AI Gateway models.
* **Thinking**: choose the thinking level this model runs at.

Select **Save route**. Two or three routes with clearly different descriptions usually work best: a fast model for everyday work, a strong model for hard work, and optionally a model for a specialty such as reading images or long documents.

![The Auto Router tab listing the default model and a second route for quick questions, each with its model and thinking level](https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-routes.png?fit=max\&auto=format\&n=sDEZq1ewY6lvBha3\&q=85\&s=3c48114238f3ced84e8528733d5bb151)

Each route leads with when to use it; the default model is always first.

> [!TIP]
>
> Write descriptions that separate the routes from each other. "Simple questions" and "Hard, multi-step coding and planning" route better than two descriptions that both mention coding.

## What members see

Members whose organization has the Auto Router turned on, and who have access to at least one of its models, see **Auto** as the first option in the desktop model picker. Auto manages thinking itself, so the effort control shows **Managed by Auto**.

![The desktop model picker with Auto, Picks the best model for each task, selected at the top](https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-picker.png?fit=max\&auto=format\&n=sDEZq1ewY6lvBha3\&q=85\&s=0d704ba8141543d1ab2a85c9299e3bee)

Auto is the first option in the 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 Auto reply names the model and thinking level that answered it.

## How it works

Auto Model Routing runs inside the AI Gateway. Every Auto 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 "Auto", member's AI Gateway key
  GW->>GW: Keep only your routes this member can use
  GW->>Jev: Latest prompt + each route's model and "Use when"
  Jev-->>GW: Best route
  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 your routes and drops any model the member doesn't have access to.
2. **One decision per task.** At the start of each task (when the member sends a message), the gateway asks [Jev](https://docs.typesafe.ai/introduction/coding-agents), a fast routing model from TypeSafe, to choose one route. The route runs at the thinking level you set for it. Jev sees the member's latest message and a short excerpt of the conversation, your route descriptions and model names. It never sees your provider ids or keys. The decision usually takes well under a second.
3. **Consistent within a task.** The steps that follow while the agent works on the task (tool results, follow-up calls) keep the same model and thinking level, so the model's context and prompt cache stay intact.
4. **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. Auto 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.
5. **A safe fallback.** If Jev can't answer in time, Auto uses your default model.

### Thinking levels

Each route runs at one thinking level you choose. More thinking gives better answers to hard problems but is slower and uses more tokens, so pair fast, low-thinking routes with everyday work and high-thinking routes with hard work.

| Level | Typical use |
| - | - |
| Default | The model's own setting |
| None / Minimal | Trivial replies, as fast as possible |
| Low | Straightforward tasks |
| Medium | Typical tasks |
| High | Complex, multi-step work |
| Xhigh / Max | The hardest problems |

## Turn it off

Select **Turn off** on the Auto Router tab. Auto disappears from members' model pickers the next time their app syncs with your organization, and requests already set to Auto stop routing. Your routes, including the default model, are kept, so turning it on again brings them back.

## Self-hosted

Auto Model Routing 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, Auto is off: the Auto Router tab explains how to add the key, and members don't see Auto. See the chart's README for details.


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