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(task): add model override for subagents by Quadina · Pull Request #18528 · anomalyco/opencode

Conversation

@Quadina

@Quadina Quadina commented Mar 21, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #17595

Type of change

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

What does this PR do?

Adds a model parameter to the task tool so the orchestrator can pick which model a subagent runs on ("provider/model-id" format). Gated by a model_override permission — denied by default, users opt-in via config with support for wildcards like "anthropic/*": "allow".

Without permission the override is silently ignored and the subagent uses its default model.

How did you verify your code works?

bun test test/tool/task.test.ts — 14 tests pass (parseModel parsing + permission evaluation).
bun typecheck — clean.

Screenshots / recordings

N/A — no UI changes.

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.

zoc, vygridofficial, and artuate2 reacted with thumbs up emoji
All reactions
  • 👍 3 reactions
TestUser added 3 commits March 17, 2026 17:06
TestUser
feat(opencode): add model override for task tool subagents
1c56527
Allow callers to specify a model when delegating to a subagent via the
task tool. The override is gated by a new "model_override" permission
(denied by default) so users must explicitly allow models or providers
in their config before an LLM can switch models autonomously.
TestUser
ci: retry typecheck
1b312bd
TestUser
chore: resolve merge conflicts with origin/dev
9425318
@github-actions

github-actions Bot commented Mar 21, 2026

Copy link
Copy Markdown
Contributor

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

Based on my search, I found several related PRs that address similar functionality around model selection for subagents:

Potentially Related PRs:

  1. PR feat: add assign-model feature for subagent model selection #17570 - "feat: add assign-model feature for subagent model selection"

    • Directly addresses subagent model selection, which overlaps with the current PR's functionality
  2. PR fix: prioritize CLI --model argument over command markdown model #17788 - "fix: prioritize CLI --model argument over command markdown model"

    • Related to model parameter handling and prioritization
  3. PR fix(agent): honor model:inherit in subagent frontmatter #17888 - "fix(agent): honor model:inherit in subagent frontmatter"

    • Addresses model inheritance for subagents, complementary to the override feature
  4. PR feat(task): allow @agent:provider/model model overrides #11217 - "feat(task): allow @agent:provider/model model overrides"

    • Directly related to model overrides in the task tool with provider/model format

These PRs are related to the same general area (subagent model selection and overrides), though PR #18528 appears to be the unique implementation addressing the specific model_override permission gating mentioned in issue #17595.

All reactions

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 Mar 22, 2026
feat(opencode): add native dynamic subagent task support #18588
Closed
3 of 6 tasks
TestUser
Merge remote-tracking branch 'origin/dev' into feat/task-model-override
54e909f
This was referenced Mar 23, 2026
feat(plugin): add chat.model hook for dynamic model routing for token savings #18826
Closed
feat(opencode): support wildcard matching in agent config #18907
Closed
TestUser added 4 commits March 29, 2026 10:21
TestUser
Merge remote-tracking branch 'origin/dev' into feat/task-model-override
829ef02
# Conflicts:
#	packages/opencode/src/agent/agent.ts
TestUser
Merge remote-tracking branch 'origin/dev' into feat/task-model-override
9db213b
TestUser
Merge remote-tracking branch 'origin/dev' into feat/task-model-override
29d2a29
TestUser
Merge remote-tracking branch 'origin/dev' into feat/task-model-override
3d4c82e
@github-actions github-actions Bot mentioned this pull request Apr 11, 2026
feat: per-model timeout, permissions, fallback, and wildcard glob support #22055
Closed
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 2f2ed11 to 9f201d6 Compare April 16, 2026 21:55
@github-actions github-actions Bot mentioned this pull request Apr 26, 2026
feat(agent): add orchestrate subagent for task decomposition #24450
Closed
3 of 7 tasks
@github-actions github-actions Bot mentioned this pull request May 5, 2026
feat(task-tool): Add model parameter for subagent LLM routing #25881
Closed
@ziuus

ziuus commented May 5, 2026

Copy link
Copy Markdown

Testing this feature locally - works great! This is needed for orchestrating specialized agents with different LLMs (vision models, coding models, research models).

Could this be reviewed and merged ASAP? It's a clean implementation with:

  • Permission-gated model override (secure)
  • Proper format validation (provider/model-id)
  • Tests included

Happy to help with any changes needed to get this merged quickly.

All reactions

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 9, 2026
feat(opencode): add model parameter to task tool for subagent model override #26535
Closed
3 of 6 tasks
@funkybooboo funkybooboo mentioned this pull request May 9, 2026
[FEATURE]: Runtime model override for task tool subagents #17595
Closed
1 task done
@rekram1-node

rekram1-node commented May 15, 2026

Copy link
Copy Markdown
Member

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

All reactions

Sorry, something went wrong.

Uh oh!

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

@rekram1-node rekram1-node closed this May 15, 2026
@ziuus

ziuus commented May 18, 2026

Copy link
Copy Markdown

Hi @rekram1-node, I noticed this PR was closed by the automated cleanup. I've been testing this feature extensively in my local environment, and it is critical for orchestrating specialized agents (vision, coding, research) with different LLMs. It's a clean implementation that solves issue #17595. Could you please reopen this for review? I'm happy to make any necessary adjustments to get this merged. Thanks!

All reactions

Sorry, something went wrong.

Uh oh!

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

@bernhardberger bernhardberger mentioned this pull request Sep 6, 2026
Reject invalid model references before launching a subagent lars-hagen/opencode-task-model#1
Open
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

None yet

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.

3 participants

@Quadina @ziuus @rekram1-node
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.