mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
Deploying to gh-pages from @ mark3labs/kit@ae722d520f 🚀
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1 +1 @@
|
||||
{"version":"1.5.2","languages":{"en":{"hash":"en_a84379fe9c","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
{"version":"1.5.2","languages":{"en":{"hash":"en_828355c1b8","wasm":"en","page_count":21}},"include_characters":["_","‿","⁀","⁔","︳","︴","﹍","﹎","﹏","_"]}
|
||||
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Machine-readable JSON output for scripting and automation.">
|
||||
<link rel="canonical" href="/advanced/json-output">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"JSON Output","description":"Machine-readable JSON output for scripting and automation.","url":"https://go-kit.dev/advanced/json-output","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Multi-agent orchestration with Kit subagents.">
|
||||
<link rel="canonical" href="/advanced/subagents">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Subagents","description":"Multi-agent orchestration with Kit subagents.","url":"https://go-kit.dev/advanced/subagents","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Test Kit's TUI non-interactively using tmux.">
|
||||
<link rel="canonical" href="/advanced/testing">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Testing with tmux","description":"Test Kit's TUI non-interactively using tmux.","url":"https://go-kit.dev/advanced/testing","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -130,13 +130,62 @@ const s={frontmatter:{title:"Providers",description:"Supported LLM providers and
|
||||
<pre class="shiki shiki-themes github-light github-dark" style="background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#005CC5;--shiki-dark:#79B8FF"> --provider-url</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> "http://localhost:8080/v1"</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> "Hello"</span></span></code></pre>
|
||||
<p>The <code>custom/custom</code> model has zero cost, 262K context window, and supports reasoning. It routes through the <code>openaicompat</code> provider and accepts any OpenAI-compatible API endpoint.</p>
|
||||
<p>Optionally set <code>CUSTOM_API_KEY</code> environment variable or use <code>--provider-api-key</code> for endpoints requiring authentication.</p>
|
||||
<h2 id="auto-routed-providers"><a class="heading-anchor" aria-hidden="" tabindex="-1" href="#auto-routed-providers"><span class="icon icon-link"></span></a>Auto-routed providers</h2>
|
||||
<p>Any provider in the <a href="https://models.dev">models.dev</a> database can be used with the
|
||||
standard <code>provider/model</code> format, even without a dedicated native integration. Kit
|
||||
auto-routes the request through the matching <strong>wire protocol</strong> — the actual API
|
||||
shape the provider speaks — rather than requiring a per-provider code path:</p>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Wire protocol</th>
|
||||
<th>npm package (models.dev)</th>
|
||||
<th>Transport used</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>OpenAI (Responses API)</td>
|
||||
<td><code>@ai-sdk/openai</code></td>
|
||||
<td>OpenAI</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>OpenAI (chat completions)</td>
|
||||
<td><code>@ai-sdk/openai-compatible</code></td>
|
||||
<td>OpenAI-compatible</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Anthropic</td>
|
||||
<td><code>@ai-sdk/anthropic</code></td>
|
||||
<td>Anthropic</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Google Gemini</td>
|
||||
<td><code>@ai-sdk/google</code></td>
|
||||
<td>Google</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The provider's <code>api</code> URL from the database is used as the base URL. A provider
|
||||
whose npm package isn't recognized but that has an <code>api</code> URL falls back to the
|
||||
OpenAI-compatible wire.</p>
|
||||
<p>Because routing follows the wire protocol, aggregator/proxy providers work across
|
||||
<strong>all</strong> 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,
|
||||
<em>and</em> Gemini routes them to the Anthropic, OpenAI, and Google transports
|
||||
respectively:</p>
|
||||
<pre class="shiki shiki-themes github-light github-dark" style="background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#005CC5;--shiki-dark:#79B8FF"> --model</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> opencode/claude-haiku-4-5</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> "Hello"</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # → Anthropic wire</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#005CC5;--shiki-dark:#79B8FF"> --model</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> opencode/gpt-5</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> "Hello"</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # → OpenAI wire</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#005CC5;--shiki-dark:#79B8FF"> --model</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> opencode/gemini-3.5-flash</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> "Hello"</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # → Google wire</span></span></code></pre>
|
||||
<p>Provide the provider's API key the same way as any other — via its environment
|
||||
variable (e.g. <code>OPENCODE_API_KEY</code>) or <code>--provider-api-key</code>.</p>
|
||||
<h2 id="model-database"><a class="heading-anchor" aria-hidden="" tabindex="-1" href="#model-database"><span class="icon icon-link"></span></a>Model database</h2>
|
||||
<p>Kit ships with a local model database that maps provider names to API configurations. You can manage it with:</p>
|
||||
<pre class="shiki shiki-themes github-light github-dark" style="background-color:#fff;--shiki-dark-bg:#24292e;color:#24292e;--shiki-dark:#e1e4e8" tabindex="0"><code><span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> models</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # List available models</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> models</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> openai</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # Filter by provider</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> models</span><span style="color:#005CC5;--shiki-dark:#79B8FF"> --all</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # Show all providers</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> update-models</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # Update from models.dev</span></span>
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> update-models</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> embedded</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # Reset to bundled database</span></span></code></pre>`,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:`
|
||||
<span class="line"><span style="color:#6F42C1;--shiki-dark:#B392F0">kit</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> update-models</span><span style="color:#032F62;--shiki-dark:#9ECBFF"> embedded</span><span style="color:#6A737D;--shiki-dark:#6A737D"> # Reset to bundled database</span></span></code></pre>`,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:
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Complete reference for all Kit CLI subcommands.">
|
||||
<link rel="canonical" href="/cli/commands">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Commands","description":"Complete reference for all Kit CLI subcommands.","url":"https://go-kit.dev/cli/commands","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Complete reference for all Kit CLI flags.">
|
||||
<link rel="canonical" href="/cli/flags">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Global Flags","description":"Complete reference for all Kit CLI flags.","url":"https://go-kit.dev/cli/flags","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Configure Kit using config files, environment variables, and CLI flags.">
|
||||
<link rel="canonical" href="/configuration">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Configuration","description":"Configure Kit using config files, environment variables, and CLI flags.","url":"https://go-kit.dev/configuration","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Build, test, and contribute to Kit.">
|
||||
<link rel="canonical" href="/development">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Development","description":"Build, test, and contribute to Kit.","url":"https://go-kit.dev/development","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="All extension capabilities — lifecycle events, tools, commands, widgets, and more.">
|
||||
<link rel="canonical" href="/extensions/capabilities">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Capabilities","description":"All extension capabilities — lifecycle events, tools, commands, widgets, and more.","url":"https://go-kit.dev/extensions/capabilities","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Catalog of example extensions included with Kit.">
|
||||
<link rel="canonical" href="/extensions/examples">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Examples","description":"Catalog of example extensions included with Kit.","url":"https://go-kit.dev/extensions/examples","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="How Kit discovers and loads extensions.">
|
||||
<link rel="canonical" href="/extensions/loading">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Loading Extensions","description":"How Kit discovers and loads extensions.","url":"https://go-kit.dev/extensions/loading","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Overview of Kit's Go-based extension system.">
|
||||
<link rel="canonical" href="/extensions/overview">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Extension System","description":"Overview of Kit's Go-based extension system.","url":"https://go-kit.dev/extensions/overview","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Write unit tests for your Kit extensions using the test package.">
|
||||
<link rel="canonical" href="/extensions/testing">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Testing Extensions","description":"Write unit tests for your Kit extensions using the test package.","url":"https://go-kit.dev/extensions/testing","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: #333; border-radius: 3px; }
|
||||
</style>
|
||||
<script type="module" crossorigin src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" crossorigin src="/assets/index-Caxbfw96.js"></script>
|
||||
<link rel="stylesheet" crossorigin href="/assets/index-Di_r5hA0.css">
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"WebSite","name":"Kit","url":"https://go-kit.dev","description":"Documentation site powered by Tome","potentialAction":{"@type":"SearchAction","target":"https://go-kit.dev/search?q={search_term_string}","query-input":"required name=search_term_string"}}</script>
|
||||
</head>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Install Kit using npm, bun, pnpm, Go, or build from source.">
|
||||
<link rel="canonical" href="/installation">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Installation","description":"Install Kit using npm, bun, pnpm, Go, or build from source.","url":"https://go-kit.dev/installation","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -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:
|
||||
|
||||
+34
-1
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Supported LLM providers and model configuration.">
|
||||
<link rel="canonical" href="/providers">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Providers","description":"Supported LLM providers and model configuration.","url":"https://go-kit.dev/providers","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -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:
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Get up and running with Kit in minutes.">
|
||||
<link rel="canonical" href="/quick-start">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Quick Start","description":"Get up and running with Kit in minutes.","url":"https://go-kit.dev/quick-start","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Monitor tool calls and streaming output with the Kit Go SDK.">
|
||||
<link rel="canonical" href="/sdk/callbacks">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Callbacks","description":"Monitor tool calls and streaming output with the Kit Go SDK.","url":"https://go-kit.dev/sdk/callbacks","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Configuration options for the Kit Go SDK.">
|
||||
<link rel="canonical" href="/sdk/options">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"SDK Options","description":"Configuration options for the Kit Go SDK.","url":"https://go-kit.dev/sdk/options","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Embed Kit in your Go applications.">
|
||||
<link rel="canonical" href="/sdk/overview">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Go SDK","description":"Embed Kit in your Go applications.","url":"https://go-kit.dev/sdk/overview","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Session management in the Kit Go SDK.">
|
||||
<link rel="canonical" href="/sdk/sessions">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"SDK Sessions","description":"Session management in the Kit Go SDK.","url":"https://go-kit.dev/sdk/sessions","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+2
-1
@@ -307,10 +307,11 @@
|
||||
"API keys",
|
||||
"OAuth",
|
||||
"Custom provider URL",
|
||||
"Auto-routed providers",
|
||||
"Model database"
|
||||
],
|
||||
"tags": [],
|
||||
"wordCount": 466
|
||||
"wordCount": 684
|
||||
},
|
||||
{
|
||||
"id": "quick-start",
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="How Kit persists and manages conversation sessions.">
|
||||
<link rel="canonical" href="/sessions">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Session Management","description":"How Kit persists and manages conversation sessions.","url":"https://go-kit.dev/sessions","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
<meta name="description" content="Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.">
|
||||
<link rel="canonical" href="/themes">
|
||||
<link rel="stylesheet" href="/assets/index-Di_r5hA0.css">
|
||||
<script type="module" src="/assets/index-39SlNbn6.js"></script>
|
||||
<script type="module" src="/assets/index-Caxbfw96.js"></script>
|
||||
<script type="application/ld+json">{"@context":"https://schema.org","@type":"TechArticle","headline":"Themes","description":"Customize Kit's appearance with built-in themes, custom theme files, and the extension theme API.","url":"https://go-kit.dev/themes","isPartOf":{"@type":"WebSite","name":"Kit","url":"https://go-kit.dev"}}</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
Reference in New Issue
Block a user