Commit 639c78f
John Ferguson
feat: add session model switching for plugin-driven model routing
Adds first-class session model switching that allows plugins to dynamically
change the active model for a session. Model changes persist across turns,
update the UI, and are inherited by subagents.
Key changes:
- Add model/modelVariant fields to Session.Info with database migration
- Add Session.setModel() backend API for programmatic model changes
- Add PATCH /session/:sessionID/model HTTP route
- Chat.message hook mutations flow through Session.setModel()
- TUI syncs session model via reactive effect on sync.session.get()1 parent 1812130 commit 639c78f
File tree
9 files changed
+1563
-0
lines changed- packages/opencode
- migration/20260401004113_add_session_model
- src
- cli/cmd/tui/component/prompt
- provider
- server/routes
- session
- test/session
9 files changed
+1563
-0
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
0 commit comments