diff options
| author | opencode-agent[bot] <219766164+opencode-agent[bot]@users.noreply.github.com> | 2025-12-15 16:01:35 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-15 16:01:35 -0600 |
| commit | 0beccc406e450d0ffce3c9d105c3813bc9b24d45 (patch) | |
| tree | 8a5d03d70b01c5a4e9f22f5ba0cf59ff22bd7adb /packages | |
| parent | b82ea693db2bdb4419ad8b54481a37a1cbfc0d61 (diff) | |
| download | opencode-0beccc406e450d0ffce3c9d105c3813bc9b24d45.tar.gz opencode-0beccc406e450d0ffce3c9d105c3813bc9b24d45.zip | |
docs: enabled_providers docs section (#5586)
Co-authored-by: opencode-agent[bot] <opencode-agent[bot]@users.noreply.github.com>
Co-authored-by: rekram1-node <[email protected]>
Co-authored-by: Aiden Cline <[email protected]>
Diffstat (limited to 'packages')
| -rw-r--r-- | packages/web/src/content/docs/config.mdx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/web/src/content/docs/config.mdx b/packages/web/src/content/docs/config.mdx index 82ea391e8..302d79d17 100644 --- a/packages/web/src/content/docs/config.mdx +++ b/packages/web/src/content/docs/config.mdx @@ -367,6 +367,25 @@ The `disabled_providers` option accepts an array of provider IDs. When a provide --- +### 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. |
