From c65c56e2cb86c85ebe6159df962e9488447dfa97 Mon Sep 17 00:00:00 2001 From: Joshua Lambert <25085430+lambertjosh@users.noreply.github.com> Date: Mon, 13 Apr 2026 04:56:56 -0400 Subject: [PATCH] docs(cli): document how to disable built-in providers (#8702) * docs(cli): document how to disable built-in providers * fix provider IDs in docs: ollama->ollama-cloud, remove incorrect local models notes * docs(kilo-docs): add section on disabling built-in providers to AI providers page * Apply suggestions from code review Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com> Co-authored-by: Joshua Lambert <25085430+lambertjosh@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Joshua Lambert <25085430+lambertjosh@users.noreply.github.com> * docs: shorten skill provider table, fix enabled/disabled interaction wording, mention kilo.jsonc --------- Co-authored-by: kilo-code-bot[bot] <240665456+kilo-code-bot[bot]@users.noreply.github.com> --- .../kilo-docs/pages/ai-providers/index.md | 22 ++++++++++++++ .../src/kilocode/skills/kilo-config.md | 29 +++++++++++++++++++ 2 files changed, 51 insertions(+) diff --git a/packages/kilo-docs/pages/ai-providers/index.md b/packages/kilo-docs/pages/ai-providers/index.md index 6981043e57..f1598b785e 100644 --- a/packages/kilo-docs/pages/ai-providers/index.md +++ b/packages/kilo-docs/pages/ai-providers/index.md @@ -61,6 +61,28 @@ Route requests through unified APIs with additional features: In the **VSCode (Legacy)** version, API keys use VS Code's Secret Storage. In the current **VSCode & CLI** version, keys are set via environment variables or referenced in `kilo.json` config files. See individual provider pages for setup instructions for each platform. {% /callout %} +## Disabling Built-in Providers + +You can prevent specific providers from loading using `disabled_providers` in your `kilo.json` (or `kilo.jsonc`). This is useful to hide models from built-in or detected providers that you don't intend to use. + +```json +{ + "$schema": "https://app.kilo.ai/config.json", + "disabled_providers": ["kilo", "openai"] +} +``` + +To allow only specific providers and disable everything else, use `enabled_providers` instead: + +```json +{ + "$schema": "https://app.kilo.ai/config.json", + "enabled_providers": ["anthropic"] +} +``` + +Both fields accept provider IDs — the lowercase identifier used in the `provider/model` format (e.g. `kilo`, `anthropic`, `openai`, `google`, `groq`). + ## Next Steps - **New to Kilo Code?** Start with the [Kilo Code provider](/docs/ai-providers/kilocode) - no setup required diff --git a/packages/opencode/src/kilocode/skills/kilo-config.md b/packages/opencode/src/kilocode/skills/kilo-config.md index 14d4c141f5..301a948750 100644 --- a/packages/opencode/src/kilocode/skills/kilo-config.md +++ b/packages/opencode/src/kilocode/skills/kilo-config.md @@ -161,6 +161,35 @@ Rules are evaluated top-to-bottom — the **last** matching rule wins. Put broad } ``` +### Disabling Built-in Providers + +Use `disabled_providers` to prevent specific providers from loading. This is useful when you want to exclude providers that are built-in, or auto-detected via environment variables, from appearing in the model picker. + +For example, this configuration will hide all models from the built-in Kilo Gateway as well as any from the OpenAI provider which may be enabled automatically through environment variables. + +```jsonc +{ + "$schema": "https://app.kilo.ai/config.json", + "disabled_providers": ["kilo", "openai"], +} +``` + +The provider ID is the lowercase name used in the `provider/model` format (e.g., `kilo`, `openai`, `anthropic`, `google`, `groq`). + +**Interaction with `enabled_providers`:** + +- `disabled_providers` removes specific providers from the auto-loaded set +- `enabled_providers` is more restrictive — when set, ONLY the listed providers will be enabled, ignoring all others +- If both are set, providers must appear in `enabled_providers` and not appear in `disabled_providers` + +To disable all auto-detected providers except one: + +```jsonc +{ + "enabled_providers": ["anthropic"], +} +``` + ## Skills Additional skill directories and remote URLs: