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 (or your self-hosted OpenWork) 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.
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 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.
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: who can use it.
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.
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.
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.
Each Smart reply names the model and thinking level that answered it.
In Cursor, Claude Code and Codex
Members who use AI Gateway API keys get the same Smart Routers in Cursor, Claude Code and Codex. Each one is listed after their models as openwork/smart-<router name>-<4 characters>, for example openwork/smart-engineering-x7q2, and the setup steps under My Library › Models offer it as Smart: Engineering. Claude Desktop lists only Claude models, so Smart Routers usually don’t appear there.
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.
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.
Every task is scored. At the start of each task the member gives the agent (when they send a message), the gateway asks Jev, 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.
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.
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.
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.
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, usage counting and costs 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.
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
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.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OpenWork Docs","colors":{"primary":"#011627","light":"#cbd5e1","dark":"#011627"},"logo":{"light":"https://mintcdn.com/differentai/bbTblqmGCwQ9TUdJ/logo/light.svg?fit=max\u0026auto=format\u0026n=bbTblqmGCwQ9TUdJ\u0026q=85\u0026s=4467903d12836ac81ccb6eef9dbe7bde","dark":"https://mintcdn.com/differentai/bbTblqmGCwQ9TUdJ/logo/dark.svg?fit=max\u0026auto=format\u0026n=bbTblqmGCwQ9TUdJ\u0026q=85\u0026s=104602207077f80bd2961c67c80dfcf4"},"favicon":"https://mintcdn.com/differentai/bbTblqmGCwQ9TUdJ/logo/light.svg?fit=max\u0026auto=format\u0026n=bbTblqmGCwQ9TUdJ\u0026q=85\u0026s=4467903d12836ac81ccb6eef9dbe7bde","api":{"openapi":"https://api.openworklabs.com/openapi.json?public=1"},"background":{"color":{"light":"#ffffff","dark":"#011627"}},"navbar":{"primary":{"type":"button","label":"Download OpenWork","href":"https://openworklabs.com/download"}},"seo":{"metatags":{"og:image":"https://openworklabs.com/docs/images/openwork-social.png","og:image:alt":"OpenWork — Your AI workspace. Without vendor lock-in.","twitter:image:alt":"OpenWork — Your AI workspace. Without vendor lock-in."}},"errors":{"404":{"redirect":false,"title":"Missing Documentation?","description":"If you're technical and want to use a specific part of the app that is not documented well yet, [send us a quick email](mailto:team@openworklabs.com?subject=missing%20documentation\u0026body=hey%20my%20github%20is%20%7Busername%7D%2C%20I%27m%20interested%20in%20%7Bfeature%7D%20from%20openwork%20but%20I%27m%20missing%20documentation%20on%20it%2C%20could%20you%20create%20it%3F%0A%0AThanks) and tell us what you're missing."}},"markdown":{"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."]},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"differentai","hasAudioNarration":false,"actualSubdomain":"differentai","customDomains":["openworklabs.com"],"gitSource":{"type":"github","owner":"different-ai","repo":"openwork","deployBranch":"dev","contentDirectory":"packages/docs","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6afb6e742432a68a4b240d75","clientVersion":"0.0.4167","searchFilterCounts":[{"language":"default","tag":"API","count":703},{"language":"default","tag":"Capability Sources","count":86},{"language":"default","tag":"Inference Providers","count":65},{"language":"default","tag":"Admin","count":53},{"language":"default","tag":"Organizations","count":50},{"language":"default","tag":"SSO","count":48},{"language":"default","tag":"AI Gateway","count":30},{"language":"default","tag":"Desktop App","count":30},{"language":"default","tag":"Authentication","count":30},{"language":"default","tag":"Connectors","count":30}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#topbar-cta-button>a[href=\"https://openworklabs.com/download\"]{padding-right:0.75rem}#topbar-cta-button>a[href=\"https://openworklabs.com/download\"]>div>svg[aria-hidden=\"true\"]{display:none}body:has(.docs-intro) #header{display:none}#content-area h1,#content-area h2,#content-area h3,#content-area h4{color:#011627;letter-spacing:-0.025em}.docs-intro{padding:8px 0 32px;margin-bottom:32px;border-bottom:1px solid #e5e7eb}#content-area .docs-eyebrow{margin:0 0 16px;color:#4b5563;font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:11px;line-height:1.6;letter-spacing:0.1em;text-transform:uppercase}#content-area .docs-intro h1,#content-area .docs-intro .docs-hero-title{margin:0;max-width:680px;font-size:clamp(2.25rem, 4vw, 3rem);font-weight:500;line-height:1.12;letter-spacing:-0.045em;text-wrap:balance}#content-area .docs-lead{margin:20px 0 24px;color:#4b5563;font-size:18px;line-height:1.65}#content-area .docs-section-title{margin:0 0 16px;font-size:clamp(1.75rem, 3vw, 2.25rem);font-weight:500;line-height:1.2;scroll-margin-top:150px}.docs-actions{display:flex;flex-wrap:wrap;gap:12px}#content-area .docs-actions a{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 20px;border:1px solid #e5e7eb;border-radius:999px;color:#011627;background:#f0f4f9;font-size:15px;font-weight:500;text-decoration:none}#content-area .docs-actions a:first-child{color:#ffffff;background:#011627;border-color:#011627}#content-area .docs-actions a:hover{opacity:0.85}#content-area .card{background:#f8fafc;border-color:#e5e7eb}a:focus-visible,button:focus-visible{outline:2px solid #011627;outline-offset:4px}@media (max-width: 1023px){#content-area a[aria-label=\"Navigate to header\"]{margin-left:-16px;width:16px}#content-area a[aria-label=\"Navigate to header\"]>div{width:16px;height:24px}}.dark #content-area :is(h1,h2,h3,h4),.dark #content-area :is(.docs-lead,.docs-eyebrow){color:#e2e8f0}.dark .docs-intro{border-color:#334155}.dark #content-area .docs-actions a{color:#e2e8f0;background:#172b3b;border-color:#475569}.dark #content-area .docs-actions a:first-child{color:#011627;background:#e2e8f0}.dark #content-area .card{background-color:#0b1e30;border-color:#334155}.dark :is(a,button):focus-visible{outline-color:#e2e8f0}a[href^=\"https://www.mintlify.com\"][href*=\"utm_campaign=poweredBy\"]{color:#4b5563}.dark a[href^=\"https://www.mintlify.com\"][href*=\"utm_campaign=poweredBy\"]{color:#cbd5e1}"}],"page":{"pagePath":"ai-gateway/auto-model-routing","slug":"/ai-gateway/auto-model-routing","pageMetadata":{"title":"Smart Model Router","description":"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.","href":"/ai-gateway/auto-model-routing"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{Frame,Heading,Mermaid,OptimizedImage,Step,Steps,Tip}=_components;if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Mermaid)_missingMdxReference(`Mermaid`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The Smart Model Router lets members choose a `,_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.p,{children:[`You set it up in OpenWork Cloud (or your self-hosted OpenWork) under `,_jsx(_components.strong,{children:`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 `,_jsx(_components.strong,{children:`Smart:`}),` followed by the router’s name, for example `,_jsx(_components.strong,{children:`Smart: Engineering`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`why-use-it`,children:`Why use it`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Lower cost without thinking about it.`}),` Members no longer run every small question through the most expensive model.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`set-it-up`,children:`Set it up`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{title:`Add the models to your AI Gateway`,children:_jsxs(_components.p,{children:[`A Smart Router can only use models that are already in your AI Gateway, in an active model group. If you haven’t yet, `,_jsx(_components.a,{href:`/cloud/share-with-your-team/managed-llm-provider`,children:`add a provider`}),` and its models first.`]})}),_jsxs(Step,{title:`Add a Smart Router with its models and tasks`,children:[_jsxs(_components.p,{children:[`Open `,_jsx(_components.strong,{children:`AI Gateway → AI Providers`}),` and select `,_jsx(_components.strong,{children:`Add a Smart Router`}),`, next to `,_jsx(_components.strong,{children:`Add a provider`}),`. Give it a name; a router named Engineering appears to members as `,_jsx(_components.strong,{children:`Smart: Engineering`}),`.`]}),_jsxs(_components.p,{children:[`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 `,_jsx(_components.strong,{children:`Add model`}),` for each other model you want it to use.`]}),_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`Continue`}),`.`]}),_jsx(Frame,{caption:`Step one: name the router and give each model its tasks.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=493e6e42f4559429ff21d51431014809`,alt:`The Add a Smart Router page with the name Engineering, Claude Haiku 5.5 and the tasks Debugging and Code review`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`1100`,height:`1100`,\"data-path\":`images/auto-model-routing/smart-router-editor.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=280\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=ffb93e25cf12f43a125a506cf3d85551 280w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=560\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=ad25f8ac93dd52bfc4f3e083f170e5db 560w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=840\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=88390c7f8ae325e84f34bf71ef83f7c3 840w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=1100\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=4057dfae991e76bcad63b9c4fb400895 1100w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=1650\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=c1c28f9a872190072059cba5154d1147 1650w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-editor.png?w=2500\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=79a229033d7acffb09736b870e2bb6f1 2500w`})})]}),_jsxs(Step,{title:`Choose who can use it`,children:[_jsx(_components.p,{children:`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.`}),_jsxs(_components.p,{children:[`Select `,_jsx(_components.strong,{children:`Save`}),`. Until you do, the router applies to nobody and shows `,_jsx(_components.strong,{children:`Give access`}),` in the list.`]}),_jsx(Frame,{caption:`Step two: who can use it.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=1e421173d16a6cfd6649ca8ae169e85e`,alt:`Step two with the Who can use it block and the router's model and tasks`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`1100`,height:`1100`,\"data-path\":`images/auto-model-routing/smart-router-access.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=280\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=95d8f661041fcd3d7d53ccbb0687dfb8 280w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=560\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=781f979104d853dcbfa44fd064b16346 560w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=840\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=35eca9ad6a478b014571177ed314485d 840w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=1100\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=8a3fc7e0f370c56738230b4e5096085f 1100w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=1650\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=800cf0c41a5a0e3e72f7320c1a7ddc67 1650w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-access.png?w=2500\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=f091d5c517e9a6af47cac9e051fa8f2d 2500w`})})]})]}),`\n`,_jsx(Tip,{children:_jsx(_components.p,{children:`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.`})}),`\n`,_jsxs(_components.p,{children:[`Smart Routers are listed at the top of AI Providers, like providers. Select `,_jsx(_components.strong,{children:`Manage`}),` to change one’s models, tasks or who can use it.`]}),`\n`,_jsx(Frame,{caption:`Smart Routers are listed first under AI Providers.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=d8634a629af41123eee6b6585a9db81a`,alt:`AI Providers listing Smart: Engineering above the Acme AI Gateway provider, with Add a Smart Router next to Add a provider`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`1100`,height:`1100`,\"data-path\":`images/auto-model-routing/smart-router-list.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=280\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=293293800ec727e4f4a46fe7fda74c0f 280w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=560\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=922aad0c1ad001d2b63f6b4ecc76a5ff 560w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=840\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=b39cbde56a0289135526187eaef8d267 840w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=1100\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=05ccfc00bcd28f580d6045898ed68442 1100w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=1650\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=bed3b26e0c19c9ef685f0004934d994e 1650w, https://mintcdn.com/differentai/p1h7Mw3WSzzH2OZe/images/auto-model-routing/smart-router-list.png?w=2500\u0026fit=max\u0026auto=format\u0026n=p1h7Mw3WSzzH2OZe\u0026q=85\u0026s=0a055143816cce5965f67719ab6f00ba 2500w`})}),`\n`,_jsx(Heading,{level:`2`,id:`what-members-see`,children:`What members see`}),`\n`,_jsxs(_components.p,{children:[`Members see one `,_jsx(_components.strong,{children:`Smart:`}),` option (such as `,_jsx(_components.strong,{children:`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.`]}),`\n`,_jsx(Frame,{caption:`Each Smart Router that applies to a member is at the top of their model picker.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=479f7b51a58d8a5354809e8748af0dff`,alt:`The desktop model picker with Smart: Engineering, Picks the best model for each task, at the top`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`900`,height:`900`,\"data-path\":`images/auto-model-routing/smart-router-picker.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=280\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=b6469723ea42e6cad3395fa16f9354cc 280w, https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=560\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=9e7820393e1425cd4bdeb1b8e77dd587 560w, https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=840\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=178f175d1627669f0e766267dd6a5b9f 840w, https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=1100\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=21fc1e19fbc44309c0440855385a6fd2 1100w, https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=1650\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=100bdd18fc96be1ff963faca39092124 1650w, https://mintcdn.com/differentai/wRHxpK06ZLXDB2y-/images/auto-model-routing/smart-router-picker.png?w=2500\u0026fit=max\u0026auto=format\u0026n=wRHxpK06ZLXDB2y-\u0026q=85\u0026s=b9884442532e0823ba7683bd717b0c00 2500w`})}),`\n`,_jsx(_components.p,{children:`Each reply shows which model answered it and at which thinking level, next to the reply’s time.`}),`\n`,_jsx(Frame,{caption:`Each Smart reply names the model and thinking level that answered it.`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=ff06714cd57600dc92c532d386a77c54`,alt:`A chat reply labelled Claude Haiku 5.5 · High`,\"data-og-width\":`1440`,width:`1440`,\"data-og-height\":`900`,height:`900`,\"data-path\":`images/auto-model-routing/auto-router-answered-by.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=280\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=03ad8179688a81c670d1cc4aec5348ca 280w, https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=560\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=195a0fbb1465c75c2c9f74b9db144658 560w, https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=840\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=13c0b3c31e7e9c40cd807122daa012d2 840w, https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=1100\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=deeffcd1e5fcdc4b2ebcfb06b74606f2 1100w, https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=1650\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=24118b752b8c41a288808acee7a8465b 1650w, https://mintcdn.com/differentai/sDEZq1ewY6lvBha3/images/auto-model-routing/auto-router-answered-by.png?w=2500\u0026fit=max\u0026auto=format\u0026n=sDEZq1ewY6lvBha3\u0026q=85\u0026s=c3ac7e205268f6495306c7b1a58b5c52 2500w`})}),`\n`,_jsx(Heading,{level:`3`,id:`in-cursor-claude-code-and-codex`,children:`In Cursor, Claude Code and Codex`}),`\n`,_jsxs(_components.p,{children:[`Members who use `,_jsx(_components.a,{href:`/ai-gateway/third-party-tools`,children:`AI Gateway API keys`}),` get the same Smart Routers in `,_jsx(_components.a,{href:`/ai-gateway/cursor`,children:`Cursor`}),`, `,_jsx(_components.a,{href:`/ai-gateway/claude-code`,children:`Claude Code`}),` and `,_jsx(_components.a,{href:`/ai-gateway/codex`,children:`Codex`}),`. Each one is listed after their models as `,_jsx(_components.code,{children:`openwork/smart-\u003crouter name>-\u003c4 characters>`}),`, for example `,_jsx(_components.code,{children:`openwork/smart-engineering-x7q2`}),`, and the setup steps under `,_jsx(_components.strong,{children:`My Library › Models`}),` offer it as `,_jsx(_components.strong,{children:`Smart: Engineering`}),`. Claude Desktop lists only Claude models, so Smart Routers usually don’t appear there.`]}),`\n`,_jsx(Heading,{level:`2`,id:`how-it-works`,children:`How it works`}),`\n`,_jsxs(_components.p,{children:[`The Smart Model Router runs inside the AI Gateway. Every Smart request still uses the member’s own AI Gateway key, as described in `,_jsx(_components.a,{href:`/ai-gateway/how-requests-flow`,children:`How requests flow`}),`.`]}),`\n`,_jsx(Mermaid,{chart:`sequenceDiagram\n participant App as OpenWork desktop\n participant GW as AI Gateway\n participant Jev as Jev (routing model)\n participant P as Chosen model's provider\n App->>GW: Prompt, model \"Smart: Engineering\", member's AI Gateway key\n GW->>GW: Keep only the router's models this member can use\n GW->>Jev: Latest prompt + every task of those models\n Jev-->>GW: How well the prompt fits each task, and how much thinking it needs\n GW->>GW: Add up each model's task scores, pick the highest\n GW->>P: The same request, as if the member picked that model\n P-->>GW: Response\n GW-->>App: Response, plus which model and thinking level answered`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Every task is scored.`}),` At the start of each task the member gives the agent (when they send a message), the gateway asks `,_jsx(_components.a,{href:`https://docs.typesafe.ai/primitives/score`,children:`Jev`}),`, 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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`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, `,_jsx(_components.a,{href:`/ai-gateway/limits`,children:`limits`}),`, `,_jsx(_components.a,{href:`/ai-gateway/counting-usage`,children:`usage counting`}),` and `,_jsx(_components.a,{href:`/ai-gateway/token-costs`,children:`costs`}),` 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.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`A safe fallback.`}),` If Jev can’t answer in time, the first model in the router answers at its default thinking level.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`tasks`,children:`Tasks`}),`\n`,_jsx(_components.p,{children:`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.`}),`\n`,_jsx(Heading,{level:`2`,id:`remove-a-smart-router`,children:`Remove a Smart Router`}),`\n`,_jsxs(_components.p,{children:[`Open a Smart Router with `,_jsx(_components.strong,{children:`Manage`}),` and select `,_jsx(_components.strong,{children:`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.`]}),`\n`,_jsx(Heading,{level:`2`,id:`self-hosted`,children:`Self-hosted`}),`\n`,_jsxs(_components.p,{children:[`On a self-hosted install, give the AI Gateway a TypeSafe API key through the Helm chart’s `,_jsx(_components.code,{children:`secret.values.typesafeApiKey`}),` (or the `,_jsx(_components.code,{children:`TYPESAFE_API_KEY`}),` key in your existing Secret). Without a key, Smart is off: `,_jsx(_components.strong,{children:`Add a Smart Router`}),` explains how to add the key, and members don’t see Smart models. See the chart’s README for details.`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Smart Model Router","description":"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.","href":"/ai-gateway/auto-model-routing"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Why use it","slug":"why-use-it","depth":2,"children":[]},{"title":"Set it up","slug":"set-it-up","depth":2,"children":[]},{"title":"What members see","slug":"what-members-see","depth":2,"children":[{"title":"In Cursor, Claude Code and Codex","slug":"in-cursor-claude-code-and-codex","depth":3,"children":[]}]},{"title":"How it works","slug":"how-it-works","depth":2,"children":[]},{"title":"Tasks","slug":"tasks","depth":2,"children":[]},{"title":"Remove a Smart Router","slug":"remove-a-smart-router","depth":2,"children":[]},{"title":"Self-hosted","slug":"self-hosted","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"differentai","siteName":"OpenWork Docs","title":"Smart Model Router - OpenWork Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-12T20:13:55.393Z","originalFileLocation":"ai-gateway/auto-model-routing.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OpenWork Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Smart Model Router - OpenWork Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OpenWork Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://openworklabs.com/docs/ai-gateway/auto-model-routing\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://openworklabs.com/docs/images/openwork-social.png\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Smart Model Router - OpenWork Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://openworklabs.com/docs/images/openwork-social.png\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/differentai/wKsTNhaHes0Tin67/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OpenWork Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#011627\">\u003cmeta data-mint-head name=\"og:image:alt\" content=\"OpenWork — Your AI workspace. Without vendor lock-in.\">\u003cmeta data-mint-head name=\"twitter:image:alt\" content=\"OpenWork — Your AI workspace. Without vendor lock-in.\">\u003clink data-mint-head rel=\"canonical\" href=\"https://openworklabs.com/docs/ai-gateway/auto-model-routing\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/ai-gateway/auto-model-routing.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://openworklabs.com/#organization\",\"name\":\"OpenWork Docs\",\"url\":\"https://openworklabs.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/differentai/bbTblqmGCwQ9TUdJ/logo/light.svg?fit=max\u0026auto=format\u0026n=bbTblqmGCwQ9TUdJ\u0026q=85\u0026s=4467903d12836ac81ccb6eef9dbe7bde\"}},{\"@type\":\"WebSite\",\"@id\":\"https://openworklabs.com/docs#website\",\"name\":\"OpenWork Docs\",\"url\":\"https://openworklabs.com/docs\",\"publisher\":{\"@id\":\"https://openworklabs.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing#webpage\",\"url\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing\",\"name\":\"Smart Model Router\",\"description\":\"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\",\"dateModified\":\"2026-11-12T20:13:55.393Z\",\"isPartOf\":{\"@id\":\"https://openworklabs.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Overview\",\"item\":\"https://openworklabs.com/docs/ai-gateway/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Smart Model Router\",\"item\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing#article\",\"headline\":\"Smart Model Router\",\"name\":\"Smart Model Router\",\"description\":\"Let OpenWork pick the right model and thinking level for every prompt, from the AI Gateway models and tasks you choose.\",\"url\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing\",\"mainEntityOfPage\":{\"@id\":\"https://openworklabs.com/docs/ai-gateway/auto-model-routing#webpage\"},\"image\":\"https://openworklabs.com/docs/images/openwork-social.png\",\"dateModified\":\"2026-11-12T20:13:55.393Z\",\"publisher\":{\"@id\":\"https://openworklabs.com/#organization\"},\"isPartOf\":{\"@id\":\"https://openworklabs.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OpenWork Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OpenWork Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/ai-gateway/auto-model-routing.md","siteName":"OpenWork Docs","nav":{"global":null,"tabs":[{"tab":"Start here","pages":[{"title":"Start here","href":"/start-here/get-started"}]},{"tab":"Desktop App","pages":[{"title":"Desktop App","href":"/desktop-app/first-task"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Slack","pages":[{"title":"Slack","href":"/slack/connect-slack"}]},{"tab":"AI Gateway","pages":[{"group":"Overview","pages":[{"title":"AI Gateway","sidebarTitle":"Overview","href":"/ai-gateway/overview"},{"title":"OpenWork Models","href":"/ai-gateway/openwork-models"},{"title":"Users and teams","href":"/ai-gateway/users-and-teams"},{"title":"AI Gateway API keys","href":"/ai-gateway/third-party-tools"},{"title":"Use Cursor with AI Gateway","href":"/ai-gateway/cursor"},{"title":"Use Claude Code with AI Gateway","href":"/ai-gateway/claude-code"},{"title":"Use Claude Desktop with AI Gateway","href":"/ai-gateway/claude-desktop"},{"title":"Use the Codex CLI with AI Gateway","href":"/ai-gateway/codex"},{"title":"Use the Codex app with AI Gateway","href":"/ai-gateway/codex-desktop"},{"title":"Provider support","href":"/ai-gateway/provider-support"},{"title":"AI Gateway vs LiteLLM vs Bifrost","sidebarTitle":"Compare: LiteLLM and Bifrost","href":"/ai-gateway/compare-litellm-bifrost"},{"title":"Use your LiteLLM proxy","href":"/ai-gateway/litellm"},{"title":"Use your TrueFoundry AI Gateway","href":"/ai-gateway/truefoundry"},{"title":"How a prompt reaches a model","sidebarTitle":"How requests flow","description":"How the OpenWork desktop app uses one AI Gateway key for every provider, and how the gateway swaps it for the right provider key, including LiteLLM keys.","href":"/ai-gateway/how-requests-flow"},{"title":"Smart Model Router","href":"/ai-gateway/auto-model-routing"},{"title":"Google Agent Platform (Vertex AI)","description":"Set up Gemini and Claude on Google's Gemini Enterprise Agent Platform with your own OAuth app and per-member Google sign-in through OpenWork AI Gateway.","href":"/ai-gateway/google-agent-platform"},{"title":"Amazon Bedrock","href":"/ai-gateway/amazon-bedrock"},{"title":"Microsoft Foundry","href":"/ai-gateway/microsoft-foundry"}]},{"group":"Providers for your org","pages":[{"title":"Adding a managed LLM provider","href":"/cloud/share-with-your-team/managed-llm-provider"},{"title":"Adding a custom LLM provider","href":"/cloud/share-with-your-team/custom-llm-provider"},{"title":"Per-member LLM credentials","href":"/cloud/share-with-your-team/per-member-llm-credentials"},{"title":"TrueFoundry: a key for each member","href":"/cloud/share-with-your-team/truefoundry-per-member-keys"}]},{"group":"Usage and cost","pages":[{"title":"Overview tab: spend and usage","sidebarTitle":"Overview tab","href":"/ai-gateway/usage-dashboard"},{"title":"My Usage: your own spend, limits and model prices","sidebarTitle":"My Usage","href":"/ai-gateway/my-usage"},{"title":"Counting usage","href":"/ai-gateway/counting-usage"},{"title":"Token Costs","href":"/ai-gateway/token-costs"},{"title":"Limits","href":"/ai-gateway/limits"},{"title":"What uses tokens","href":"/start-here/do-work-with-it/what-uses-tokens"}]},{"group":"Benchmarks","pages":[{"title":"Knowledge-work cost benchmark","sidebarTitle":"Overview","href":"/benchmarks/overview"},{"title":"How the knowledge-work cost benchmark was run","sidebarTitle":"How it was run","href":"/benchmarks/how-it-was-run"}]}]},{"tab":"MCP Gateway","pages":[{"title":"MCP Gateway","href":"/cloud/run-in-the-cloud/cloud-mcp"}]},{"tab":"Artifacts","pages":[{"title":"Artifacts","href":"/dashboards/overview"}]},{"tab":"SSO","pages":[{"title":"SSO","href":"/cloud/get-started"}]},{"tab":"Self-host","pages":[{"title":"Self-host","href":"/start-here/self-host"}]},{"tab":"API","pages":[{"title":"API","href":"/api-reference/system/check-den-api-health"}]},{"tab":"Roadmap","pages":[{"title":"Roadmap","href":"/roadmap"}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},"basePath":"","title":"Smart Model Router - OpenWork Docs","buildId":"dpl_H5KQTnCewfWWvJxA7c3bCm7MFbb6","deploymentId":"dpl_H5KQTnCewfWWvJxA7c3bCm7MFbb6","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-DBf8HiS-.js","DynamicMarkdown-DcvJmTWC.js","zoom-image-lightbox-Dyw95Qy3.js","lightbox-handle-r17bVUz3.js"]}