Problem
Issue #965 asked for OpenCode support as an AI provider, analogous to claude-code, codex-cli, and gemini-cli. It was closed against PR #970, which added OpenCode as a rules profile (AGENTS.md integration) — a separate, valuable concern but distinct from the original ask. The AI-provider request was never addressed.
This matters for a concrete enterprise use case: organisations that permit OpenCode and its configured backends (notably GitHub Copilot) but prohibit direct LLM API usage. Those users currently cannot use Task Master at all, because every existing provider requires a direct LLM credential or a different CLI.
Technical Context
Since #965 closed, @ben-vargas has published ai-sdk-provider-opencode-sdk — the same community-provider pattern the other CLI-backed providers use. Task Master already depends on Ben's sibling packages:
ai-sdk-provider-claude-code
ai-sdk-provider-codex-cli
ai-sdk-provider-gemini-cli
Adding OpenCode is structurally identical.
Proposed Solution
A minimal PR mirroring src/ai-providers/claude-code.js:
- New
src/ai-providers/opencode.js wrapping ai-sdk-provider-opencode-sdk (pinned to the ai-sdk-v5 tag to match the repo's current ai@^5.0.51)
- Registration in
src/ai-providers/index.js and packages/tm-core/src/common/constants/providers.ts
- Entry in
scripts/modules/supported-models.json
- CLI availability check (
opencode --version) with the same fallback-path logic used by claude-code.js for minimal environments
- Unit tests mirroring
tests/unit/ai-providers/claude-code.test.js
- Docs updates
Auth, model routing, and provider selection all delegate to OpenCode — Task Master stays agnostic.
Scope
Related
Happy to own the PR. @ben-vargas if you're planning to take this yourself, let me know and I'll step aside.
Problem
Issue #965 asked for OpenCode support as an AI provider, analogous to
claude-code,codex-cli, andgemini-cli. It was closed against PR #970, which added OpenCode as a rules profile (AGENTS.md integration) — a separate, valuable concern but distinct from the original ask. The AI-provider request was never addressed.This matters for a concrete enterprise use case: organisations that permit OpenCode and its configured backends (notably GitHub Copilot) but prohibit direct LLM API usage. Those users currently cannot use Task Master at all, because every existing provider requires a direct LLM credential or a different CLI.
Technical Context
Since #965 closed, @ben-vargas has published
ai-sdk-provider-opencode-sdk— the same community-provider pattern the other CLI-backed providers use. Task Master already depends on Ben's sibling packages:ai-sdk-provider-claude-codeai-sdk-provider-codex-cliai-sdk-provider-gemini-cliAdding OpenCode is structurally identical.
Proposed Solution
A minimal PR mirroring
src/ai-providers/claude-code.js:src/ai-providers/opencode.jswrappingai-sdk-provider-opencode-sdk(pinned to theai-sdk-v5tag to match the repo's currentai@^5.0.51)src/ai-providers/index.jsandpackages/tm-core/src/common/constants/providers.tsscripts/modules/supported-models.jsonopencode --version) with the same fallback-path logic used byclaude-code.jsfor minimal environmentstests/unit/ai-providers/claude-code.test.jsAuth, model routing, and provider selection all delegate to OpenCode — Task Master stays agnostic.
Scope
ai-sdk-provider-opencode-sdkexposesRelated
claude-code.js,codex-cli.js,gemini-cli.jsHappy to own the PR. @ben-vargas if you're planning to take this yourself, let me know and I'll step aside.