From 9ef500d543cf1e27d26c56ce248f25d9ed4d9487 Mon Sep 17 00:00:00 2001 From: "opencode-agent[bot]" Date: Mon, 15 Dec 2025 21:59:25 +0000 Subject: [PATCH 1/2] Added enabled_providers docs section Co-authored-by: rekram1-node --- packages/web/src/content/docs/config.mdx | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index 82ea391e8a4..4f08404efff 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -348,7 +348,7 @@ about rules here](/docs/rules). --- -### Disabled providers +### Disabled providers {#disabled-providers} You can disable providers that are loaded automatically through the `disabled_providers` option. This is useful when you want to prevent certain providers from being loaded even if their credentials are available. @@ -367,6 +367,25 @@ The `disabled_providers` option accepts an array of provider IDs. When a provide --- +### Enabled providers {#enabled-providers} + +You can specify an allowlist of providers through the `enabled_providers` option. When set, only the specified providers will be enabled and all others will be ignored. + +```json title="opencode.json" +{ + "$schema": "https://opencode.ai/config.json", + "enabled_providers": ["anthropic", "openai"] +} +``` + +This is useful when you want to restrict OpenCode to only use specific providers rather than disabling them one by one. + +:::note +If a provider appears in both `enabled_providers` and `disabled_providers`, the `disabled_providers` takes priority for backwards compatibility. +::: + +--- + ## Variables You can use variable substitution in your config files to reference environment variables and file contents. From a4023d39c5b29524c0d42815e0d4c5623df9bed7 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Mon, 15 Dec 2025 16:01:11 -0600 Subject: [PATCH 2/2] Fix headings for disabled and enabled providers sections --- packages/web/src/content/docs/config.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index 4f08404efff..302d79d1724 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -348,7 +348,7 @@ about rules here](/docs/rules). --- -### Disabled providers {#disabled-providers} +### Disabled providers You can disable providers that are loaded automatically through the `disabled_providers` option. This is useful when you want to prevent certain providers from being loaded even if their credentials are available. @@ -367,7 +367,7 @@ The `disabled_providers` option accepts an array of provider IDs. When a provide --- -### Enabled providers {#enabled-providers} +### Enabled providers You can specify an allowlist of providers through the `enabled_providers` option. When set, only the specified providers will be enabled and all others will be ignored.