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: add assign-model feature for subagent model selection by VenTheZone · Pull Request #17570 · anomalyco/opencode

Conversation

@VenTheZone

@VenTheZone VenTheZone commented Mar 15, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

Issue for this PR

Closes #

Type of change

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

What does this PR do?

Adds the ability to assign specific AI models to subagents via config and UI. This allows users to specify which models subagents should use without modifying agent definitions.

Changes:

  • Added subagent_model_assignments field to opencode.json config
  • Implemented global + project-specific scope (project overrides global)
  • Added Desktop UI: multi-step dialog (agent → provider → model → scope)
  • Added TUI: /assign-model command with Ctrl+X P keybind
  • Subagents automatically use assigned models at runtime
  • Changes restart the current session to apply immediately

How did you verify your code works?

  • Ran bun typecheck - passes
  • Ran bun test in packages/opencode - all assign-model tests pass
  • Verified config merge behavior with unit tests
  • Tested subagent model resolution with mocked providers

Screenshots / recordings

Screenshot will be uploaded later today.

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.

Paatricious reacted with rocket emoji
All reactions
  • 🚀 1 reaction
@VenTheZone
feat: add assign-model feature for subagent model selection
158a691
Why: Users need to specify which AI models subagents should use without
modifying agent definitions. This enables per-subagent model preferences
that persist across sessions and can be scoped globally or per-project.

What changed:
- Add subagent_model_assignments config field (global + project scoped)
- Implement model resolution at runtime for subagent task execution
- Add Desktop UI with multi-step dialog (agent→provider→model→scope)
- Add TUI dialog with Ctrl+X P keybind (verified no conflicts)
- Add /assign-model slash command in both interfaces
- Add comprehensive tests for config merging and model resolution
- Regenerate SDK types for new config field

Project config overrides global for individual agents. Changes take
effect immediately by restarting the current session experience.
@VenTheZone
VenTheZone requested a review from adamdotdevin as a code owner March 15, 2026 08:15
@github-actions github-actions Bot added the needs:compliance This means the issue will auto-close after 2 hours. label Mar 15, 2026
@github-actions

github-actions Bot commented Mar 15, 2026

Copy link
Copy Markdown
Contributor

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

Based on the search results, I found related PRs that might be working on similar features for subagent model selection:

Potentially Related PRs:

  1. PR feat: add model parameter to Task tool for dynamic subagent model selection #14961: "feat: add model parameter to Task tool for dynamic subagent model selection"

    • feat: add model parameter to Task tool for dynamic subagent model selection #14961
    • This directly addresses dynamic subagent model selection, which overlaps with PR feat: add assign-model feature for subagent model selection #17570's core functionality.
  2. PR feat(agent): implement model tier selection with variant support for subagents #11377: "feat(agent): implement model tier selection with variant support for subagents"

    • feat(agent): implement model tier selection with variant support for subagents #11377
    • Similar goal of allowing different models for subagents through variant support.
  3. PR feat: add agent default variant handling in TUI and desktop #7156: "feat: add variant support for subagents"

    • feat: add agent default variant handling in TUI and desktop #7156
    • Provides the foundational variant support mechanism that could be used for model assignments.

These PRs are potentially addressing overlapping concerns about giving users control over which models subagents use. You may want to review these (especially PR #14961) to ensure there's no duplication of effort or to understand how the current PR differs in approach.

All reactions

Sorry, something went wrong.

Uh oh!

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

@adambiggs

adambiggs commented Mar 15, 2026

Copy link
Copy Markdown

I have something like this here: #11217

All reactions

Sorry, something went wrong.

Uh oh!

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

@VenTheZone

VenTheZone commented Mar 15, 2026

Copy link
Copy Markdown
Author

I have something like this here: #11217

It shouldnt conflict though. Yours is more direct, mines a list of connected API, a selection like how you would change models for the main agent

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Mar 15, 2026
@github-actions

github-actions Bot commented Mar 15, 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.

@github-actions github-actions Bot mentioned this pull request Mar 15, 2026
feat(opencode): add model override for task tool subagents #17577
Closed
3 of 6 tasks
@Quadina Quadina mentioned this pull request Mar 15, 2026
[FEATURE]: Runtime model override for task tool subagents #17595
Closed
1 task done
This was referenced Mar 21, 2026
feat(task): add model override for subagents #18528
Closed
feat(opencode): add native dynamic subagent task support #18588
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 25, 2026
feat(tui): assign model to specific agent via Ctrl+E #24317
Closed
3 tasks done
This was referenced May 5, 2026
feat(task-tool): Add model parameter for subagent LLM routing #25881
Closed
feat(opencode): add model parameter to task tool for subagent model override #26535
Closed
@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
@Paatricious

Paatricious commented Aug 3, 2026

Copy link
Copy Markdown

Wanted to create a PR for exactly this, but OP's idea is spot on what I would like to have in Opencode too.
"At dispatch time, a native prompt showing "which agent, which model" for that task - chosen per session, everything interchangeable on the fly"

+support from me.

All reactions

Sorry, something went wrong.

Uh oh!

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin

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.

Uh oh!

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

4 participants

@VenTheZone @adambiggs @rekram1-node @Paatricious
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.