[PR #11217] feat(task): allow @agent:provider/model model overrides #13701

Open
opened 2026-02-16 18:18:32 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/11217

State: open
Merged: No


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
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/11217 **State:** open **Merged:** No --- ### 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 <img width="387" height="160" alt="image" src="https://github.com/user-attachments/assets/c7879213-3a24-4d07-ae3a-3c1fc6824356" /> <img width="480" height="321" alt="Screenshot 2026-01-29 at 3 44 31 PM" src="https://github.com/user-attachments/assets/7c36caf8-7d25-4999-95f4-af95cfd5f0ca" /> <img width="480" height="248" alt="Screenshot 2026-01-29 at 3 44 51 PM" src="https://github.com/user-attachments/assets/152df69b-992b-4b65-95a0-08902e08a7e3" /> ### Web UI Preview <img width="496" height="245" alt="image" src="https://github.com/user-attachments/assets/aceea93e-6d91-4b5c-b1a0-953814902891" /> <img width="579" height="347" alt="Screenshot 2026-01-29 at 3 38 23 PM" src="https://github.com/user-attachments/assets/596c3f62-37cb-45c6-8fe5-c8f72289cef7" /> <img width="578" height="346" alt="Screenshot 2026-01-29 at 3 39 04 PM" src="https://github.com/user-attachments/assets/12496d0f-530e-4067-b433-59f7a393bbe9" /> ### How did you verify your code works? - Added tests and ran `bun test` - Manually tested in the TUI - Manually tested in the Web UI
yindo added the pull-request label 2026-02-16 18:18:32 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13701