You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Model selection: prefer session history over agent default (-m) #11334
When a session's model is changed via the model picker, integrations that call session.prompt without an explicit model can still be forced back to the agent's default model (e.g. when started with -m).\n\nExpected: the session's currently selected model (last used for that agent) should be used unless the request explicitly supplies a model.\n\nCurrent: resolution order is input.model ?? agent.model ?? lastModel(sessionID), which makes -m effectively pin the model and ignore session selection.\n\nRepro:\n1) Start a session with opencode -m \n2) Switch model to in the session\n3) Submit a prompt from another caller that does not pass model\n4) It uses modelA instead of modelB
Likely same root cause as #4243 and #4901 (agent/default model taking precedence when a prompt doesn't explicitly pass model). PR #11332 proposes resolving session-selected model before agent default.
Activity
github-actions commentedon Jan 30, 2026
This issue might be a duplicate of existing issues. Please check:
Feel free to ignore if none of these address your specific case.
rickross commentedon Jan 30, 2026
Likely same root cause as #4243 and #4901 (agent/default model taking precedence when a prompt doesn't explicitly pass model). PR #11332 proposes resolving session-selected model before agent default.
github-actions commentedon Apr 1, 2026
To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.