GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(opencode): add task model override by kobicovaldev · Pull Request #29447 · anomalyco/opencode

Conversation

@kobicovaldev

@kobicovaldev kobicovaldev commented May 26, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #17595

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

This adds an optional model parameter to the Task tool so a primary agent can choose a subagent model at runtime using provider/model format.

The model selection order is explicit Task model, then the configured subagent model, then the parent assistant message model. Explicit overrides are gated behind a new model_override permission, which defaults to deny. The implementation validates malformed model strings early, asks model_override before the normal task permission, and uses exact-model approval scope.

This is a refreshed forward-port of #26535 onto current dev. Credit to @funkybooboo for the original implementation and design. I opened this separately because #26535 is conflicted and far behind the base branch.

How did you verify your code works?

  • git diff --check passed.
  • bun build packages/opencode/src/tool/task.ts --packages external passed.
  • bun build packages/opencode/test/tool/task.test.ts --packages external passed.

Full local test commands were blocked in my checkout because required local tooling/dependencies were missing:

  • bun test test/tool/task.test.ts test/tool/parameters.test.ts --timeout 30000 was blocked by missing @opentui/solid/preload.
  • bun typecheck was blocked by missing tsgo.

Screenshots / recordings

Not applicable. This is not a UI change.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

taurasbear, jiehanzheng, martwz, alterhuman, mja00, jgillich, and mjerabek reacted with heart emoji
All reactions
  • ❤️ 7 reactions
@kobicovaldev
feat(opencode): add task model override
473ed05
@github-actions github-actions Bot added contributor needs:compliance This means the issue will auto-close after 2 hours. labels May 26, 2026
@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

Potential Duplicate Found

#26535 - feat(opencode): add model parameter to task tool for subagent model override

  • URL: feat(opencode): add model parameter to task tool for subagent model override #26535
  • Relationship: This is the original PR that the current PR (feat(opencode): add task model override #29447) is explicitly porting forward. As noted in the PR description, feat(opencode): add model parameter to task tool for subagent model override #26535 is currently conflicted against dev and far behind the base branch. The current PR (feat(opencode): add task model override #29447) refreshes and ports this work onto current dev with some design improvements (different permission ordering and exact-model approval strategy).

This is intentional, not a conflict—#29447 is the forward port to replace #26535.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kobicovaldev kobicovaldev mentioned this pull request May 26, 2026
feat(opencode): add model parameter to task tool for subagent model override #26535
Closed
3 of 6 tasks
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
784c602
…erride-port
@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label May 26, 2026
@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
0b8ecd0
…erride-port
@funkybooboo

funkybooboo commented May 28, 2026

Copy link
Copy Markdown

@kobicovaldev you are awesome!

kobicovaldev reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot mentioned this pull request May 28, 2026
📊 AI CLI 工具社区动态日报 2026-05-28 ivanweng2077/big_model_radar#101
Open
kobicovaldev added 6 commits May 29, 2026 16:18
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
9b92886
…erride-port
@kobicovaldev
Merge branch 'dev' into analysis-task-model-override-port
8e9e952
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
0cdf9c6
…erride-port

# Conflicts:
#	packages/core/src/v1/config/permission.ts
#	packages/opencode/src/tool/task.ts
#	packages/opencode/test/tool/task.test.ts
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
0ab95f4
…erride-port

# Conflicts:
#	packages/opencode/test/tool/task.test.ts
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
f465a73
…erride-port
@kobicovaldev
Merge remote-tracking branch 'origin/dev' into analysis-task-model-ov…
bc0557e
…erride-port
@github-actions github-actions Bot mentioned this pull request Jun 10, 2026
feat(opencode): add optional model param to Task tool and show provider in message headers #31694
Closed
3 tasks done
@kobicovaldev
Merge remote-tracking branch 'upstream/dev' into analysis-task-model-…
7114c25
…override-port
@kobicovaldev

kobicovaldev commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed this PR against latest dev (commit 4ddfa7c). Current PR checks are passing, and the diff is still scoped to the Task tool model override implementation. Ready for maintainer review when you have a chance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kobicovaldev

kobicovaldev commented Jun 12, 2026

Copy link
Copy Markdown
Contributor Author

Friendly bump for maintainer review when someone has bandwidth. This PR has been refreshed onto latest dev, is mergeable, and the current PR checks are passing. Happy to adjust anything that would make it easier to land.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Sufyan31

Sufyan31 commented Jun 13, 2026

Copy link
Copy Markdown

Hey @kobicovaldev , what is the merge plan for this PR, when can we expect this change to be in dev ?

Noah526799 reacted with rocket emoji
All reactions
  • 🚀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kobicovaldev

kobicovaldev commented Jun 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the interest @Sufyan31. I’m the PR author, but I don’t have merge permissions on this repo, so this is waiting on maintainer review/merge.

The PR is currently mergeable, checks are passing, and maintainerCanModify is enabled. @thdxr / @adamdotdevin, would one of you be able to review or let me know if anything else is needed to land this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@tossp

tossp commented Jun 18, 2026

Copy link
Copy Markdown

Thanks for carrying this forward.

A strong +1 from a multi-model independent sampling / review convergence use case: the important part for us is being able to have one orchestrator delegate the same role/prompt to different models in the same run, then compare agreement/disagreement and converge on the result.

That is useful for review-consensus and second-opinion loops, and it breaks down if we have to duplicate agent definitions per model. We want agents to stay role-centric, with the caller choosing the model per invocation when needed.

So this feels directly aligned with #17595 and #29984, and it would also help unblock downstream review flows like #30289. Not asking for a separate fallback mechanism here — just first-class runtime model selection for Task/subagent calls.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@iceteaSA iceteaSA mentioned this pull request Jul 2, 2026
feat(opencode): add dispatch controls to the task tool #34947
Closed
3 tasks done
@pratikranaa pratikranaa mentioned this pull request Jul 7, 2026
feat(opencode): add runtime model override for task tool subagents #35800
Closed
3 of 6 tasks
@kobicovaldev

kobicovaldev commented Jul 28, 2026

Copy link
Copy Markdown
Contributor Author

Closing this PR as superseded by #34947, which carries the permission-gated Task model override forward and is now the active implementation. Please follow #34947 for review and landing progress.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kobicovaldev kobicovaldev closed this Jul 28, 2026
randomvariable added a commit to randomvariable/opencode that referenced this pull request Aug 3, 2026
@randomvariable @claude
feat(opencode): add task model override
77d6c3b
Add an optional `model` parameter to the task tool (provider/model format)
that overrides the subagent's model, gated behind a new `model_override`
permission that defaults to deny. Selection precedence is the `model`
parameter, then the subagent's configured model, then the parent assistant
message model.

Ported from anomalyco#29447 (adapted for the Effect layer).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
randomvariable added a commit to randomvariable/opencode that referenced this pull request Aug 3, 2026
@randomvariable @claude
feat(opencode): interrupt a running subagent — steer / cancel / abort
cd4f0a2
Add an experimental subagent-interrupt capability (behind
OPENCODE_EXPERIMENTAL_SUBAGENT_INTERRUPT): an Interrupt service with
pending/terminal state, task_steer/task_cancel/task_abort tools (gated by a
new `interrupt` permission), a POST /session/:id/interrupt endpoint, and a
turn-boundary consume in the prompt loop that injects an escaped steer/cancel
frame plus a visible transcript marker. Cancel records a terminal reason and
force-breaks after a grace window; abort writes a marker, records the
terminal, and cancels the BackgroundJob immediately. The TUI gains an
esc-with-reason flow, footer button, and distinct interrupt markers.

Ported from anomalyco#32425 (adapted for the Effect layer; merged with the prior
task.ts/registry.ts/prompt.ts changes from anomalyco#29447/anomalyco#32122/anomalyco#12520/anomalyco#32192/anomalyco#19961).

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
@leoncheng57 leoncheng57 mentioned this pull request Aug 26, 2026
feat(task): allow selecting a model per task invocation (1.18.23 lineage) leoncheng57/opencode#4
Merged
3 of 6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Runtime model override for task tool subagents

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@kobicovaldev @funkybooboo @Sufyan31 @tossp
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.