Files
kit/www/pages/providers.md
T
Ed Zynda 10abb29e4f fix(models): route auto-discovered providers by wire protocol (#41)
- replace npmToLLMProvider map with npmToWireProtocol (openai/anthropic/google)
- add createAutoRoutedGoogleProvider so @ai-sdk/google proxies work
  (fixes opencode/gemini-* failing with "no LLM provider mapping")
- strip the genai-injected v1beta segment for proxies whose base URL
  already carries a version (e.g. opencode's /zen/v1)
- preserve openai-compat fallback and clearer error for unroutable providers
- document auto-routing in README and providers docs; update CreateProvider godoc
- add regression tests for wire routing and version-path rewriting

Fixes #41
2026-06-02 15:07:07 +03:00

5.6 KiB

title, description
title description
Providers Supported LLM providers and model configuration.

Providers

Kit supports a wide range of LLM providers through a unified provider/model string format.

Supported providers

Provider Prefix Description
Anthropic anthropic/ Claude models (native, prompt caching, OAuth)
OpenAI openai/ GPT models
Google google/ or gemini/ Gemini models
Ollama ollama/ Local models
Azure OpenAI azure/ Azure-hosted OpenAI
AWS Bedrock bedrock/ Bedrock models
Google Vertex google-vertex-anthropic/ Claude on Vertex AI
OpenRouter openrouter/ Multi-provider router
Vercel AI vercel/ Vercel AI SDK models
Custom custom/ Any OpenAI-compatible endpoint
Auto-routed any Any provider from the models.dev database

Model string format

provider/model            # Standard format
anthropic/claude-sonnet-latest
openai/gpt-4o
ollama/llama3
google/gemini-2.5-flash

Model aliases

Kit provides aliases for commonly used models:

Anthropic Claude

claude-opus-latest        → claude-opus-4-6
claude-sonnet-latest      → claude-sonnet-4-6
claude-haiku-latest       → claude-haiku-4-5
claude-4-opus-latest      → claude-opus-4-6
claude-4-sonnet-latest    → claude-sonnet-4-6
claude-4-haiku-latest     → claude-haiku-4-5
claude-3-7-sonnet-latest  → claude-3-7-sonnet-20250219
claude-3-5-sonnet-latest  → claude-3-5-sonnet-20241022
claude-3-5-haiku-latest   → claude-3-5-haiku-20241022
claude-3-opus-latest      → claude-3-opus-20240229

OpenAI GPT

o1-latest                 → o1
o3-latest                 → o3
o4-latest                 → o4-mini
gpt-5-latest              → gpt-5.4
gpt-5-chat-latest         → gpt-5.4
gpt-4-latest              → gpt-4o
gpt-4                     → gpt-4o
gpt-3.5-latest            → gpt-3.5-turbo
gpt-3.5                   → gpt-3.5-turbo
codex-latest              → codex-mini-latest

Google Gemini

gemini-pro-latest         → gemini-2.5-pro
gemini-flash-latest       → gemini-2.5-flash
gemini-flash              → gemini-2.5-flash
gemini-pro                → gemini-2.5-pro

Specifying a model

Via CLI flag:

kit --model openai/gpt-4o
kit -m ollama/llama3

Via config file:

model: anthropic/claude-sonnet-latest

Via environment variable:

export KIT_MODEL="google/gemini-2.0-flash-exp"

Authentication

API keys

Set the appropriate environment variable for your provider:

export ANTHROPIC_API_KEY="sk-..."
export OPENAI_API_KEY="sk-..."
export GOOGLE_API_KEY="..."

Or pass it directly:

kit --provider-api-key "sk-..." --model openai/gpt-4o

OAuth

For providers that support OAuth (e.g., Anthropic):

kit auth login anthropic     # Start OAuth flow
kit auth status              # Check authentication status
kit auth logout anthropic    # Remove credentials

Custom provider URL

For self-hosted or proxy endpoints:

kit --provider-url "https://my-proxy.example.com/v1" --model openai/gpt-4o

When --provider-url is provided without --model, Kit automatically defaults to custom/custom:

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 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:

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