1 line
7.6 KiB
JSON
1 line
7.6 KiB
JSON
{"repo": "benewende-dev/outio-ai", "files": {"packages/kilo-docs/pages/gateway/models-and-providers.md": {"a264355dd88a5a1aeffd451cc2117adad8c627cb": {"t": 1785596046.3939607, "n": 7366, "h": "332328ae020075af", "c": "---\ntitle: \"Models & Providers\"\ndescription: \"Learn about the AI models and providers available through the Kilo AI Gateway, including model IDs, routing behavior, and provider-specific features.\"\n---\n\n# Models & Providers\n\nThe Kilo AI Gateway provides access to hundreds of AI models from multiple providers through a single unified API. You can switch between models by changing the model ID string -- no code changes required.\n\n## Specifying a model\n\nModels are identified using the format `provider/model-name`. Pass this as the `model` parameter in your request:\n\n```typescript\nconst result = streamText({\n model: kilo.chat(\"anthropic/claude-sonnet-4.6\"),\n prompt: \"Hello!\",\n})\n```\n\nOr in a raw API request:\n\n```json\n{\n \"model\": \"anthropic/claude-sonnet-4.6\",\n \"messages\": [{ \"role\": \"user\", \"content\": \"Hello!\" }]\n}\n```\n\n## Available models\n\nYou can browse the full list of available models via the models endpoint:\n\n```\nGET https://api.kilo.ai/api/gateway/models\n```\n\nThis returns model information including pricing, context window, and supported features. No authentication is required.\n\n### Popular models\n\n| Model ID | Provider | Description |\n| ------------------------------- | --------- | ----------------------------------------------- |\n| `anthropic/claude-opus-4.6` | Anthropic | Most capable Claude model for complex reasoning |\n| `anthropic/claude-sonnet-4.6` | Anthropic | Balanced performance and cost |\n| `anthropic/claude-haiku-4.5` | Anthropic | Fast and cost-effective |\n| `openai/gpt-5.2` | OpenAI | Latest GPT model |\n| `google/gemini-3-pro-preview` | Google | Advanced reasoning with 1M context |\n| `google/gemini-3-flash-preview` | Google | Fast and efficient |\n| `x-ai/grok-code-fast-1` | xAI | Optimized for code tasks |\n| `moonshotai/kimi-k2.5` | Moonshot | Strong multilingual model |\n\n### Free models\n\nSeveral models are available at no cost, subject to rate limits:\n\n| Model ID | Description |\n| ------------------------------------- | ------------------------- |\n| `minimax/minimax-m2.1:free` | MiniMax M2.1 |\n| `z-ai/glm-5:free` | Z.AI GLM-5 |\n| `giga-potato` | Community model |\n| `corethink:free` | CoreThink reasoning model |\n| `arcee-ai/trinity-large-preview:free` | Arcee Trinity |\n\nFree models are available to both authenticated and anonymous users. Anonymous users are rate-limited to 200 requests per hour per IP address.\n\n## Auto models\n\nKilo Auto virtual models automatically select the best underlying model based on the task type. The selection is controlled by the `x-kilocode-mode` request header.\n\n### `kilo-auto/frontier`\n\nRoutes to the most capable paid models optimizing for cost, performance, and capabilities.\n\n| Mode | Resolved Model |\n| -------------------------------------------------------------- | ----------------------------- |\n| `plan`, `general`, `architect`, `orchestrator`, `ask`, `debug` | `anthropic/claude-opus-4.6` |\n| `build`, `explore`, `code` | `anthropic/claude-sonnet-4.6` |\n| Default (no mode specified) | `anthropic/claude-sonnet-4.6` |\n\n### `kilo-auto/balanced`\n\nFollows the same mode-based routing as Frontier but uses more cost-effective models.\n\n| Mode | Resolved Model |\n| -------------------------------------------------------------- | ---------------------- |\n| `plan`, `general`, `architect`, `orchestrator`, `ask`, `debug` | `moonshotai/kimi-k2.5` |\n| `build`, `explore`, `code` | `minimax/minimax-m2.7` |\n| Default (no mode specified) | `minimax/minimax-m2.7` |\n\n### `kilo-auto/free`\n\nThe best available free model for each mode.\n\n| Mode | Resolved Model |\n| --------------------------- | --------------------------- |\n| All modes | `minimax/minimax-m2.5:free` |\n| Default (no mode specified) | `minimax/minimax-m2.5:free` |\n\n### Example usage\n\n```json\n{\n \"model\": \"kilo-auto/frontier\",\n \"messages\": [{ \"role\": \"user\", \"content\": \"Help me design a database schema\" }]\n}\n```\n\nWith the mode header:\n\n```bash\ncurl -X POST \"https://api.kilo.ai/api/gateway/chat/completions\" \\\n -H \"Authorization: Bearer $KILO_API_KEY\" \\\n -H \"x-kilocode-mode: plan\" \\\n -H \"Content-Type: application/json\" \\\n -d '{\"model\": \"kilo-auto/balanced\", \"messages\": [{\"role\": \"user\", \"content\": \"Design a database schema\"}]}'\n```\n\n## Providers\n\nThe gateway routes requests to the appropriate provider based on the model and your configuration:\n\n| Provider | Slug | Description |\n| ----------------- | ------------ | ----------------------------------- |\n| OpenRouter | `openrouter` | Primary gateway for most models |\n| Vercel AI Gateway | `vercel` | BYOK routing and select A/B testing |\n| Mistral | `mistral` | FIM completions (Codestral) |\n| xAI | `x-ai` | Grok models (direct) |\n| MiniMax | `minimax` | MiniMax models (direct) |\n| CoreThink | `corethink` | CoreThink reasoning model |\n| Inception | `inception` | InceptionLabs models |\n| Martian | `martian` | Optimized xAI models |\n| StreamLake | `streamlake` | KAT-Coder models |\n\n## Provider routing\n\nThe gateway uses the following priority for routing requests:\n\n1. **BYOK check**: If you have a BYOK key for the model's provider, the request is routed through Vercel AI Gateway using your key\n2. **Free model routing**: If the model is a Kilo-hosted free model, it's routed to its designated provider\n3. **Default routing**: All other requests go through OpenRouter\n\n### Preferred inference providers\n\nFor models available through multiple providers, the gateway may use a preferred provider for better performance:\n\n| Model Family | Preferred Provider |\n| ---------------- | -------------------- |\n| Anthropic models | Amazon Bedrock |\n| MiniMax models | MiniMax (direct) |\n| Mistral models | Mistral (direct) |\n| Moonshot models | Moonshot AI (direct) |\n\nThese preferences are sent as hints to OpenRouter, which may override them based on availability and load.\n\n## Listing models\n\n### Models endpoint\n\n```\nGET https://api.kilo.ai/api/gateway/models\n```\n\nReturns an OpenAI-compatible list of all available models with metadata including pricing, context window, and capabilities.\n\n### Providers endpoint\n\n```\nGET https://api.kilo.ai/api/gateway/providers\n```\n\nReturns a list of all available inference providers.\n\n### Models by provider\n\n```\nGET https://api.kilo.ai/api/gateway/models-by-provider\n```\n\nReturns models grouped by their provider, useful for building model selection interfaces.\n"}}}} |