diff --git a/_pagefind/fragment/en_9b3cc5b.pf_fragment b/_pagefind/fragment/en_9b3cc5b.pf_fragment deleted file mode 100644 index fba6b86c..00000000 Binary files a/_pagefind/fragment/en_9b3cc5b.pf_fragment and /dev/null differ diff --git a/_pagefind/fragment/en_c2457d2.pf_fragment b/_pagefind/fragment/en_c2457d2.pf_fragment new file mode 100644 index 00000000..dacce6fd Binary files /dev/null and b/_pagefind/fragment/en_c2457d2.pf_fragment differ diff --git a/_pagefind/index/en_5c79efa.pf_index b/_pagefind/index/en_5c79efa.pf_index new file mode 100644 index 00000000..c92563c2 Binary files /dev/null and b/_pagefind/index/en_5c79efa.pf_index differ diff --git a/_pagefind/index/en_6f79a4e.pf_index b/_pagefind/index/en_6f79a4e.pf_index deleted file mode 100644 index cfb34627..00000000 Binary files a/_pagefind/index/en_6f79a4e.pf_index and /dev/null differ diff --git a/_pagefind/index/en_8466d5c.pf_index b/_pagefind/index/en_8466d5c.pf_index deleted file mode 100644 index 52983837..00000000 Binary files a/_pagefind/index/en_8466d5c.pf_index and /dev/null differ diff --git a/_pagefind/index/en_ebcef13.pf_index b/_pagefind/index/en_ebcef13.pf_index new file mode 100644 index 00000000..4fc13805 Binary files /dev/null and b/_pagefind/index/en_ebcef13.pf_index differ diff --git a/_pagefind/pagefind-entry.json b/_pagefind/pagefind-entry.json index d1f4b00b..9465d178 100644 --- a/_pagefind/pagefind-entry.json +++ b/_pagefind/pagefind-entry.json @@ -1 +1 @@ -{"version":"1.5.2","languages":{"en":{"hash":"en_a84379fe9c","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file +{"version":"1.5.2","languages":{"en":{"hash":"en_828355c1b8","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]} \ No newline at end of file diff --git a/_pagefind/pagefind.en_828355c1b8.pf_meta b/_pagefind/pagefind.en_828355c1b8.pf_meta new file mode 100644 index 00000000..c041e60f Binary files /dev/null and b/_pagefind/pagefind.en_828355c1b8.pf_meta differ diff --git a/_pagefind/pagefind.en_a84379fe9c.pf_meta b/_pagefind/pagefind.en_a84379fe9c.pf_meta deleted file mode 100644 index d8689099..00000000 Binary files a/_pagefind/pagefind.en_a84379fe9c.pf_meta and /dev/null differ diff --git a/advanced/json-output/index.html b/advanced/json-output/index.html index 6d4abc69..64ace359 100644 --- a/advanced/json-output/index.html +++ b/advanced/json-output/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/subagents/index.html b/advanced/subagents/index.html index 9f3f648d..06aa2c5f 100644 --- a/advanced/subagents/index.html +++ b/advanced/subagents/index.html @@ -7,7 +7,7 @@ - + diff --git a/advanced/testing/index.html b/advanced/testing/index.html index bcfb6076..cd83a011 100644 --- a/advanced/testing/index.html +++ b/advanced/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/assets/index-39SlNbn6.js b/assets/index-Caxbfw96.js similarity index 99% rename from assets/index-39SlNbn6.js rename to assets/index-Caxbfw96.js index 1b0f04f0..74f40c5e 100644 --- a/assets/index-39SlNbn6.js +++ b/assets/index-Caxbfw96.js @@ -55,7 +55,7 @@ ${d}`}return h}async function Gh(u,h,d,c){var M,O,C;const v=await fetch("https:/ ${b.content}`).join(` `))??ct.map(b=>`- ${b.title}${b.description?": "+b.description:""}`).join(` -`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function c0({allPages:u,onNavigate:h,onClose:d,mobile:c}){const[v,E]=w.useState(""),[M,O]=w.useState([]),[C,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ih().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Dt=w.useCallback(async W=>{var ct;if(!W.trim()){O([]),y(0);return}const I=ul;if(I)try{const Q=await I.search(W),Y=[];for(const H of Q.results.slice(0,8)){const U=await H.data(),lt=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:lt,title:((ct=U.meta)==null?void 0:ct.title)||lt,excerpt:U.excerpt||void 0})}O(Y),y(0);return}catch{}O(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Dt(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Dt]);const jt=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,M.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&M.length>0&&(W.preventDefault(),h(M[C].id))},[M,C,h]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:jt,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),M.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:M.map((W,I)=>s.jsxs("button",{onClick:()=>h(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===C?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!M.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&M.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,h,d){let c=u;h&&c.startsWith(h)&&(c=c.slice(h.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(M=>M.id===v)?v:null}function f0(u,h,d){const c=d.find(v=>v.id===u);return c?h+c.urlPath:h+"/"+u}class d0 extends Error{constructor(h){super(`Page not found: ${h}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class m0 extends Error{constructor(h,d){super(`Failed to load page: ${h}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function p0(u,h){if(!u||!h)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${h}`}function h0(u,h,d,c,v){var O;const E=v(u,c,d);if(E)return E;const M=h.startsWith("#")?h.slice(1):h;return M&&d.some(C=>C.id===M)?M:((O=d[0])==null?void 0:O.id)||"index"}async function fm(u,h,d){const c=h.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new m0(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new d0(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function g0(u,h){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T14:41:35+03:00"}],v0=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,y0={"advanced/json-output":()=>Lt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>Lt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>Lt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>Lt(()=>import("./commands-CjvM1xle.js"),[]),"cli/flags":()=>Lt(()=>import("./flags-DBc7n5J6.js"),[]),configuration:()=>Lt(()=>import("./configuration-BOyO9N_c.js"),[]),development:()=>Lt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>Lt(()=>import("./capabilities-VpEmfPck.js"),[]),"extensions/examples":()=>Lt(()=>import("./examples-Dd5WMq-L.js"),[]),"extensions/loading":()=>Lt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>Lt(()=>import("./overview-BRtZenVZ.js"),[]),"extensions/testing":()=>Lt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>Lt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>Lt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>Lt(()=>import("./providers-C6IbA7eV.js"),[]),"quick-start":()=>Lt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>Lt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>Lt(()=>import("./options-C2ZyqtaF.js"),[]),"sdk/overview":()=>Lt(()=>import("./overview-C9sBcRua.js"),[]),"sdk/sessions":()=>Lt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>Lt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>Lt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const h=y0[u];if(!h)throw new Error("Unknown page: "+u);return h()}const b0=[{id:"advanced/json-output",title:"JSON Output",content:` +`)}),Ut&&s.jsx("div",{onClick:()=>Ze(null),style:{position:"fixed",inset:0,zIndex:9999,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(0,0,0,0.7)",backdropFilter:"blur(8px)",cursor:"zoom-out"},children:s.jsx("img",{src:Ut,alt:"",style:{maxWidth:"90vw",maxHeight:"90vh",objectFit:"contain",borderRadius:4,boxShadow:"0 16px 64px rgba(0,0,0,0.4)"}})})]})}function c0({allPages:u,onNavigate:h,onClose:d,mobile:c}){const[v,E]=w.useState(""),[M,O]=w.useState([]),[C,y]=w.useState(0),[G,R]=w.useState(null),K=w.useRef(null),nt=w.useRef(void 0);w.useEffect(()=>{Ih().then(W=>R(!!W)),setTimeout(()=>{var W;return(W=K.current)==null?void 0:W.focus()},50)},[]);const xt=w.useCallback(W=>{if(!W.trim())return[];const I=W.toLowerCase();return u.filter(ct=>ct.title.toLowerCase().includes(I)||(ct.description||"").toLowerCase().includes(I)).slice(0,8).map(ct=>({id:ct.id,title:ct.title,excerpt:ct.description}))},[u]),Dt=w.useCallback(async W=>{var ct;if(!W.trim()){O([]),y(0);return}const I=ul;if(I)try{const Q=await I.search(W),Y=[];for(const H of Q.results.slice(0,8)){const U=await H.data(),lt=(U.url||"").replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"")||"index";Y.push({id:lt,title:((ct=U.meta)==null?void 0:ct.title)||lt,excerpt:U.excerpt||void 0})}O(Y),y(0);return}catch{}O(xt(W)),y(0)},[xt]);w.useEffect(()=>(nt.current&&clearTimeout(nt.current),nt.current=setTimeout(()=>Dt(v),120),()=>{nt.current&&clearTimeout(nt.current)}),[v,Dt]);const jt=w.useCallback(W=>{W.key==="ArrowDown"?(W.preventDefault(),y(I=>Math.min(I+1,M.length-1))):W.key==="ArrowUp"?(W.preventDefault(),y(I=>Math.max(I-1,0))):W.key==="Enter"&&M.length>0&&(W.preventDefault(),h(M[C].id))},[M,C,h]);return s.jsx("div",{onClick:d,style:{position:"fixed",inset:0,zIndex:1e3,background:"rgba(0,0,0,0.55)",backdropFilter:"blur(6px)",display:"flex",alignItems:c?"stretch":"flex-start",justifyContent:"center",paddingTop:c?0:"12vh"},children:s.jsxs("div",{onClick:W=>W.stopPropagation(),style:{background:"var(--sf)",border:c?"none":"1px solid var(--bd)",borderRadius:c?0:2,width:"100%",maxWidth:c?"100%":520,boxShadow:c?"none":"0 24px 80px rgba(0,0,0,0.4)",overflow:"hidden",display:"flex",flexDirection:"column",...c?{height:"100%"}:{}},children:[s.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10,padding:"14px 18px",borderBottom:"1px solid var(--bd)"},children:[s.jsx(rm,{}),s.jsx("input",{ref:K,value:v,onChange:W=>E(W.target.value),onKeyDown:jt,placeholder:"Search documentation...",style:{flex:1,background:"none",border:"none",outline:"none",color:"var(--tx)",fontSize:15,fontFamily:"var(--font-body)"}}),s.jsx("kbd",{style:{fontFamily:"var(--font-code)",fontSize:10,color:"var(--txM)",background:"var(--cdBg)",padding:"2px 6px",borderRadius:2,border:"1px solid var(--bd)"},children:"ESC"})]}),M.length>0&&s.jsx("div",{style:{padding:6,maxHeight:c?"none":360,overflow:"auto",flex:c?1:void 0},children:M.map((W,I)=>s.jsxs("button",{onClick:()=>h(W.id),style:{display:"block",width:"100%",textAlign:"left",background:I===C?"var(--acD)":"none",border:"none",borderRadius:2,padding:"10px 14px",cursor:"pointer",color:"var(--tx)",fontFamily:"var(--font-body)"},onMouseEnter:()=>y(I),children:[s.jsx("div",{style:{fontWeight:500,fontSize:14,marginBottom:2},children:W.title}),W.excerpt&&s.jsx("div",{style:{fontSize:12,color:"var(--txM)",lineHeight:1.3},dangerouslySetInnerHTML:{__html:W.excerpt}})]},W.id+I))}),v&&!M.length&&s.jsx("div",{style:{padding:"32px 18px",textAlign:"center",color:"var(--txM)",fontSize:14},children:"No results found"}),G===!1&&v&&M.length>0&&s.jsx("div",{style:{padding:"6px 18px 10px",fontSize:11,color:"var(--txM)",textAlign:"center"},children:"Showing title matches. Build your site for full-text search."})]})})}function cm(u,h,d){let c=u;h&&c.startsWith(h)&&(c=c.slice(h.length));const v=c.replace(/^\//,"").replace(/\/index\.html$/,"").replace(/\.html$/,"").replace(/\/$/,"")||"index";return d.find(M=>M.id===v)?v:null}function f0(u,h,d){const c=d.find(v=>v.id===u);return c?h+c.urlPath:h+"/"+u}class d0 extends Error{constructor(h){super(`Page not found: ${h}`),this.code="PAGE_NOT_FOUND",this.name="PageNotFoundError"}}class m0 extends Error{constructor(h,d){super(`Failed to load page: ${h}`),this.code="PAGE_LOAD_ERROR",this.name="PageLoadError",d&&(this.cause=d)}}function p0(u,h){if(!u||!h)return;const{repo:d,branch:c="main",dir:v=""}=u,E=v?`${v.replace(/\/$/,"")}/`:"";return`https://github.com/${d}/edit/${c}/${E}${h}`}function h0(u,h,d,c,v){var O;const E=v(u,c,d);if(E)return E;const M=h.startsWith("#")?h.slice(1):h;return M&&d.some(C=>C.id===M)?M:((O=d[0])==null?void 0:O.id)||"index"}async function fm(u,h,d){const c=h.find(E=>E.id===u);let v;try{v=await d(u)}catch(E){throw new m0(u,E)}if(c!=null&&c.isMdx&&v.meta)return{isMdx:!0,component:v.default,frontmatter:v.meta.frontmatter,headings:v.meta.headings};if(!v.default)throw new d0(u);return v.isApiReference&&v.apiManifest?{isMdx:!1,isApiReference:!0,...v.default,apiManifest:v.apiManifest}:v.isChangelog&&v.changelogEntries?{isMdx:!1,...v.default,changelogEntries:v.changelogEntries}:{isMdx:!1,...v.default}}function g0(u,h){return(u==null?void 0:u.version)||void 0}const Jn={name:"Kit",logo:"/logo.jpg",favicon:"/logo.jpg",baseUrl:"https://go-kit.dev",theme:{preset:"cipher",accent:"#e03030",mode:"dark",fonts:{heading:"Space Grotesk",body:"Space Grotesk",code:"Source Code Pro"}},navigation:[{group:"Getting Started",pages:["index","installation","quick-start"]},{group:"Configuration",pages:["configuration","providers","themes"]},{group:"CLI Reference",pages:["cli/flags","cli/commands"]},{group:"Extensions",pages:["extensions/overview","extensions/capabilities","extensions/examples","extensions/loading","extensions/testing"]},{group:"Sessions",pages:["sessions"]},{group:"Go SDK",pages:["sdk/overview","sdk/options","sdk/callbacks","sdk/sessions"]},{group:"Advanced",pages:["advanced/subagents","advanced/json-output","advanced/testing"]},{group:"Development",pages:["development"]}],search:{provider:"local"},toc:{enabled:!0,depth:3},math:!1,strictLinks:!1,lastUpdated:!0,redirects:[],socialLinks:[{platform:"github",url:"https://github.com/mark3labs/kit"},{platform:"discord",url:"https://discord.gg/RqSS2NQVsY"}]},Wn=[{id:"advanced/json-output",filePath:"advanced/json-output.md",urlPath:"/advanced/json-output",frontmatter:{title:"JSON Output",description:"Machine-readable JSON output for scripting and automation.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"advanced/subagents",filePath:"advanced/subagents.md",urlPath:"/advanced/subagents",frontmatter:{title:"Subagents",description:"Multi-agent orchestration with Kit subagents.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"advanced/testing",filePath:"advanced/testing.md",urlPath:"/advanced/testing",frontmatter:{title:"Testing with tmux",description:"Test Kit's TUI non-interactively using tmux.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"cli/commands",filePath:"cli/commands.md",urlPath:"/cli/commands",frontmatter:{title:"Commands",description:"Complete reference for all Kit CLI subcommands.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"cli/flags",filePath:"cli/flags.md",urlPath:"/cli/flags",frontmatter:{title:"Global Flags",description:"Complete reference for all Kit CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"configuration",filePath:"configuration.md",urlPath:"/configuration",frontmatter:{title:"Configuration",description:"Configure Kit using config files, environment variables, and CLI flags.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"development",filePath:"development.md",urlPath:"/development",frontmatter:{title:"Development",description:"Build, test, and contribute to Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"extensions/capabilities",filePath:"extensions/capabilities.md",urlPath:"/extensions/capabilities",frontmatter:{title:"Capabilities",description:"All extension capabilities — lifecycle events, tools, commands, widgets, and more.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"extensions/examples",filePath:"extensions/examples.md",urlPath:"/extensions/examples",frontmatter:{title:"Examples",description:"Catalog of example extensions included with Kit.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"extensions/loading",filePath:"extensions/loading.md",urlPath:"/extensions/loading",frontmatter:{title:"Loading Extensions",description:"How Kit discovers and loads extensions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"extensions/overview",filePath:"extensions/overview.md",urlPath:"/extensions/overview",frontmatter:{title:"Extension System",description:"Overview of Kit's Go-based extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"extensions/testing",filePath:"extensions/testing.md",urlPath:"/extensions/testing",frontmatter:{title:"Testing Extensions",description:"Write unit tests for your Kit extensions using the test package.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"index",filePath:"index.md",urlPath:"/",frontmatter:{title:"Kit",description:"Kit is a powerful, extensible AI coding agent CLI with multi-provider support, built-in tools, and a rich extension system.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"installation",filePath:"installation.md",urlPath:"/installation",frontmatter:{title:"Installation",description:"Install Kit using npm, bun, pnpm, Go, or build from source.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"providers",filePath:"providers.md",urlPath:"/providers",frontmatter:{title:"Providers",description:"Supported LLM providers and model configuration.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"quick-start",filePath:"quick-start.md",urlPath:"/quick-start",frontmatter:{title:"Quick Start",description:"Get up and running with Kit in minutes.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"sdk/callbacks",filePath:"sdk/callbacks.md",urlPath:"/sdk/callbacks",frontmatter:{title:"Callbacks",description:"Monitor tool calls and streaming output with the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"sdk/options",filePath:"sdk/options.md",urlPath:"/sdk/options",frontmatter:{title:"SDK Options",description:"Configuration options for the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"sdk/overview",filePath:"sdk/overview.md",urlPath:"/sdk/overview",frontmatter:{title:"Go SDK",description:"Embed Kit in your Go applications.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"sdk/sessions",filePath:"sdk/sessions.md",urlPath:"/sdk/sessions",frontmatter:{title:"SDK Sessions",description:"Session management in the Kit Go SDK.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"sessions",filePath:"sessions.md",urlPath:"/sessions",frontmatter:{title:"Session Management",description:"How Kit persists and manages conversation sessions.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"},{id:"themes",filePath:"themes.md",urlPath:"/themes",frontmatter:{title:"Themes",description:"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.",hidden:!1,draft:!1},isMdx:!1,lastUpdated:"2026-06-02T15:21:48+03:00"}],v0=[{section:"Getting Started",pages:[{title:"Kit",id:"index",urlPath:"/"},{title:"Installation",id:"installation",urlPath:"/installation"},{title:"Quick Start",id:"quick-start",urlPath:"/quick-start"}]},{section:"Configuration",pages:[{title:"Configuration",id:"configuration",urlPath:"/configuration"},{title:"Providers",id:"providers",urlPath:"/providers"},{title:"Themes",id:"themes",urlPath:"/themes"}]},{section:"CLI Reference",pages:[{title:"Global Flags",id:"cli/flags",urlPath:"/cli/flags"},{title:"Commands",id:"cli/commands",urlPath:"/cli/commands"}]},{section:"Extensions",pages:[{title:"Extension System",id:"extensions/overview",urlPath:"/extensions/overview"},{title:"Capabilities",id:"extensions/capabilities",urlPath:"/extensions/capabilities"},{title:"Examples",id:"extensions/examples",urlPath:"/extensions/examples"},{title:"Loading Extensions",id:"extensions/loading",urlPath:"/extensions/loading"},{title:"Testing Extensions",id:"extensions/testing",urlPath:"/extensions/testing"}]},{section:"Sessions",pages:[{title:"Session Management",id:"sessions",urlPath:"/sessions"}]},{section:"Go SDK",pages:[{title:"Go SDK",id:"sdk/overview",urlPath:"/sdk/overview"},{title:"SDK Options",id:"sdk/options",urlPath:"/sdk/options"},{title:"Callbacks",id:"sdk/callbacks",urlPath:"/sdk/callbacks"},{title:"SDK Sessions",id:"sdk/sessions",urlPath:"/sdk/sessions"}]},{section:"Advanced",pages:[{title:"Subagents",id:"advanced/subagents",urlPath:"/advanced/subagents"},{title:"JSON Output",id:"advanced/json-output",urlPath:"/advanced/json-output"},{title:"Testing with tmux",id:"advanced/testing",urlPath:"/advanced/testing"}]},{section:"Development",pages:[{title:"Development",id:"development",urlPath:"/development"}]}],Zu=null,y0={"advanced/json-output":()=>Lt(()=>import("./json-output-BiSiIPM0.js"),[]),"advanced/subagents":()=>Lt(()=>import("./subagents-lghAXYlk.js"),[]),"advanced/testing":()=>Lt(()=>import("./testing-COLNxuKj.js"),[]),"cli/commands":()=>Lt(()=>import("./commands-CjvM1xle.js"),[]),"cli/flags":()=>Lt(()=>import("./flags-DBc7n5J6.js"),[]),configuration:()=>Lt(()=>import("./configuration-BOyO9N_c.js"),[]),development:()=>Lt(()=>import("./development-E-EC7CAm.js"),[]),"extensions/capabilities":()=>Lt(()=>import("./capabilities-VpEmfPck.js"),[]),"extensions/examples":()=>Lt(()=>import("./examples-Dd5WMq-L.js"),[]),"extensions/loading":()=>Lt(()=>import("./loading-CfdMbwrl.js"),[]),"extensions/overview":()=>Lt(()=>import("./overview-BRtZenVZ.js"),[]),"extensions/testing":()=>Lt(()=>import("./testing-BjX63Hnw.js"),[]),index:()=>Lt(()=>import("./index-DjkHYQxg.js"),[]),installation:()=>Lt(()=>import("./installation-CkjlJXwY.js"),[]),providers:()=>Lt(()=>import("./providers-BpTDMUOj.js"),[]),"quick-start":()=>Lt(()=>import("./quick-start-YzNijQyU.js"),[]),"sdk/callbacks":()=>Lt(()=>import("./callbacks-DurHXbkP.js"),[]),"sdk/options":()=>Lt(()=>import("./options-C2ZyqtaF.js"),[]),"sdk/overview":()=>Lt(()=>import("./overview-C9sBcRua.js"),[]),"sdk/sessions":()=>Lt(()=>import("./sessions-CeADaXnR.js"),[]),sessions:()=>Lt(()=>import("./sessions-BR7Y7dXm.js"),[]),themes:()=>Lt(()=>import("./themes-Chyvu6J4.js"),[])};function dm(u){const h=y0[u];if(!h)throw new Error("Unknown page: "+u);return h()}const b0=[{id:"advanced/json-output",title:"JSON Output",content:` # JSON Output Use the \`--json\` flag to get structured output for scripting and automation: diff --git a/assets/providers-C6IbA7eV.js b/assets/providers-BpTDMUOj.js similarity index 82% rename from assets/providers-C6IbA7eV.js rename to assets/providers-BpTDMUOj.js index 52305c18..2420c90e 100644 --- a/assets/providers-C6IbA7eV.js +++ b/assets/providers-BpTDMUOj.js @@ -130,13 +130,62 @@ const s={frontmatter:{title:"Providers",description:"Supported LLM providers and
kit --provider-url "http://localhost:8080/v1" "Hello"

The custom/custom model has zero cost, 262K context window, and supports reasoning. It routes through the openaicompat provider and accepts any OpenAI-compatible API endpoint.

Optionally set CUSTOM_API_KEY environment variable or use --provider-api-key for endpoints requiring authentication.

+

Auto-routed providers

+

Any provider in the models.dev database can be used with the +standard provider/model format, even without a dedicated native integration. Kit +auto-routes the request through the matching wire protocol — the actual API +shape the provider speaks — rather than requiring a per-provider code path:

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Wire protocolnpm package (models.dev)Transport used
OpenAI (Responses API)@ai-sdk/openaiOpenAI
OpenAI (chat completions)@ai-sdk/openai-compatibleOpenAI-compatible
Anthropic@ai-sdk/anthropicAnthropic
Google Gemini@ai-sdk/googleGoogle
+

The provider's api URL from the database is used as the base URL. A provider +whose npm package isn't recognized but that has an api URL falls back to the +OpenAI-compatible wire.

+

Because routing follows the wire protocol, aggregator/proxy providers work across +all of their models — including ones they re-flavor onto a different protocol +via a per-model override. For example, an aggregator that proxies Claude, GPT, +and Gemini routes them to the Anthropic, OpenAI, and Google transports +respectively:

+
kit --model opencode/claude-haiku-4-5 "Hello"     # → Anthropic wire
+kit --model opencode/gpt-5 "Hello"                # → OpenAI wire
+kit --model opencode/gemini-3.5-flash "Hello"     # → Google wire
+

Provide the provider's API key the same way as any other — via its environment +variable (e.g. OPENCODE_API_KEY) or --provider-api-key.

Model database

Kit ships with a local model database that maps provider names to API configurations. You can manage it with:

kit models                   # List available models
 kit models openai            # Filter by provider
 kit models --all             # Show all providers
 kit update-models            # Update from models.dev
-kit update-models embedded   # Reset to bundled database
`,headings:[{depth:2,text:"Supported providers",id:"supported-providers"},{depth:2,text:"Model string format",id:"model-string-format"},{depth:2,text:"Model aliases",id:"model-aliases"},{depth:3,text:"Anthropic Claude",id:"anthropic-claude"},{depth:3,text:"OpenAI GPT",id:"openai-gpt"},{depth:3,text:"Google Gemini",id:"google-gemini"},{depth:2,text:"Specifying a model",id:"specifying-a-model"},{depth:2,text:"Authentication",id:"authentication"},{depth:3,text:"API keys",id:"api-keys"},{depth:3,text:"OAuth",id:"oauth"},{depth:3,text:"Custom provider URL",id:"custom-provider-url"},{depth:2,text:"Model database",id:"model-database"}],raw:` +kit update-models embedded # Reset to bundled database`,headings:[{depth:2,text:"Supported providers",id:"supported-providers"},{depth:2,text:"Model string format",id:"model-string-format"},{depth:2,text:"Model aliases",id:"model-aliases"},{depth:3,text:"Anthropic Claude",id:"anthropic-claude"},{depth:3,text:"OpenAI GPT",id:"openai-gpt"},{depth:3,text:"Google Gemini",id:"google-gemini"},{depth:2,text:"Specifying a model",id:"specifying-a-model"},{depth:2,text:"Authentication",id:"authentication"},{depth:3,text:"API keys",id:"api-keys"},{depth:3,text:"OAuth",id:"oauth"},{depth:3,text:"Custom provider URL",id:"custom-provider-url"},{depth:2,text:"Auto-routed providers",id:"auto-routed-providers"},{depth:2,text:"Model database",id:"model-database"}],raw:` # Providers Kit supports a wide range of LLM providers through a unified \`provider/model\` string format. @@ -277,6 +326,39 @@ The \`custom/custom\` model has zero cost, 262K context window, and supports rea Optionally set \`CUSTOM_API_KEY\` environment variable or use \`--provider-api-key\` for endpoints requiring authentication. +## Auto-routed providers + +Any provider in the [models.dev](https://models.dev) database can be used with the +standard \`provider/model\` format, even without a dedicated native integration. Kit +auto-routes the request through the matching **wire protocol** — the actual API +shape the provider speaks — rather than requiring a per-provider code path: + +| Wire protocol | npm package (models.dev) | Transport used | +|---------------|--------------------------|----------------| +| OpenAI (Responses API) | \`@ai-sdk/openai\` | OpenAI | +| OpenAI (chat completions) | \`@ai-sdk/openai-compatible\` | OpenAI-compatible | +| Anthropic | \`@ai-sdk/anthropic\` | Anthropic | +| Google Gemini | \`@ai-sdk/google\` | Google | + +The provider's \`api\` URL from the database is used as the base URL. A provider +whose npm package isn't recognized but that has an \`api\` URL falls back to the +OpenAI-compatible wire. + +Because routing follows the wire protocol, aggregator/proxy providers work across +**all** of their models — including ones they re-flavor onto a different protocol +via a per-model override. For example, an aggregator that proxies Claude, GPT, +*and* Gemini routes them to the Anthropic, OpenAI, and Google transports +respectively: + +\`\`\`bash +kit --model opencode/claude-haiku-4-5 "Hello" # → Anthropic wire +kit --model opencode/gpt-5 "Hello" # → OpenAI wire +kit --model opencode/gemini-3.5-flash "Hello" # → Google wire +\`\`\` + +Provide the provider's API key the same way as any other — via its environment +variable (e.g. \`OPENCODE_API_KEY\`) or \`--provider-api-key\`. + ## Model database Kit ships with a local model database that maps provider names to API configurations. You can manage it with: diff --git a/cli/commands/index.html b/cli/commands/index.html index cb955959..5d4f155a 100644 --- a/cli/commands/index.html +++ b/cli/commands/index.html @@ -7,7 +7,7 @@ - + diff --git a/cli/flags/index.html b/cli/flags/index.html index 59bfecc7..c69f375e 100644 --- a/cli/flags/index.html +++ b/cli/flags/index.html @@ -7,7 +7,7 @@ - + diff --git a/configuration/index.html b/configuration/index.html index f8a6d3c3..a48e7f48 100644 --- a/configuration/index.html +++ b/configuration/index.html @@ -7,7 +7,7 @@ - + diff --git a/development/index.html b/development/index.html index 2c95eef6..f23e8185 100644 --- a/development/index.html +++ b/development/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/capabilities/index.html b/extensions/capabilities/index.html index 0139311c..8adc1d16 100644 --- a/extensions/capabilities/index.html +++ b/extensions/capabilities/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/examples/index.html b/extensions/examples/index.html index 67b8193b..bd4123a5 100644 --- a/extensions/examples/index.html +++ b/extensions/examples/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/loading/index.html b/extensions/loading/index.html index b0759b8f..d268b140 100644 --- a/extensions/loading/index.html +++ b/extensions/loading/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/overview/index.html b/extensions/overview/index.html index b9a12690..695aa2d8 100644 --- a/extensions/overview/index.html +++ b/extensions/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/extensions/testing/index.html b/extensions/testing/index.html index 0f4f9e6b..217d7ecd 100644 --- a/extensions/testing/index.html +++ b/extensions/testing/index.html @@ -7,7 +7,7 @@ - + diff --git a/index.html b/index.html index 0ea9f35f..ddd14aa3 100644 --- a/index.html +++ b/index.html @@ -15,7 +15,7 @@ ::-webkit-scrollbar-track { background: transparent; } ::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; } - + diff --git a/installation/index.html b/installation/index.html index fb6d4aea..995da841 100644 --- a/installation/index.html +++ b/installation/index.html @@ -7,7 +7,7 @@ - + diff --git a/llms-full.txt b/llms-full.txt index b357fc52..2dd42948 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -2365,6 +2365,39 @@ The `custom/custom` model has zero cost, 262K context window, and supports reaso Optionally set `CUSTOM_API_KEY` environment variable or use `--provider-api-key` for endpoints requiring authentication. +## Auto-routed providers + +Any provider in the [models.dev](https://models.dev) database can be used with the +standard `provider/model` format, even without a dedicated native integration. Kit +auto-routes the request through the matching **wire protocol** — the actual API +shape the provider speaks — rather than requiring a per-provider code path: + +| Wire protocol | npm package (models.dev) | Transport used | +|---------------|--------------------------|----------------| +| OpenAI (Responses API) | `@ai-sdk/openai` | OpenAI | +| OpenAI (chat completions) | `@ai-sdk/openai-compatible` | OpenAI-compatible | +| Anthropic | `@ai-sdk/anthropic` | Anthropic | +| Google Gemini | `@ai-sdk/google` | Google | + +The provider's `api` URL from the database is used as the base URL. A provider +whose npm package isn't recognized but that has an `api` URL falls back to the +OpenAI-compatible wire. + +Because routing follows the wire protocol, aggregator/proxy providers work across +**all** of their models — including ones they re-flavor onto a different protocol +via a per-model override. For example, an aggregator that proxies Claude, GPT, +*and* Gemini routes them to the Anthropic, OpenAI, and Google transports +respectively: + +```bash +kit --model opencode/claude-haiku-4-5 "Hello" # → Anthropic wire +kit --model opencode/gpt-5 "Hello" # → OpenAI wire +kit --model opencode/gemini-3.5-flash "Hello" # → Google wire +``` + +Provide the provider's API key the same way as any other — via its environment +variable (e.g. `OPENCODE_API_KEY`) or `--provider-api-key`. + ## Model database Kit ships with a local model database that maps provider names to API configurations. You can manage it with: diff --git a/mcp.json b/mcp.json index 251e1fb4..40d24390 100644 --- a/mcp.json +++ b/mcp.json @@ -289,10 +289,11 @@ "API keys", "OAuth", "Custom provider URL", + "Auto-routed providers", "Model database" ], "tags": [], - "content": "\n# Providers\n\nKit supports a wide range of LLM providers through a unified `provider/model` string format.\n\n## Supported providers\n\n| Provider | Prefix | Description |\n|----------|--------|-------------|\n| **Anthropic** | `anthropic/` | Claude models (native, prompt caching, OAuth) |\n| **OpenAI** | `openai/` | GPT models |\n| **Google** | `google/` or `gemini/` | Gemini models |\n| **Ollama** | `ollama/` | Local models |\n| **Azure OpenAI** | `azure/` | Azure-hosted OpenAI |\n| **AWS Bedrock** | `bedrock/` | Bedrock models |\n| **Google Vertex** | `google-vertex-anthropic/` | Claude on Vertex AI |\n| **OpenRouter** | `openrouter/` | Multi-provider router |\n| **Vercel AI** | `vercel/` | Vercel AI SDK models |\n| **Custom** | `custom/` | Any OpenAI-compatible endpoint |\n| **Auto-routed** | any | Any provider from the models.dev database |\n\n## Model string format\n\n```bash\nprovider/model # Standard format\nanthropic/claude-sonnet-latest\nopenai/gpt-4o\nollama/llama3\ngoogle/gemini-2.5-flash\n```\n\n## Model aliases\n\nKit provides aliases for commonly used models:\n\n### Anthropic Claude\n\n```bash\nclaude-opus-latest → claude-opus-4-6\nclaude-sonnet-latest → claude-sonnet-4-6\nclaude-haiku-latest → claude-haiku-4-5\nclaude-4-opus-latest → claude-opus-4-6\nclaude-4-sonnet-latest → claude-sonnet-4-6\nclaude-4-haiku-latest → claude-haiku-4-5\nclaude-3-7-sonnet-latest → claude-3-7-sonnet-20250219\nclaude-3-5-sonnet-latest → claude-3-5-sonnet-20241022\nclaude-3-5-haiku-latest → claude-3-5-haiku-20241022\nclaude-3-opus-latest → claude-3-opus-20240229\n```\n\n### OpenAI GPT\n\n```bash\no1-latest → o1\no3-latest → o3\no4-latest → o4-mini\ngpt-5-latest → gpt-5.4\ngpt-5-chat-latest → gpt-5.4\ngpt-4-latest → gpt-4o\ngpt-4 → gpt-4o\ngpt-3.5-latest → gpt-3.5-turbo\ngpt-3.5 → gpt-3.5-turbo\ncodex-latest → codex-mini-latest\n```\n\n### Google Gemini\n\n```bash\ngemini-pro-latest → gemini-2.5-pro\ngemini-flash-latest → gemini-2.5-flash\ngemini-flash → gemini-2.5-flash\ngemini-pro → gemini-2.5-pro\n```\n\n## Specifying a model\n\nVia CLI flag:\n\n```bash\nkit --model openai/gpt-4o\nkit -m ollama/llama3\n```\n\nVia config file:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\n```\n\nVia environment variable:\n\n```bash\nexport KIT_MODEL=\"google/gemini-2.0-flash-exp\"\n```\n\n## Authentication\n\n### API keys\n\nSet the appropriate environment variable for your provider:\n\n```bash\nexport ANTHROPIC_API_KEY=\"sk-...\"\nexport OPENAI_API_KEY=\"sk-...\"\nexport GOOGLE_API_KEY=\"...\"\n```\n\nOr pass it directly:\n\n```bash\nkit --provider-api-key \"sk-...\" --model openai/gpt-4o\n```\n\n### OAuth\n\nFor providers that support OAuth (e.g., Anthropic):\n\n```bash\nkit auth login anthropic # Start OAuth flow\nkit auth status # Check authentication status\nkit auth logout anthropic # Remove credentials\n```\n\n### Custom provider URL\n\nFor self-hosted or proxy endpoints:\n\n```bash\nkit --provider-url \"https://my-proxy.example.com/v1\" --model openai/gpt-4o\n```\n\nWhen `--provider-url` is provided without `--model`, Kit automatically defaults to `custom/custom`:\n\n```bash\nkit --provider-url \"http://localhost:8080/v1\" \"Hello\"\n```\n\nThe `custom/custom` model has zero cost, 262K context window, and supports reasoning. It routes through the `openaicompat` provider and accepts any OpenAI-compatible API endpoint.\n\nOptionally set `CUSTOM_API_KEY` environment variable or use `--provider-api-key` for endpoints requiring authentication.\n\n## Model database\n\nKit ships with a local model database that maps provider names to API configurations. You can manage it with:\n\n```bash\nkit models # List available models\nkit models openai # Filter by provider\nkit models --all # Show all providers\nkit update-models # Update from models.dev\nkit update-models embedded # Reset to bundled database\n```\n" + "content": "\n# Providers\n\nKit supports a wide range of LLM providers through a unified `provider/model` string format.\n\n## Supported providers\n\n| Provider | Prefix | Description |\n|----------|--------|-------------|\n| **Anthropic** | `anthropic/` | Claude models (native, prompt caching, OAuth) |\n| **OpenAI** | `openai/` | GPT models |\n| **Google** | `google/` or `gemini/` | Gemini models |\n| **Ollama** | `ollama/` | Local models |\n| **Azure OpenAI** | `azure/` | Azure-hosted OpenAI |\n| **AWS Bedrock** | `bedrock/` | Bedrock models |\n| **Google Vertex** | `google-vertex-anthropic/` | Claude on Vertex AI |\n| **OpenRouter** | `openrouter/` | Multi-provider router |\n| **Vercel AI** | `vercel/` | Vercel AI SDK models |\n| **Custom** | `custom/` | Any OpenAI-compatible endpoint |\n| **Auto-routed** | any | Any provider from the models.dev database |\n\n## Model string format\n\n```bash\nprovider/model # Standard format\nanthropic/claude-sonnet-latest\nopenai/gpt-4o\nollama/llama3\ngoogle/gemini-2.5-flash\n```\n\n## Model aliases\n\nKit provides aliases for commonly used models:\n\n### Anthropic Claude\n\n```bash\nclaude-opus-latest → claude-opus-4-6\nclaude-sonnet-latest → claude-sonnet-4-6\nclaude-haiku-latest → claude-haiku-4-5\nclaude-4-opus-latest → claude-opus-4-6\nclaude-4-sonnet-latest → claude-sonnet-4-6\nclaude-4-haiku-latest → claude-haiku-4-5\nclaude-3-7-sonnet-latest → claude-3-7-sonnet-20250219\nclaude-3-5-sonnet-latest → claude-3-5-sonnet-20241022\nclaude-3-5-haiku-latest → claude-3-5-haiku-20241022\nclaude-3-opus-latest → claude-3-opus-20240229\n```\n\n### OpenAI GPT\n\n```bash\no1-latest → o1\no3-latest → o3\no4-latest → o4-mini\ngpt-5-latest → gpt-5.4\ngpt-5-chat-latest → gpt-5.4\ngpt-4-latest → gpt-4o\ngpt-4 → gpt-4o\ngpt-3.5-latest → gpt-3.5-turbo\ngpt-3.5 → gpt-3.5-turbo\ncodex-latest → codex-mini-latest\n```\n\n### Google Gemini\n\n```bash\ngemini-pro-latest → gemini-2.5-pro\ngemini-flash-latest → gemini-2.5-flash\ngemini-flash → gemini-2.5-flash\ngemini-pro → gemini-2.5-pro\n```\n\n## Specifying a model\n\nVia CLI flag:\n\n```bash\nkit --model openai/gpt-4o\nkit -m ollama/llama3\n```\n\nVia config file:\n\n```yaml\nmodel: anthropic/claude-sonnet-latest\n```\n\nVia environment variable:\n\n```bash\nexport KIT_MODEL=\"google/gemini-2.0-flash-exp\"\n```\n\n## Authentication\n\n### API keys\n\nSet the appropriate environment variable for your provider:\n\n```bash\nexport ANTHROPIC_API_KEY=\"sk-...\"\nexport OPENAI_API_KEY=\"sk-...\"\nexport GOOGLE_API_KEY=\"...\"\n```\n\nOr pass it directly:\n\n```bash\nkit --provider-api-key \"sk-...\" --model openai/gpt-4o\n```\n\n### OAuth\n\nFor providers that support OAuth (e.g., Anthropic):\n\n```bash\nkit auth login anthropic # Start OAuth flow\nkit auth status # Check authentication status\nkit auth logout anthropic # Remove credentials\n```\n\n### Custom provider URL\n\nFor self-hosted or proxy endpoints:\n\n```bash\nkit --provider-url \"https://my-proxy.example.com/v1\" --model openai/gpt-4o\n```\n\nWhen `--provider-url` is provided without `--model`, Kit automatically defaults to `custom/custom`:\n\n```bash\nkit --provider-url \"http://localhost:8080/v1\" \"Hello\"\n```\n\nThe `custom/custom` model has zero cost, 262K context window, and supports reasoning. It routes through the `openaicompat` provider and accepts any OpenAI-compatible API endpoint.\n\nOptionally set `CUSTOM_API_KEY` environment variable or use `--provider-api-key` for endpoints requiring authentication.\n\n## Auto-routed providers\n\nAny provider in the [models.dev](https://models.dev) database can be used with the\nstandard `provider/model` format, even without a dedicated native integration. Kit\nauto-routes the request through the matching **wire protocol** — the actual API\nshape the provider speaks — rather than requiring a per-provider code path:\n\n| Wire protocol | npm package (models.dev) | Transport used |\n|---------------|--------------------------|----------------|\n| OpenAI (Responses API) | `@ai-sdk/openai` | OpenAI |\n| OpenAI (chat completions) | `@ai-sdk/openai-compatible` | OpenAI-compatible |\n| Anthropic | `@ai-sdk/anthropic` | Anthropic |\n| Google Gemini | `@ai-sdk/google` | Google |\n\nThe provider's `api` URL from the database is used as the base URL. A provider\nwhose npm package isn't recognized but that has an `api` URL falls back to the\nOpenAI-compatible wire.\n\nBecause routing follows the wire protocol, aggregator/proxy providers work across\n**all** of their models — including ones they re-flavor onto a different protocol\nvia a per-model override. For example, an aggregator that proxies Claude, GPT,\n*and* Gemini routes them to the Anthropic, OpenAI, and Google transports\nrespectively:\n\n```bash\nkit --model opencode/claude-haiku-4-5 \"Hello\" # → Anthropic wire\nkit --model opencode/gpt-5 \"Hello\" # → OpenAI wire\nkit --model opencode/gemini-3.5-flash \"Hello\" # → Google wire\n```\n\nProvide the provider's API key the same way as any other — via its environment\nvariable (e.g. `OPENCODE_API_KEY`) or `--provider-api-key`.\n\n## Model database\n\nKit ships with a local model database that maps provider names to API configurations. You can manage it with:\n\n```bash\nkit models # List available models\nkit models openai # Filter by provider\nkit models --all # Show all providers\nkit update-models # Update from models.dev\nkit update-models embedded # Reset to bundled database\n```\n" }, { "url": "/quick-start", diff --git a/providers/index.html b/providers/index.html index 556fd298..ee9a14e2 100644 --- a/providers/index.html +++ b/providers/index.html @@ -7,7 +7,7 @@ - + @@ -153,6 +153,39 @@ The `custom/custom` model has zero cost, 262K context window, and supports reaso Optionally set `CUSTOM_API_KEY` environment variable or use `--provider-api-key` for endpoints requiring authentication. +## Auto-routed providers + +Any provider in the [models.dev](https://models.dev) database can be used with the +standard `provider/model` format, even without a dedicated native integration. Kit +auto-routes the request through the matching **wire protocol** — the actual API +shape the provider speaks — rather than requiring a per-provider code path: + +| Wire protocol | npm package (models.dev) | Transport used | +|---------------|--------------------------|----------------| +| OpenAI (Responses API) | `@ai-sdk/openai` | OpenAI | +| OpenAI (chat completions) | `@ai-sdk/openai-compatible` | OpenAI-compatible | +| Anthropic | `@ai-sdk/anthropic` | Anthropic | +| Google Gemini | `@ai-sdk/google` | Google | + +The provider's `api` URL from the database is used as the base URL. A provider +whose npm package isn't recognized but that has an `api` URL falls back to the +OpenAI-compatible wire. + +Because routing follows the wire protocol, aggregator/proxy providers work across +**all** of their models — including ones they re-flavor onto a different protocol +via a per-model override. For example, an aggregator that proxies Claude, GPT, +*and* Gemini routes them to the Anthropic, OpenAI, and Google transports +respectively: + +```bash +kit --model opencode/claude-haiku-4-5 "Hello" # → Anthropic wire +kit --model opencode/gpt-5 "Hello" # → OpenAI wire +kit --model opencode/gemini-3.5-flash "Hello" # → Google wire +``` + +Provide the provider's API key the same way as any other — via its environment +variable (e.g. `OPENCODE_API_KEY`) or `--provider-api-key`. + ## Model database Kit ships with a local model database that maps provider names to API configurations. You can manage it with: diff --git a/quick-start/index.html b/quick-start/index.html index 0b358960..c4fbb64e 100644 --- a/quick-start/index.html +++ b/quick-start/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/callbacks/index.html b/sdk/callbacks/index.html index 90ac1556..727ba553 100644 --- a/sdk/callbacks/index.html +++ b/sdk/callbacks/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/options/index.html b/sdk/options/index.html index 094559f0..237ac008 100644 --- a/sdk/options/index.html +++ b/sdk/options/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/overview/index.html b/sdk/overview/index.html index c21519b3..5c068c59 100644 --- a/sdk/overview/index.html +++ b/sdk/overview/index.html @@ -7,7 +7,7 @@ - + diff --git a/sdk/sessions/index.html b/sdk/sessions/index.html index 8fd7875f..939fcd2a 100644 --- a/sdk/sessions/index.html +++ b/sdk/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/search.json b/search.json index e0c1fc82..53017093 100644 --- a/search.json +++ b/search.json @@ -307,10 +307,11 @@ "API keys", "OAuth", "Custom provider URL", + "Auto-routed providers", "Model database" ], "tags": [], - "wordCount": 466 + "wordCount": 684 }, { "id": "quick-start", diff --git a/sessions/index.html b/sessions/index.html index a8d62b33..bdb5e344 100644 --- a/sessions/index.html +++ b/sessions/index.html @@ -7,7 +7,7 @@ - + diff --git a/themes/index.html b/themes/index.html index edd07b16..8714a528 100644 --- a/themes/index.html +++ b/themes/index.html @@ -7,7 +7,7 @@ - +