[{"data":1,"prerenderedAt":629},["ShallowReactive",2],{"i-mdi:magnify":3,"i-simple-icons:visualstudiocode":8,"i-mdi:github":11,"i-mdi:discord":13,"i-mdi:youtube":15,"i-mdi:flask-outline":17,"docs-\u002Fdocs\u002Fv2\u002Fproviders":19},{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":7},0,24,false,"\u003Cpath fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.52 6.52 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":9,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"M23.15 2.587L18.21.21a1.49 1.49 0 0 0-1.705.29l-9.46 8.63l-4.12-3.128a1 1 0 0 0-1.276.057L.327 7.261A1 1 0 0 0 .326 8.74L3.899 12L.326 15.26a1 1 0 0 0 .001 1.479L1.65 17.94a1 1 0 0 0 1.276.057l4.12-3.128l9.46 8.63a1.49 1.49 0 0 0 1.704.29l4.942-2.377A1.5 1.5 0 0 0 24 20.06V3.939a1.5 1.5 0 0 0-.85-1.352m-5.146 14.861L10.826 12l7.178-5.448z\"\u002F>",true,{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":12},"\u003Cpath fill=\"currentColor\" d=\"M12 2A10 10 0 0 0 2 12c0 4.42 2.87 8.17 6.84 9.5c.5.08.66-.23.66-.5v-1.69c-2.77.6-3.36-1.34-3.36-1.34c-.46-1.16-1.11-1.47-1.11-1.47c-.91-.62.07-.6.07-.6c1 .07 1.53 1.03 1.53 1.03c.87 1.52 2.34 1.07 2.91.83c.09-.65.35-1.09.63-1.34c-2.22-.25-4.55-1.11-4.55-4.92c0-1.11.38-2 1.03-2.71c-.1-.25-.45-1.29.1-2.64c0 0 .84-.27 2.75 1.02c.79-.22 1.65-.33 2.5-.33s1.71.11 2.5.33c1.91-1.29 2.75-1.02 2.75-1.02c.55 1.35.2 2.39.1 2.64c.65.71 1.03 1.6 1.03 2.71c0 3.82-2.34 4.66-4.57 4.91c.36.31.69.92.69 1.85V21c0 .27.16.59.67.5C19.14 20.16 22 16.42 22 12A10 10 0 0 0 12 2\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":14,"hidden":10},"\u003Cpath fill=\"currentColor\" d=\"m22 24l-5.25-5l.63 2H4.5A2.5 2.5 0 0 1 2 18.5v-15A2.5 2.5 0 0 1 4.5 1h15A2.5 2.5 0 0 1 22 3.5V24M12 6.8c-2.68 0-4.56 1.15-4.56 1.15c1.03-.92 2.83-1.45 2.83-1.45l-.17-.17c-1.69.03-3.22 1.2-3.22 1.2c-1.72 3.59-1.61 6.69-1.61 6.69c1.4 1.81 3.48 1.68 3.48 1.68l.71-.9c-1.25-.27-2.04-1.38-2.04-1.38S9.3 14.9 12 14.9s4.58-1.28 4.58-1.28s-.79 1.11-2.04 1.38l.71.9s2.08.13 3.48-1.68c0 0 .11-3.1-1.61-6.69c0 0-1.53-1.17-3.22-1.2l-.17.17s1.8.53 2.83 1.45c0 0-1.88-1.15-4.56-1.15m-2.07 3.79c.65 0 1.18.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27m4.17 0c.65 0 1.17.57 1.17 1.27c0 .69-.52 1.27-1.17 1.27c-.64 0-1.16-.58-1.16-1.27c0-.7.51-1.27 1.16-1.27Z\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":16},"\u003Cpath fill=\"currentColor\" d=\"m10 15l5.19-3L10 9zm11.56-7.83c.13.47.22 1.1.28 1.9c.07.8.1 1.49.1 2.09L22 12c0 2.19-.16 3.8-.44 4.83c-.25.9-.83 1.48-1.73 1.73c-.47.13-1.33.22-2.65.28c-1.3.07-2.49.1-3.59.1L12 19c-4.19 0-6.8-.16-7.83-.44c-.9-.25-1.48-.83-1.73-1.73c-.13-.47-.22-1.1-.28-1.9c-.07-.8-.1-1.49-.1-2.09L2 12c0-2.19.16-3.8.44-4.83c.25-.9.83-1.48 1.73-1.73c.47-.13 1.33-.22 2.65-.28c1.3-.07 2.49-.1 3.59-.1L12 5c4.19 0 6.8.16 7.83.44c.9.25 1.48.83 1.73 1.73\"\u002F>",{"left":4,"top":4,"width":5,"height":5,"rotate":4,"vFlip":6,"hFlip":6,"body":18},"\u003Cpath fill=\"currentColor\" d=\"M5 19a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1c0-.21-.07-.41-.18-.57L13 8.35V4h-2v4.35L5.18 18.43c-.11.16-.18.36-.18.57m1 3a3 3 0 0 1-3-3c0-.6.18-1.16.5-1.63L9 7.81V6a1 1 0 0 1-1-1V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v1a1 1 0 0 1-1 1v1.81l5.5 9.56c.32.47.5 1.03.5 1.63a3 3 0 0 1-3 3zm7-6l1.34-1.34L16.27 18H7.73l2.66-4.61zm-.5-4a.5.5 0 0 1 .5.5a.5.5 0 0 1-.5.5a.5.5 0 0 1-.5-.5a.5.5 0 0 1 .5-.5\"\u002F>",{"id":20,"title":21,"body":22,"description":622,"extension":623,"meta":624,"navigation":10,"path":625,"seo":626,"stem":627,"__hash__":628},"docs\u002Fdocs\u002Fv2\u002Fproviders\u002Findex.md","Providers",{"type":23,"value":24,"toc":615},"minimark",[25,29,33,36,106,113,118,121,129,140,147,151,154,171,191,265,277,294,298,301,338,357,369,373,388,460,463,521,524,528,539,565,576,587,611],[26,27,21],"h1",{"id":28},"providers",[30,31,32],"p",{},"A provider is a source of inference. You declare which ones you have; a cognet declares\nthe roles it needs; the runtime matches them at boot.",[30,34,35],{},"That is the whole configuration step. You never write down which model runs which part of\nan agent — that is decided from what you actually have, every time it starts.",[37,38,43],"pre",{"className":39,"code":40,"language":41,"meta":42,"style":42},"language-ts shiki shiki-themes dark-plus","\u002F\u002F ~\u002F.axon\u002Fprofiles\u002F\u003Cyou>\u002Fprofile.config.ts\nexport default defineProfile({\n    providers: [Anthropic(), Ollama(), Axon()],\n})\n","ts","",[44,45,46,55,73,100],"code",{"__ignoreMap":42},[47,48,51],"span",{"class":49,"line":50},"line",1,[47,52,54],{"class":53},"sOLPB","\u002F\u002F ~\u002F.axon\u002Fprofiles\u002F\u003Cyou>\u002Fprofile.config.ts\n",[47,56,58,62,65,69],{"class":49,"line":57},2,[47,59,61],{"class":60},"sYbnZ","export",[47,63,64],{"class":60}," default",[47,66,68],{"class":67},"sCudf"," defineProfile",[47,70,72],{"class":71},"sTNBD","({\n",[47,74,76,80,83,86,89,92,94,97],{"class":49,"line":75},3,[47,77,79],{"class":78},"s3F5K","    providers:",[47,81,82],{"class":71}," [",[47,84,85],{"class":67},"Anthropic",[47,87,88],{"class":71},"(), ",[47,90,91],{"class":67},"Ollama",[47,93,88],{"class":71},[47,95,96],{"class":67},"Axon",[47,98,99],{"class":71},"()],\n",[47,101,103],{"class":49,"line":102},4,[47,104,105],{"class":71},"})\n",[30,107,108,109,112],{},"Declare once, on your profile, and every agent you run inherits it. If you are signed in\nand have declared nothing at all, ",[44,110,111],{},"Axon()"," is already there — the rest of this tab is for\nwhen you want your own keys, your own hardware, or a specific vendor.",[114,115,117],"h2",{"id":116},"a-provider-is-a-catalogue-not-a-model","A provider is a catalogue, not a model",[30,119,120],{},"This is the one idea everything else follows from.",[30,122,123,124,128],{},"A provider answers ",[125,126,127],"strong",{},"\"what can I supply\""," — a list of models with their context windows\nand modalities. It does not answer \"which model should this agent use\", because that\nquestion cannot be settled when you write the config: it depends on which cognet is\nrunning and what roles it declares.",[30,130,131,132,135,136,139],{},"So a cognet asks for ",[44,133,134],{},"main: { type: \"generate\", in: \"text\", out: \"text\", context: 100_000 }","\nand the runtime finds something you have that fits. A cognet asking for a vision model on\na machine with none says so at ",[44,137,138],{},"axon prepare",", before anything runs — not at the first\ncall that needs it.",[30,141,142,143,146],{},"One consequence worth internalising: ",[125,144,145],{},"an agent someone else published runs on your\nproviders, not theirs."," They never named a vendor, so there is nothing in their agent to\nbe wrong about yours.",[114,148,150],{"id":149},"the-three-postures","The three postures",[30,152,153],{},"Choosing a provider is really choosing about cost, keys, and where your tokens go.",[30,155,156,166,167,170],{},[125,157,158,159,165],{},"Managed — ",[160,161,163],"a",{"href":162},"\u002Fdocs\u002Fv2\u002Fproviders\u002Faxon",[44,164,111],{},"."," Inference through Axon Cloud, billed to\nyour account. No keys, works the moment you are signed in, and its catalogue covers\neverything reachable through OpenRouter. The default, and what a fresh ",[44,168,169],{},"axon init"," ships\nwith.",[30,172,173,176,177,183,184,190],{},[125,174,175],{},"Bring your own key."," Your credential, your vendor relationship, their rates — no\nmarkup, and Axon is not in the request path. Either an aggregator that fronts many\nvendors (",[160,178,180],{"href":179},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fopenrouter",[44,181,182],{},"OpenRouter()",",\n",[160,185,187],{"href":186},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fcodex",[44,188,189],{},"Codex()",") or a vendor directly:",[192,193,196],"div",{"className":194},[195],"not-prose",[30,197,198,204,205,204,211,204,217,204,223,204,229,204,235,204,241,204,247,204,253,204,259],{},[160,199,201],{"href":200},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fanthropic",[44,202,203],{},"Anthropic()"," ·\n",[160,206,208],{"href":207},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fopenai",[44,209,210],{},"OpenAI()",[160,212,214],{"href":213},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fgoogle",[44,215,216],{},"Google()",[160,218,220],{"href":219},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fxai",[44,221,222],{},"XAI()",[160,224,226],{"href":225},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fdeepseek",[44,227,228],{},"DeepSeek()",[160,230,232],{"href":231},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fmistral",[44,233,234],{},"Mistral()",[160,236,238],{"href":237},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fmoonshot",[44,239,240],{},"Moonshot()",[160,242,244],{"href":243},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fzai",[44,245,246],{},"ZAI()",[160,248,250],{"href":249},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fgroq",[44,251,252],{},"Groq()",[160,254,256],{"href":255},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fcerebras",[44,257,258],{},"Cerebras()",[160,260,262],{"href":261},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fperplexity",[44,263,264],{},"Perplexity()",[30,266,267,276],{},[125,268,269,270,165],{},"Local — ",[160,271,273],{"href":272},"\u002Fdocs\u002Fv2\u002Fproviders\u002Follama",[44,274,275],{},"Ollama()"," Inference on your own hardware. No API\ncosts, and nothing leaves your machine — the strongest privacy posture available. The\nterminal manages the server and model downloads for you.",[30,278,279,280,288,289,293],{},"And one for the test suite: ",[125,281,282],{},[160,283,285],{"href":284},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fmock",[44,286,287],{},"Mock()"," replaces inference with\na deterministic local responder. The full loop still runs — tool calls execute, context\naccumulates — which is what makes ",[160,290,292],{"href":291},"\u002Fdocs\u002Fv2\u002Fagent\u002Ftesting","agent tests"," fast, free, and\nrepeatable.",[114,295,297],{"id":296},"declaring-more-than-one","Declaring more than one",[30,299,300],{},"Most setups have several. A local model for the cheap roles, a frontier route for the\nhard ones, managed inference to cover whatever is left:",[37,302,304],{"className":39,"code":303,"language":41,"meta":42,"style":42},"export default defineProfile({\n    providers: [Ollama(), Anthropic(), Axon()],\n})\n",[44,305,306,316,334],{"__ignoreMap":42},[47,307,308,310,312,314],{"class":49,"line":50},[47,309,61],{"class":60},[47,311,64],{"class":60},[47,313,68],{"class":67},[47,315,72],{"class":71},[47,317,318,320,322,324,326,328,330,332],{"class":49,"line":57},[47,319,79],{"class":78},[47,321,82],{"class":71},[47,323,91],{"class":67},[47,325,88],{"class":71},[47,327,85],{"class":67},[47,329,88],{"class":71},[47,331,96],{"class":67},[47,333,99],{"class":71},[47,335,336],{"class":49,"line":75},[47,337,105],{"class":71},[30,339,340,343,344,346,347,349,350,352,353,356],{},[125,341,342],{},"Order is preference."," When one model is reachable through several of your providers —\nClaude Sonnet is available on ",[44,345,203],{},", ",[44,348,182],{}," and ",[44,351,111],{}," — the one you\nlisted first wins. That is what makes ",[44,354,355],{},"[Anthropic(), Axon()]"," mean \"my key first, managed\nas the fallback\".",[30,358,359,360,363,364,368],{},"Order only ever breaks a tie between candidates that ",[125,361,362],{},"all"," satisfy the role. It can\nnever make an unusable model usable, and it never overrides a local model, which always\nranks first. ",[160,365,367],{"href":366},"\u002Fdocs\u002Fv2\u002Fproviders\u002Fbehaviour","Behaviour"," is the full account.",[114,370,372],{"id":371},"credentials","Credentials",[30,374,375,376,379,380,383,384,387],{},"Every factory takes the same options: ",[44,377,378],{},"key"," for your own credential, ",[44,381,382],{},"url"," for a\nself-hosted or regional endpoint, ",[44,385,386],{},"slots"," to cap concurrent calls.",[37,389,391],{"className":39,"code":390,"language":41,"meta":42,"style":42},"type ProviderOptions = {\n    \u002F** Your own credential, instead of the environment or your account vault. *\u002F\n    key?: string\n    \u002F** Endpoint override — self-hosted daemons, regional endpoints, proxies. *\u002F\n    url?: string\n    \u002F** Ceiling on concurrent calls a fanned-out role may spend here. *\u002F\n    slots?: number\n}\n",[44,392,393,406,411,422,427,437,443,454],{"__ignoreMap":42},[47,394,395,399,403],{"class":49,"line":50},[47,396,398],{"class":397},"scz_3","type",[47,400,402],{"class":401},"sNl3T"," ProviderOptions",[47,404,405],{"class":71}," = {\n",[47,407,408],{"class":49,"line":57},[47,409,410],{"class":53},"    \u002F** Your own credential, instead of the environment or your account vault. *\u002F\n",[47,412,413,416,419],{"class":49,"line":75},[47,414,415],{"class":78},"    key",[47,417,418],{"class":71},"?: ",[47,420,421],{"class":401},"string\n",[47,423,424],{"class":49,"line":102},[47,425,426],{"class":53},"    \u002F** Endpoint override — self-hosted daemons, regional endpoints, proxies. *\u002F\n",[47,428,430,433,435],{"class":49,"line":429},5,[47,431,432],{"class":78},"    url",[47,434,418],{"class":71},[47,436,421],{"class":401},[47,438,440],{"class":49,"line":439},6,[47,441,442],{"class":53},"    \u002F** Ceiling on concurrent calls a fanned-out role may spend here. *\u002F\n",[47,444,446,449,451],{"class":49,"line":445},7,[47,447,448],{"class":78},"    slots",[47,450,418],{"class":71},[47,452,453],{"class":401},"number\n",[47,455,457],{"class":49,"line":456},8,[47,458,459],{"class":71},"}\n",[30,461,462],{},"Where a key comes from when you do not pass one depends on the provider:",[464,465,466,478],"table",{},[467,468,469],"thead",{},[470,471,472,475],"tr",{},[473,474],"th",{},[473,476,477],{},"Credential",[479,480,481,491,502,510],"tbody",{},[470,482,483,488],{},[484,485,486],"td",{},[44,487,111],{},[484,489,490],{},"Your signed-in session. Nothing to set",[470,492,493,499],{},[484,494,495,346,497],{},[44,496,189],{},[44,498,182],{},[484,500,501],{},"Your account vault — connect once, works on every machine you sign in from",[470,503,504,507],{},[484,505,506],{},"Direct vendors",[484,508,509],{},"An environment variable, named on each provider's page",[470,511,512,518],{},[484,513,514,346,516],{},[44,515,275],{},[44,517,287],{},[484,519,520],{},"None",[30,522,523],{},"A provider you declared but never configured is not an error. Declaring one is a\nstatement about what you have, not a promise that it is set up — the failure comes when\nsomething tries to use it, naming the variable you need to set.",[114,525,527],{"id":526},"picking-a-model","Picking a model",[30,529,530,531,534,535,538],{},"You do not have to. If you want to, ",[44,532,533],{},"model:"," on the agent is a ",[125,536,537],{},"preference"," applied to\nthe cognet's primary role:",[37,540,542],{"className":39,"code":541,"language":41,"meta":42,"style":42},"export default defineAgent({ model: \"anthropic:claude-sonnet-4-6\" })\n",[44,543,544],{"__ignoreMap":42},[47,545,546,548,550,553,556,558,562],{"class":49,"line":50},[47,547,61],{"class":60},[47,549,64],{"class":60},[47,551,552],{"class":67}," defineAgent",[47,554,555],{"class":71},"({ ",[47,557,533],{"class":78},[47,559,561],{"class":560},"sKc5r"," \"anthropic:claude-sonnet-4-6\"",[47,563,564],{"class":71}," })\n",[30,566,567,568,571,572,575],{},"The ",[44,569,570],{},"provider:model"," form pins the route as well as the model; a bare ",[44,573,574],{},"claude-sonnet-4-6","\nnames the model and lets your provider order choose how to reach it. Either way it is a\npreference: a pin naming something you cannot supply falls back to ranking and tells you\nit did, rather than refusing to boot.",[30,577,578,579,582,583,165],{},"Press ",[44,580,581],{},"*"," in the terminal to override the model for the current session. See\n",[160,584,586],{"href":585},"\u002Fdocs\u002Fv2\u002Ftui\u002Fmodels","Models",[588,589,591],"alert",{"type":590},"warning",[30,592,593,599,600,603,604,606,607,165],{},[125,594,595,598],{},[44,596,597],{},"engine:"," is removed."," It named one model for a whole agent, which could not survive a\ncognet declaring several roles. Sources move to your profile's ",[44,601,602],{},"providers:","; a model\npreference becomes ",[44,605,533],{},". See ",[160,608,610],{"href":609},"\u002Fdocs\u002Fv2\u002Fagent\u002Fconfig#providers","defineAgent",[612,613,614],"style",{},"html pre.shiki code .sOLPB, html code.shiki .sOLPB{--shiki-default:#6A9955}html pre.shiki code .sYbnZ, html code.shiki .sYbnZ{--shiki-default:#C586C0}html pre.shiki code .sCudf, html code.shiki .sCudf{--shiki-default:#DCDCAA}html pre.shiki code .sTNBD, html code.shiki .sTNBD{--shiki-default:#D4D4D4}html pre.shiki code .s3F5K, html code.shiki .s3F5K{--shiki-default:#9CDCFE}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html pre.shiki code .scz_3, html code.shiki .scz_3{--shiki-default:#569CD6}html pre.shiki code .sNl3T, html code.shiki .sNl3T{--shiki-default:#4EC9B0}html pre.shiki code .sKc5r, html code.shiki .sKc5r{--shiki-default:#CE9178}",{"title":42,"searchDepth":57,"depth":57,"links":616},[617,618,619,620,621],{"id":116,"depth":57,"text":117},{"id":149,"depth":57,"text":150},{"id":296,"depth":57,"text":297},{"id":371,"depth":57,"text":372},{"id":526,"depth":57,"text":527},"Declare the providers you have, let a cognet declare the roles it needs, and the runtime matches them at boot. That is the whole setup.","md",{},"\u002Fdocs\u002Fv2\u002Fproviders",{"title":21,"description":622},"docs\u002Fv2\u002Fproviders\u002Findex","ExX723oTEaAgsLpbdUuig5sWr3x_-NFg2H_1wgr5mao",1788121884459]