feat(config): add disabled_providers schema + helper

Adds an opt-in `disabled_providers` config field plus the `shared/disabled-providers`
helper (`isProviderDisabled`, `filterDisabledProviderModels`, `applyDisabledProviders`)
that the plugin-config layer applies to resolved providers.

The routing changes in team-mode (team-runtime, tools/lifecycle, plugin/tool-registry)
are NOT in this PR — those are entangled with the `MemberSelectionMode` /
`ShutdownActor` refactors from the closed PR #3871 and need their own extraction
once those refactors land independently. This PR isolates the parts that are
cleanly independent: schema, helper, and config-layer wiring.

Companion to #4024 (live-tail tailer), both extracted from the closed PR #3871.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
PeterPonyu
2026-05-14 21:40:02 -04:00
parent c6c7a103dd
commit e8a640883a
5 changed files with 477 additions and 0 deletions
@@ -43,6 +43,14 @@ export const OhMyOpenCodeConfigSchema = z.object({
disabled_commands: z.array(BuiltinCommandNameSchema).optional(),
/** Disable specific tools by name (e.g., ["todowrite", "todoread"]) */
disabled_tools: z.array(z.string()).optional(),
/**
* Provider prefixes to exclude from every agent/category fallback chain at
* load time. Each entry matches the first slash-separated segment of a model
* id (e.g., "github-copilot" matches "github-copilot/gpt-5.5"). If a primary
* `model` references a disabled provider, it is replaced with the first
* allowed entry from the same chain.
*/
disabled_providers: z.array(z.string()).optional(),
mcp_env_allowlist: z.array(z.string()).optional(),
/** Enable hashline_edit tool/hook integrations (default: false) */
hashline_edit: z.boolean().optional(),