Repository navigation
feat(orchestration): support OpenCode worker model selection - #22134
user141514 wants to merge 1 commit into
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 105285182233613a0fa5e2a13b0c2d5eb53a3762 and 2856267. 📒 Files selected for processing (6)
🚧 Files skipped from review as they are similar to previous changes (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughOpenCode now has a dedicated launch-option catalog for worker model arguments. Worker preference resolution uses this catalog and rejects unsupported effort values. CLI and orchestration documentation now list OpenCode support for opaque model IDs. Bundled orchestration guidance now documents the Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to No actionable current-head risk remains; the PR is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description includes a concise PR summary, but most required template sections are incomplete. The linked issue is missing, visual proof is not marked N/A, testing details and checklist items are not completed, and the rationale and user-facing change sections remain as comments. Resolution Complete the ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Review, Agent skill upstream boundary, Notes, and Checklist sections. Provide the issue number, testing details, and either visual attachments or an explicit N/A with a reason. Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 4 functions across 8 files. (2 skipped: 2 unsupported.)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
🟡 Minor · Update the preceding example comment. · orchestration.mdx:43
docs/site/content/docs/cli/orchestration.mdx:43
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winUpdate the preceding example comment.
The comment excludes OpenCode, while the following statement says that
--modelsupports OpenCode. This conflicting guidance can lead users to conclude that OpenCode does not support--model.Proposed fix
-# optional per-worker model / effort (Claude, Codex, Cursor only; not with --terminal): +# optional per-worker model / effort (Claude, Codex, Cursor, OpenCode; not with --terminal):
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: c9e3827f-74e5-449e-bb16-e1f4c28bd3a5
📥 Commits
Reviewing files that changed from the base of the PR and between 841d06a and 105285182233613a0fa5e2a13b0c2d5eb53a3762.
📒 Files selected for processing (10)
docs/site/content/docs/cli/orchestration.mdxskill-guides/orchestration/references/coordinator-loop.mdsrc/cli/bundled-skill-guides.tssrc/cli/specs/orchestration-worker-specs.tssrc/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.test.tssrc/main/runtime/rpc/methods/orchestration/worker/worker-launch-preferences.tssrc/shared/agent-session-option-catalog-opencode.test.tssrc/shared/agent-session-option-catalog-opencode.tssrc/shared/agent-session-option-launch.tssrc/shared/tui-agent-startup-session-options.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — two minor suggestions inline.
Reviewed changes
- OpenCode launch-only catalog — adds
OPENCODE_LAUNCH_OPTION_CATALOGthat maps an opaque model id to--model, strips configured-m/--model, yet stays out ofgetAgentSessionOptionCatalogso Native Chat exposure is unchanged. - Launch-catalog dispatcher — new
getAgentSessionOptionLaunchCatalogroutesopencodeto the launch catalog and every other agent to the existing catalog;removeOverriddenAgentSessionArgsandresolveAgentSessionOptionLaunchnow use it. - Worker launch preferences —
worker-launch-preferences.tsresolves OpenCode through the launch catalog;--effortis rejected because the launch catalog defines no effort option. - Docs — orchestration docs, CLI spec notes, and the regenerated bundled skill guide now list OpenCode.
- Tests — new OpenCode catalog test plus worker and TUI launch cases pin the model mapping and configured-args replacement.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| export function getAgentSessionOptionLaunchCatalog( | ||
| agent: AgentType | ||
| ): AgentSessionOptionCatalog | null { | ||
| return agent === 'opencode' ? OPENCODE_LAUNCH_OPTION_CATALOG : getAgentSessionOptionCatalog(agent) |
There was a problem hiding this comment.
getAgentSessionOptionLaunchCatalog special-cases only 'opencode', so worker-start --agent opencode2 --model … still throws "does not support launch-time model selection" even though opencode2 is the same OpenCode family whose config note says it uses the same flags. Was scoping to opencode deliberate here, or should opencode2 (and possibly mimo-code) route to the same launch catalog? Not a regression — those agents were rejected before this PR too.
| @@ -44,7 +44,7 @@ orca orchestration worker-start --task <taskId> --worktree new-child --name bill | |||
| orca orchestration worker-start --task <taskId> --worktree current --agent claude --model <opaque-model-id> --effort high --json | |||
| ``` | |||
|
|
|||
| `--model` accepts opaque provider model IDs for Claude, Codex, and Cursor. `--effort` requires `--model` and only applies when that agent/model supports the level. Neither flag can combine with `--terminal` (reuse an existing pane). Overrides apply to that launch only and show under `launch.requested` / `launch.effective` in the start receipt. Federated starts need a worker host that advertises launch-preference support. | |||
| `--model` accepts opaque provider model IDs for Claude, Codex, Cursor, and OpenCode. `--effort` requires `--model` and only applies when that agent/model supports the level. Neither flag can combine with `--terminal` (reuse an existing pane). Overrides apply to that launch only and show under `launch.requested` / `launch.effective` in the start receipt. Federated starts need a worker host that advertises launch-preference support. | |||
There was a problem hiding this comment.
This line now lists OpenCode, but the comment directly above it (# optional per-worker model / effort (Claude, Codex, Cursor only; not with --terminal):) still names only Claude, Codex, and Cursor. Worth updating that comment so the example matches the supported set below.
Allow supervised OpenCode workers to use per-launch model overrides through the existing launch-preference and receipt path. Preserve existing OpenCode agent arguments while replacing only model flags, and reject unsupported effort values explicitly. Keep Native Chat option exposure unchanged and update the worker CLI and orchestration guidance.
1052851 to
2856267
Compare
Preserve original #22134 contribution and the full45-file model feature.
|
Implemented in the merged #24624 and #24768. Thanks @user141514 for the original worker model-selection contribution. Supervised OpenCode workers in an existing worktree can select a model through the launch preferences and receipts while preserving automatic and plugin arguments. Unsupported effort values are refused explicitly. The real private OpenCode 2.0.16 checks covered the requested model, genuine supervised completion, and ordinary launches using their configured default. Native Chat option exposure stays unchanged. Closing this PR as superseded by the merged implementation. |

Allow supervised OpenCode workers to use per-launch model overrides through the existing launch-preference and receipt path. Preserve existing OpenCode agent arguments while replacing only model flags, and reject unsupported effort values explicitly. Keep Native Chat option exposure unchanged and update the worker CLI and orchestration guidance.
ELI5
What Changed
Why
Linked Issue
Fixes #
Visual Proof
Testing
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)