Config: allow plugin-specific configuration via plugin_config #6640

Closed
opened 2026-02-16 18:04:49 -05:00 by yindo · 2 comments
Owner

Originally created by @GoodFarming on GitHub (Jan 17, 2026).

Originally assigned to: @thdxr on GitHub.

OpenCode config parsing is strict (unknown keys are rejected), which makes it hard for plugins to accept structured options from opencode.json without adding new top-level fields.

Proposal: add an optional top-level plugin_config object: a map of plugin name -> arbitrary config. This stays generic while keeping the config schema strict.

Example:

{
  "plugin": ["@acme/my-plugin"],
  "plugin_config": {
    "@acme/my-plugin": { "endpoint": "https://example.com" }
  }
}

If this looks reasonable, I have a small PR ready (schema + defaults + SDK regen + tests).}

Originally created by @GoodFarming on GitHub (Jan 17, 2026). Originally assigned to: @thdxr on GitHub. OpenCode config parsing is strict (unknown keys are rejected), which makes it hard for plugins to accept structured options from `opencode.json` without adding new top-level fields. Proposal: add an optional top-level `plugin_config` object: a map of plugin name -> arbitrary config. This stays generic while keeping the config schema strict. Example: ```jsonc { "plugin": ["@acme/my-plugin"], "plugin_config": { "@acme/my-plugin": { "endpoint": "https://example.com" } } } ``` If this looks reasonable, I have a small PR ready (schema + defaults + SDK regen + tests).}
yindo closed this issue 2026-02-16 18:04:49 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 17, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #4393: Allow plugins to have their own configuration (EXACT DUPLICATE - proposes the same plugin_config feature)
  • #8320: Manage plugins like providers in configuration (HIGHLY RELATED - proposes plugin override mechanics)
  • #9062: Support config.d/ directory for modular configuration (RELATED - addresses config strictness)
  • #8241: Composable configs (RELATED - proposes config composition for modularity)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 17, 2026): This issue might be a duplicate of existing issues. Please check: - #4393: Allow plugins to have their own configuration (EXACT DUPLICATE - proposes the same plugin_config feature) - #8320: Manage plugins like providers in configuration (HIGHLY RELATED - proposes plugin override mechanics) - #9062: Support config.d/ directory for modular configuration (RELATED - addresses config strictness) - #8241: Composable configs (RELATED - proposes config composition for modularity) Feel free to ignore if none of these address your specific case.
Author
Owner

@GoodFarming commented on GitHub (Jan 17, 2026):

Thanks — this does overlap with #4393 (plugin configuration in opencode.json(c)).

I opened PR #9161 implementing a minimal plugin_config map; I'll close this issue to keep discussion in one place.

@GoodFarming commented on GitHub (Jan 17, 2026): Thanks — this does overlap with #4393 (plugin configuration in `opencode.json(c)`). I opened PR #9161 implementing a minimal `plugin_config` map; I'll close this issue to keep discussion in one place.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6640