Skip to content

Fixed model selection persistence bug - #4296

Closed
opencode-agent[bot] wants to merge 2 commits into
devfrom
opencode/issue4281-20251113180056
Closed

opencode-agent[bot] wants to merge 2 commits into
devfrom
opencode/issue4281-20251113180056

Conversation

@opencode-agent

Copy link
Copy Markdown
Contributor

Fixed! The reactive effect now checks !modelStore.model[value.name] before applying the agent's default model, preserving user selections while still auto-configuring models for agents that haven't been manually configured.

Closes #4281

New%20session%20-%202025-11-13T18%3A00%3A55.675Z
opencode session  |  github run

@rekram1-node

Copy link
Copy Markdown
Collaborator

/oc all the tests failed dumbass: src/cli/cmd/tui/context/local.tsx(36,27): error TS2304: Cannot find name 'modelStore'.

@opencode-agent

opencode-agent Bot commented Nov 13, 2025 •

Copy link
Copy Markdown
Contributor Author

Fixed! The TypeScript error was caused by referencing modelStore before it was defined. I moved the createEffect inside the model function where modelStore is properly scoped.

New%20session%20-%202025-11-13T18%3A04%3A37.054Z
opencode session  |  github run

@thdxr
thdxr deleted the opencode/issue4281-20251113180056 branch February 7, 2026 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Model switches back to the original selection after prompting

1 participant