[FEATURE]: Same model for all agents #4612

Closed
opened 2026-02-16 17:44:47 -05:00 by yindo · 8 comments
Owner

Originally created by @ravshansbox on GitHub (Jan 10, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Do we have a config option to prevent model switching when agent is switched?

Originally created by @ravshansbox on GitHub (Jan 10, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request Do we have a config option to prevent model switching when agent is switched?
yindo added the discussion label 2026-02-16 17:44:47 -05:00
yindo closed this issue 2026-02-16 17:44:47 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 10, 2026):

This issue might be a duplicate or related to existing issues. Please check:

  • #7099: Server API ignores agent's configured model when only agent parameter is passed
  • #6636: Subagent with specific model results in model change in build and plan mode
  • #4475: Plugins using noReply seem to cause model to switch to agent default
  • #7492: Primary agents lack identity awareness when user switches agents
  • #7138: Support default variant configuration per agent

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 10, 2026): This issue might be a duplicate or related to existing issues. Please check: - #7099: Server API ignores agent's configured model when only agent parameter is passed - #6636: Subagent with specific model results in model change in build and plan mode - #4475: Plugins using noReply seem to cause model to switch to agent default - #7492: Primary agents lack identity awareness when user switches agents - #7138: Support default variant configuration per agent Feel free to ignore if none of these address your specific case.
Author
Owner

@m10rten commented on GitHub (Jan 10, 2026):

You can give each agent the same model in the config if that is what you are looking for.
Am not aware of a config option to keep model the same always, imo that would default the purpose of the model property in the agents.

@m10rten commented on GitHub (Jan 10, 2026): You can give each agent the same model in the config if that is what you are looking for. Am not aware of a config option to keep model the same always, imo that would default the purpose of the model property in the agents.
Author
Owner

@bukanpeneliti commented on GitHub (Jan 10, 2026):

do you mean this?

{
"$schema": "https://opencode.ai/config.json",
"agent": {
"build": {
"mode": "primary",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "{file:./prompts/build.txt}",
"tools": {
"write": true,
"edit": true,
"bash": true
}
},
"plan": {
"mode": "primary",
"model": "anthropic/claude-haiku-4-20250514",
"tools": {
"write": false,
"edit": false,
"bash": false
}
},
"code-reviewer": {
"description": "Reviews code for best practices and potential issues",
"mode": "subagent",
"model": "anthropic/claude-sonnet-4-20250514",
"prompt": "You are a code reviewer. Focus on security, performance, and maintainability.",
"tools": {
"write": false,
"edit": false
}
}
}
}

@bukanpeneliti commented on GitHub (Jan 10, 2026): do you mean this? { "$schema": "https://opencode.ai/config.json", "agent": { "build": { "mode": "primary", "model": "anthropic/claude-sonnet-4-20250514", "prompt": "{file:./prompts/build.txt}", "tools": { "write": true, "edit": true, "bash": true } }, "plan": { "mode": "primary", "model": "anthropic/claude-haiku-4-20250514", "tools": { "write": false, "edit": false, "bash": false } }, "code-reviewer": { "description": "Reviews code for best practices and potential issues", "mode": "subagent", "model": "anthropic/claude-sonnet-4-20250514", "prompt": "You are a code reviewer. Focus on security, performance, and maintainability.", "tools": { "write": false, "edit": false } } } }
Author
Owner

@ravshansbox commented on GitHub (Jan 10, 2026):

@bukanpeneliti no, I do not want to hardcode a model in config, because often switch them. But I want to use the same model for plan and build. Currently it remembers separate model for every agent, I want to opt out of that feature.

@ravshansbox commented on GitHub (Jan 10, 2026): @bukanpeneliti no, I do not want to hardcode a model in config, because often switch them. But I want to use the same model for plan and build. Currently it remembers separate model for every agent, I want to opt out of that feature.
Author
Owner

@ravshansbox commented on GitHub (Jan 10, 2026):

Sorry, this looks like only a case when you switch model on both agents. If you switch model only in plan mode and then switch to build mode, then it is using the same model. So, for me it's currently not an issue, I will use plan mode for switching the model (I usually switch the model only in plan mode anyway). The issue can be closed.

@ravshansbox commented on GitHub (Jan 10, 2026): Sorry, this looks like only a case when you switch model on both agents. If you switch model only in plan mode and then switch to build mode, then it is using the same model. So, for me it's currently not an issue, I will use plan mode for switching the model (I usually switch the model only in plan mode anyway). The issue can be closed.
Author
Owner

@m10rten commented on GitHub (Jan 11, 2026):

@ravshansbox ticket owner can close the ticket.

@m10rten commented on GitHub (Jan 11, 2026): @ravshansbox ticket owner can close the ticket.
Author
Owner

@ravshansbox commented on GitHub (Jan 11, 2026):

@m10rten I know, I was not sure if the solution fits everyone, maintainers may want to work on it

@ravshansbox commented on GitHub (Jan 11, 2026): @m10rten I know, I was not sure if the solution fits everyone, maintainers may want to work on it
Author
Owner

@lshariprasad commented on GitHub (Jan 11, 2026):

EXACT GitHub Comment to Close #7613:

@ravshansbox @m10rten @thdxr @bukanpeneliti

If you switch model only in plan mode and then switch to build mode, then it is using the same model... The issue can be closed.

plan mode - Change model firstSwitch to build mode - Uses same model automatically.

opencode - plan - pick model - switch to build

@lshariprasad commented on GitHub (Jan 11, 2026): EXACT GitHub Comment to Close #7613: @ravshansbox @m10rten @thdxr @bukanpeneliti If you switch model only in plan mode and then switch to build mode, then it is using the same model... The issue can be closed. plan mode - Change model firstSwitch to build mode - Uses same model automatically. opencode - plan - pick model - switch to build
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#4612