PageSourceSearch

https://doc.routerly.ai/assets/js/d3fc0211.de97338a.js

js routerly.ai collected 2026-10-05 14:49:58 UTC 11,629 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkwebsite=globalThis.webpackChunkwebsite||[]).push([[3289],{1144(e,i,n){n.r(i),n.d(i,{assets:()=>o,contentTitle:()=>l,default:()=>a,frontMatter:()=>d,metadata:()=>s,toc:()=>c});const s=JSON.parse('{"id":"concepts/models","title":"Models","description":"A model in Routerly is a registered entry that maps a model identifier to a provider, its API credentials, pricing, and capabilities. You register each model once, and it becomes available to all projects.","source":"@site/../docs/concepts/models.md","sourceDirName":"concepts","slug":"/concepts/models","permalink":"/next/concepts/models","draft":false,"unlisted":false,"editUrl":"https://github.com/Inebrio/Routerly/edit/main/../docs/concepts/models.md","tags":[],"version":"current","sidebarPosition":3,"frontMatter":{"title":"Models","sidebar_position":3},"sidebar":"docsSidebar","previous":{"title":"Providers","permalink":"/next/concepts/providers"},"next":{"title":"Projects","permalink":"/next/concepts/projects"}}');var r=n(4848),t=n(8453);const d={title:"Models",sidebar_position:3},l="Models",o={},c=[{value:"Registering a Model",id:"registering-a-model",level:2},{value:"CLI",id:"cli",level:3},{value:"Dashboard",id:"dashboard",level:3},{value:"Model Configuration Fields",id:"model-configuration-fields",level:2},{value:"Pricing Tiers",id:"pricing-tiers",level:2},{value:"Capabilities",id:"capabilities",level:2},{value:"Assigning Models to Projects",id:"assigning-models-to-projects",level:2},{value:"Cloning a Model",id:"cloning-a-model",level:2},{value:"Removing a Model",id:"removing-a-model",level:2}];function h(e){const i={admonition:"admonition",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",hr:"hr",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",table:"table",tbody:"tbody",td:"td",th:"th",thead:"thead",tr:"tr",...(0,t.R)(),...e.components};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(i.header,{children:(0,r.jsx)(i.h1,{id:"models",children:"Models"})}),"\n",(0,r.jsxs)(i.p,{children:["A ",(0,r.jsx)(i.strong,{children:"model"})," in Routerly is a registered entry that maps a model identifier to a provider, its API credentials, pricing, and capabilities. You register each model once, and it becomes available to all projects."]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"registering-a-model",children:"Registering a Model"}),"\n",(0,r.jsx)(i.h3,{id:"cli",children:"CLI"}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"routerly model add \\\n  --id gpt-5-mini \\\n  --provider openai \\\n  --api-key sk-YOUR_KEY\n"})}),"\n",(0,r.jsx)(i.p,{children:"For well-known model IDs, pricing and capabilities are pre-filled from built-in presets. You can override them with additional flags."}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"routerly model add \\\n  --id my-fine-tune \\\n  --provider openai \\\n  --api-key sk-YOUR_KEY \\\n  --input-price 0.5 \\\n  --output-price 2.0 \\\n  --context-window 128000\n"})}),"\n",(0,r.jsxs)(i.p,{children:["Use ",(0,r.jsx)(i.code,{children:"routerly model list"})," to see all registered models and ",(0,r.jsx)(i.code,{children:"routerly model remove --id <id>"})," to delete one."]}),"\n",(0,r.jsx)(i.h3,{id:"dashboard",children:"Dashboard"}),"\n",(0,r.jsxs)(i.ol,{children:["\n",(0,r.jsxs)(i.li,{children:["Open ",(0,r.jsx)(i.strong,{children:"Models"})," in the sidebar"]}),"\n",(0,r.jsxs)(i.li,{children:["Click ",(0,r.jsx)(i.strong,{children:"+ New Model"})]}),"\n",(0,r.jsxs)(i.li,{children:["Fill in: ",(0,r.jsx)(i.strong,{children:"Model ID"}),", ",(0,r.jsx)(i.strong,{children:"Provider"}),", ",(0,r.jsx)(i.strong,{children:"API Key"})]}),"\n",(0,r.jsx)(i.li,{children:"Pricing fields are pre-filled for known models \u2014 adjust if needed"}),"\n",(0,r.jsxs)(i.li,{children:["Set ",(0,r.jsx)(i.strong,{children:"Capabilities"})," (vision, function calling, thinking, JSON mode) for use by the capability routing policy"]}),"\n",(0,r.jsxs)(i.li,{children:["Click ",(0,r.jsx)(i.strong,{children:"Save"})]}),"\n"]}),"\n",(0,r.jsxs)(i.p,{children:["You can also ",(0,r.jsx)(i.strong,{children:"Clone"})," an existing model entry to register a fine-tune or variant quickly."]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"model-configuration-fields",children:"Model Configuration Fields"}),"\n",(0,r.jsxs)(i.table,{children:[(0,r.jsx)(i.thead,{children:(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.th,{children:"Field"}),(0,r.jsx)(i.th,{children:"Description"})]})}),(0,r.jsxs)(i.tbody,{children:[(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Model ID"})}),(0,r.jsxs)(i.td,{children:["The identifier sent to the provider API (e.g. ",(0,r.jsx)(i.co
1de,{children:"gpt-5-mini"}),")"]})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Provider"})}),(0,r.jsxs)(i.td,{children:["One of ",(0,r.jsx)(i.code,{children:"openai"}),", ",(0,r.jsx)(i.code,{children:"anthropic"}),", ",(0,r.jsx)(i.code,{children:"gemini"}),", ",(0,r.jsx)(i.code,{children:"mistral"}),", ",(0,r.jsx)(i.code,{children:"cohere"}),", ",(0,r.jsx)(i.code,{children:"xai"}),", ",(0,r.jsx)(i.code,{children:"ollama"}),", ",(0,r.jsx)(i.code,{children:"custom"})]})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"API Key"})}),(0,r.jsx)(i.td,{children:"Provider API key (AES-256 encrypted at rest)"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Base URL"})}),(0,r.jsx)(i.td,{children:"Override the provider endpoint (useful for proxies and custom providers)"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Input price"})}),(0,r.jsx)(i.td,{children:"Price per 1 million input tokens in USD"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Output price"})}),(0,r.jsx)(i.td,{children:"Price per 1 million output tokens in USD"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Cache price"})}),(0,r.jsx)(i.td,{children:"Price per 1 million cached input tokens (if the provider supports it)"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Context window"})}),(0,r.jsx)(i.td,{children:"Maximum number of tokens the model accepts"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Pricing tiers"})}),(0,r.jsx)(i.td,{children:"Optional: higher prices above a token-count threshold (see below)"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Capabilities"})}),(0,r.jsxs)(i.td,{children:[(0,r.jsx)(i.code,{children:"vision"}),", ",(0,r.jsx)(i.code,{children:"functionCalling"}),", ",(0,r.jsx)(i.code,{children:"thinking"}),", ",(0,r.jsx)(i.code,{children:"json"})]})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.strong,{children:"Enabled"})}),(0,r.jsx)(i.td,{children:"Toggle to temporarily disable a model without deleting it"})]})]})]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"pricing-tiers",children:"Pricing Tiers"}),"\n",(0,r.jsx)(i.p,{children:"Some models have different prices for long-context requests. You can configure a pricing tier that applies above a token threshold."}),"\n",(0,r.jsx)(i.p,{children:(0,r.jsx)(i.strong,{children:"Example \u2014 Anthropic claude-opus-4-6:"})}),"\n",(0,r.jsxs)(i.table,{children:[(0,r.jsx)(i.thead,{children:(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.th,{children:"Range"}),(0,r.jsx)(i.th,{children:"Input"}),(0,r.jsx)(i.th,{children:"Output"})]})}),(0,r.jsxs)(i.tbody,{children:[(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:"\u2264 200k tokens"}),(0,r.jsx)(i.td,{children:"$5 / 1M"}),(0,r.jsx)(i.td,{children:"$25 / 1M"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:"> 200k tokens"}),(0,r.jsx)(i.td,{children:"$10 / 1M"}),(0,r.jsx)(i.td,{children:"$37.5 / 1M"})]})]})]}),"\n",(0,r.jsx)(i.p,{children:"When Routerly calculates cost for a request, it checks the total token count and applies the appropriate tier automatically."}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"capabilities",children:"Capabilities"}),"\n",(0,r.jsxs)(i.p,{children:["Capabilities control which models the ",(0,r.jsx)(i.strong,{children:"capability"})," routing policy will select. Set them accurately to get correct routing behaviour."]}),"\n",(0,r.jsxs)(i.table,{children:[(0,r.jsx)(i.thead,{children:(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.th,{children:"Capability"}),(0,r.jsx)(i.th,{children:"Description"})]})}),(0,r.jsxs)(i.tbody,{children:[(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.code,{children:"vision"})}),(0,r.jsx)(i.td,{children:"Model can process image inputs"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.code,{children:"functionCalling"})}),(0,r.jsx)(i.td,{children:"Model supports tool/function call format"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.co
1de,{children:"thinking"})}),(0,r.jsx)(i.td,{children:"Model exposes chain-of-thought (e.g. o1, o3, Claude with extended thinking)"})]}),(0,r.jsxs)(i.tr,{children:[(0,r.jsx)(i.td,{children:(0,r.jsx)(i.code,{children:"json"})}),(0,r.jsxs)(i.td,{children:["Model reliably generates valid JSON with ",(0,r.jsx)(i.code,{children:'response_format: {type: "json_object"}'})]})]})]})]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"assigning-models-to-projects",children:"Assigning Models to Projects"}),"\n",(0,r.jsxs)(i.p,{children:["A model is not usable in a project until it is assigned. When creating a project via CLI, use ",(0,r.jsx)(i.code,{children:"--models"}),":"]}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:'routerly project add --name "My App" --slug my-app --models gpt-5-mini,claude-haiku-4-5\n'})}),"\n",(0,r.jsxs)(i.p,{children:["From the dashboard, open the project \u2192 ",(0,r.jsx)(i.strong,{children:"Routing"})," tab, then drag and drop models into the routing configuration."]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"cloning-a-model",children:"Cloning a Model"}),"\n",(0,r.jsx)(i.p,{children:"Cloning is useful when you have a fine-tuned variant of a base model and want to reuse its pricing configuration:"}),"\n",(0,r.jsxs)(i.ol,{children:["\n",(0,r.jsxs)(i.li,{children:["Click the ",(0,r.jsx)(i.strong,{children:"Clone"})," icon next to a model in the list"]}),"\n",(0,r.jsx)(i.li,{children:"Change the Model ID and API Key"}),"\n",(0,r.jsx)(i.li,{children:"Adjust pricing if your fine-tune has different rates"}),"\n",(0,r.jsx)(i.li,{children:"Save"}),"\n"]}),"\n",(0,r.jsx)(i.hr,{}),"\n",(0,r.jsx)(i.h2,{id:"removing-a-model",children:"Removing a Model"}),"\n",(0,r.jsx)(i.admonition,{type:"warning",children:(0,r.jsx)(i.p,{children:"Removing a model that is assigned to active projects will cause routing failures for those projects. Remove the model from all project configurations first."})}),"\n",(0,r.jsx)(i.pre,{children:(0,r.jsx)(i.code,{className:"language-bash",children:"routerly model remove --id gpt-5-mini\n"})})]})}function a(e={}){const{wrapper:i}={...(0,t.R)(),...e.components};return i?(0,r.jsx)(i,{...e,children:(0,r.jsx)(h,{...e})}):h(e)}},8453(e,i,n){n.d(i,{R:()=>d,x:()=>l});var s=n(6540);const r={},t=s.createContext(r);function d(e){const i=s.useContext(t);return s.useMemo(function(){return"function"==typeof e?e(i):{...i,...e}},[i,e])}function l(e){let i;return i=e.disableParentContext?"function"==typeof e.components?e.components(r):e.components||r:d(e.components),s.createElement(t.Provider,{value:i},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.