diff --git a/README.md b/README.md index e01d54b3..b4a2861f 100644 --- a/README.md +++ b/README.md @@ -704,8 +704,24 @@ npm/ - NPM package wrapper for distribution - **Google Vertex** - Claude on Vertex AI - **OpenRouter** - Multi-provider router - **Vercel AI** - Vercel AI SDK models +- **Custom** - Any OpenAI-compatible endpoint via `--provider-url` - **Auto-routed** - Any provider from models.dev database +### Custom Provider + +Use `custom/custom` when pointing Kit at any OpenAI-compatible endpoint with `--provider-url`: + +```bash +kit --provider-url "http://localhost:8080/v1" "Hello" +``` + +This automatically defaults to `custom/custom` without needing to specify a model. The custom provider routes through fantasy's `openaicompat` provider and supports: + +- Zero cost tracking (input/output = 0) +- 262K context window, 65K output limit +- Reasoning and temperature support +- Optional `CUSTOM_API_KEY` environment variable or `--provider-api-key` flag + ### Model String Format ```bash diff --git a/www/pages/providers.md b/www/pages/providers.md index cbe4f4f4..a45339b0 100644 --- a/www/pages/providers.md +++ b/www/pages/providers.md @@ -20,6 +20,7 @@ Kit supports a wide range of LLM providers through a unified `provider/model` st | **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 @@ -132,6 +133,16 @@ 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`: + +```bash +kit --provider-url "http://localhost:8080/v1" "Hello" +``` + +The `custom/custom` model has zero cost, 262K context window, and supports reasoning. It routes through fantasy's `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. + ## Model database Kit ships with a local model database that maps provider names to API configurations. You can manage it with: