Description
Description:
When using the web UI with multiple chat sessions, switching between sessions in the sidebar resets the model dropdown to the config default instead of showing the target session's stored model.
Steps to reproduce:
- Start a new session in the web UI
- Change the model via the dropdown (e.g., from your default to a different model)
- Send a message (model persists correctly at this point - confirmed in DB)
- Click a different session in the sidebar to switch to it
- The model dropdown resets to whatever model is set in your opencode.json config default
Expected behavior:
Switching to an existing session should load that session's stored model into the dropdown. Each session has its own model column in the database (stores {"id":"model-id","providerID":"provider","variant":"variant"}), and the dropdown should reflect that stored value.
Actual behavior:
The dropdown always initializes from the config default on session switch, ignoring the per-session model stored in the database.
Database evidence:
The session table has a model column. Each session stores its own model selection. For example, session A might store {"id":"mimo-v2.5-free","providerID":"opencode","variant":"high"} while the config default is opencode-go/deepseek-v4-flash. The backend correctly persists the model during message send, and the stored value survives across page refreshes. The bug is only triggered on session switch.
Related issues:
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response
Description
Description:
When using the web UI with multiple chat sessions, switching between sessions in the sidebar resets the model dropdown to the config default instead of showing the target session's stored model.
Steps to reproduce:
Expected behavior:
Switching to an existing session should load that session's stored model into the dropdown. Each session has its own
modelcolumn in the database (stores{"id":"model-id","providerID":"provider","variant":"variant"}), and the dropdown should reflect that stored value.Actual behavior:
The dropdown always initializes from the config default on session switch, ignoring the per-session model stored in the database.
Database evidence:
The
sessiontable has amodelcolumn. Each session stores its own model selection. For example, session A might store{"id":"mimo-v2.5-free","providerID":"opencode","variant":"high"}while the config default isopencode-go/deepseek-v4-flash. The backend correctly persists the model during message send, and the stored value survives across page refreshes. The bug is only triggered on session switch.Related issues:
Plugins
No response
OpenCode version
No response
Steps to reproduce
No response
Screenshot and/or share link
No response
Operating System
No response
Terminal
No response