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): allow @agent:provider/model model overrides by adambiggs · Pull Request #11217 · anomalyco/opencode

Conversation

@adambiggs

@adambiggs adambiggs commented Jan 29, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown

What does this PR do?

Adds per-subtask model overrides when invoking subagents via @agent:provider/model syntax, and plumbs the selected model through the session/message parts so the Task tool can run with that model. Includes TUI autocomplete/styling for the model segment and introduces permission.model to allow/deny/ask specific provider/model patterns for explicit model overrides.

Fixes #11215, #6651, #8278.

TUI Preview

image Screenshot 2026-01-29 at 3 44 31 PM Screenshot 2026-01-29 at 3 44 51 PM

Web UI Preview

image Screenshot 2026-01-29 at 3 38 23 PM Screenshot 2026-01-29 at 3 39 04 PM

How did you verify your code works?

  • Added tests and ran bun test
  • Manually tested in the TUI
  • Manually tested in the Web UI

Sorry, something went wrong.

Uh oh!

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

accidentalrebel and LufyCZ reacted with thumbs up emoji plibby reacted with rocket emoji plibby reacted with eyes emoji
All reactions
  • 👍 2 reactions
  • 🚀 1 reaction
  • 👀 1 reaction
@adambiggs
adambiggs requested a review from adamdotdevin as a code owner January 29, 2026 23:55
@github-actions

github-actions Bot commented Jan 29, 2026

Copy link
Copy Markdown
Contributor

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

No duplicate PRs found

All reactions

Sorry, something went wrong.

Uh oh!

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

@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch 2 times, most recently from 14d1fa9 to 1c997d4 Compare January 30, 2026 00:18
@thdxr
thdxr force-pushed the dev branch from cbab81f to 2d3c7a0 Compare January 30, 2026 04:49
@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch from 1c997d4 to 1e63176 Compare January 30, 2026 05:13
@thdxr
thdxr force-pushed the dev branch from 0098af4 to 36041c0 Compare January 30, 2026 05:15
@opencode-agent
opencode-agent Bot force-pushed the dev branch from 00637c0 to 71e0ba2 Compare January 30, 2026 14:32
@thdxr
thdxr force-pushed the dev branch 4 times, most recently from f1ae801 to 08fa7f7 Compare January 30, 2026 14:37
@rcdailey

rcdailey commented Jan 31, 2026

Copy link
Copy Markdown

Would this address the use case of: I run out of rate limits on my anthropic provider and want to switch to copilot (maybe keep the same model even) to continue working? Right now, agents are tightly coupled to 1 provider which makes them non-interoperable.

All reactions

Sorry, something went wrong.

Uh oh!

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

@adambiggs

adambiggs commented Feb 2, 2026

Copy link
Copy Markdown
Author

@rcdailey with this change, setting a specific model on an agent becomes more like a default. But if anthropic starts giving you rate limit trouble, you can just start spinning up agents with @agent:copilot/claude-sonnet-4-5 to use the same agent, same model, but Copilot as the provider.

You can even tell the agent to use a particular provider/model combo when spinning up subagents, which can be very powerful! A cool trick is to make an orchestration agent with a little table of which models are good for what kind of task, then instruct the agent to choose subagent models dynamically.

rcdailey reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch 4 times, most recently from b84c99e to 2f91c4a Compare February 5, 2026 18:59
@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch 2 times, most recently from 3ddf886 to 72f8783 Compare February 13, 2026 00:03
@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch 2 times, most recently from 61a36d9 to 6026a72 Compare February 18, 2026 22:04
@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch from 6026a72 to 1f90401 Compare February 26, 2026 18:22
adambiggs added 7 commits March 11, 2026 19:21
@adambiggs
feat: add @agent:provider/model syntax for model override
cb13926
This adds support for overriding the default model when invoking agents
using the @agent:provider/model syntax. Users can now specify which
model to use for a specific agent invocation without permanently changing
the agent's configuration.

Changes:
- Add optional `model` field to AgentPart schema with providerID and modelID
- Add `extmark.model` style scope using theme.textMuted color
- Update autocomplete to support model selection mode after typing `:`
- Implement two-color extmark rendering for @agent:provider/model
- Add model hint to synthetic text for LLM task tool invocation
- Regenerate SDK types after schema changes

Example usage:
  @explore:anthropic/claude-sonnet-4-20250514 find all API endpoints

The @agent portion uses theme.secondary color (typically magenta/purple)
and the :provider/model portion uses theme.textMuted color (gray).
@adambiggs
feat(task): add model parameter for LLM-driven model override
c9e2e4b
Enable the Task tool to accept a model parameter that overrides the
default model for subagent execution. The precedence is:
  1. params.model (explicit LLM override)
  2. agent.model (agent's configured default)
  3. parent message's model (inherited from caller)

Changes:
- Add model parameter to Task tool schema (providerID + modelID)
- Update task.txt to document model parameter and list available models
- Replace {models} placeholder with configured provider models
- Fix case-insensitive agent name matching in autocomplete
- Fix robust colon parsing for agent names (match against known names)
- Skip file fetching when in model selection mode
- Track both agent and model extmarks for proper cleanup
- Add TODO in web app documenting TUI-only model override support

Test coverage:
- AgentPart/SubtaskPart model field schema validation
- Task tool model parameter acceptance and validation
- Task tool description includes available models list
@adambiggs
feat(permission): add model permission for Task tool model overrides
b6ff167
Add a new 'model' permission type that controls which models agents can
use when overriding the default model via the Task tool's model parameter.

Permission config example:
  "permission": {
    "model": {
      "*": "allow",
      "anthropic/claude-opus-4-*": "deny"
    }
  }

Changes:
- Add 'model' to Permission schema in config.ts
- Filter Task tool's available models list by caller's permissions
- Add model permission check in Task tool execute()
- Pass bypassModelCheck through prompt.ts for user-invoked @ syntax
- Bypass model permission when user explicitly uses @agent:provider/model

Test coverage:
- 7 unit tests for PermissionNext.evaluate with model permission
- 3 integration tests loading model permissions from config
- 1 test verifying Task tool filters models by permissions
@adambiggs
chore: regen sdk with model permission type
13f3828
@adambiggs
fix: support @agent:provider/model in web prompt
3fe02ec
@adambiggs
fix(tui): improve @agent:model autocomplete UX
4f9199c
- Display actual model IDs instead of human-readable names in autocomplete
  (e.g., 'grok-code-fast-1' instead of 'Grok Code Fast 1')
- Remove redundant provider name from model description since it's
  already visible in the model reference
- Auto-collapse trailing space when typing ':' after selecting an agent,
  enabling smooth model override flow: @explore → @explore: → pick model
- Apply same fixes to web UI (packages/app)
@adambiggs
fix: guard model entries in at popover
eed7e16
adambiggs and others added 2 commits March 11, 2026 19:21
@adambiggs
fix(test): add provider config to task tool permissions test
de5f58a
@adambiggs @claude
fix(test): use prefixed IDs in message-v2 AgentPart/SubtaskPart tests
1219361
Upstream added ID prefix validation (prt_, ses_, msg_) so test fixtures
need valid prefixed IDs instead of bare strings.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@adambiggs
adambiggs force-pushed the feat/agent-model-syntax branch from 0da8dde to 1219361 Compare March 12, 2026 02:40
@adambiggs @claude
fix(test): handle Windows line endings in task tool permissions test
00a87fa
The task.txt template gets checked out with \r\n on Windows CI,
so use regex matching instead of literal \n\n assertions.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@adambiggs

adambiggs commented Mar 12, 2026

Copy link
Copy Markdown
Author

Hey @adamdotdevin just wanted to bump this one. The @agent:provider/model syntax for overriding task models has been really useful in my testing, and I think the community would get a lot of value from it too. Would love to get your eyes on it when you get a chance!

All reactions

Sorry, something went wrong.

Uh oh!

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

@adambiggs adambiggs mentioned this pull request Mar 15, 2026
feat: add assign-model feature for subagent model selection #17570
Closed
3 of 6 tasks
@github-actions github-actions Bot mentioned this pull request Mar 21, 2026
feat(task): add model override for subagents #18528
Closed
3 of 6 tasks
@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 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
@github-actions

github-actions Bot commented May 11, 2026

Copy link
Copy Markdown
Contributor

Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.

All reactions

Sorry, something went wrong.

Uh oh!

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

@github-actions github-actions Bot closed this May 11, 2026
@RajatGarga

RajatGarga commented Aug 22, 2026

Copy link
Copy Markdown

Bump?

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.

[FEATURE]: @agent:provider/model syntax to override subagent model on the fly

Uh oh!

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

3 participants

@adambiggs @rcdailey @RajatGarga
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.