GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — feat(opencode): add runtime model override for task tool subagents by pratikranaa · Pull Request #35800 · anomalyco/opencode Conversation
|
|
The following comment was made by an LLM, it may be inaccurate: Potential Duplicate FoundPR #29447: feat(opencode): add task model override Why it's related: This is the exact same feature mentioned in the PR description. PR #29447 has been waiting for review since May and implements the same task tool model override functionality. The current PR (35800) is an independent implementation of the same feature. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
really need this, i don't have to write a bunch of special agent def files if this get merged. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@pratikranaa It's not clear to me skimming the code if the variant can also be overridden? I think definitely all of these should be possible:
For example, the parent model could be "xhigh" and call a "low" subagent or vice versa. If this is possible already, I think the docs/tool should be updated so it's more visible. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The primary agent can now override which model a specific task dispatch uses (model: "provider/model-id", plus an optional variant), instead of every dispatch always using the subagent's statically- configured model. Ported from upstream anomalyco#6651 (86 reactions/44 comments -- a contested, actively-discussed ask). At least 6 independent implementations exist over ~8 months, all unmerged; PR anomalyco#34947 (open since July, 13 files) is the consolidated, community-endorsed design, but PR anomalyco#35800 (open, 4 files, smaller focused variant) is the actual primary source here: its single ctx.ask permission gate and override-first model resolution (reusing the existing Provider.parseModel) is the core mechanism. The variant parameter and its "always allow" behavior come from anomalyco#34947. anomalyco#34947 defaulted the new permission to "deny"; this fork defaults to "ask" so the feature works without extra config. New model_override permission (default "ask", pre-allowable per pattern, e.g. {"model_override": {"anthropic/*": "allow"}}). Known gaps: the override model isn't validated up front (a nonexistent model fails only when the subagent runs); no typed config key yet (works as a free-form permission key); a resumed task doesn't remember a prior override; no TUI for picking a model per dispatch; only the legacy V1 Task-tool path is covered, not V2 SessionRunner/ AgentV2 dispatch; slug task IDs, resume, timeout, fallback_model (would overlap with this fork's own model-fallback feature), metadata, and cancelRun from anomalyco#34947's fuller scope were left out. New tests in packages/opencode/test/tool/task.test.ts (10 cases) plus a default-permission test in test/agent/agent.test.ts. Verified against this fork's current dev (not just the agent's own stale worktree base): bun typecheck clean; full packages/opencode suite 3613 pass, only the 4 pre-existing, confirmed-unrelated cf-ai-gateway failures. Co-Authored-By: Claude Sonnet 5 <[email protected]>
|
This branch has been upgraded to V2. We're no longer taking PRs for V1. If you think this is still relevant, please port it over and open it for V2. — from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
[FEATURE]: Runtime model override for task tool subagents
There was an error while loading. Please reload this page.