[PR #6359] fix: prevent model list corruption from SolidJS reactivity #11855

Closed
opened 2026-02-16 18:16:47 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/6359

State: closed
Merged: Yes


Model store gets fed react proxy objects, so the cache is corrupted on some model changes.

  • Deep copy objects when inserting into recent/favorite stores to break reactive proxy references
  • Only filter models from provider sections if actually displayed in Recent section

To repeat the existing problem (and show that the new behavior is correct), try this without exiting opencode in between.

  • Enter opencode
  • /models # and change to a model not on recent list
  • /models. # and change back to the previous model again
  • /models. # will show that is has lost your first model change.
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6359 **State:** closed **Merged:** Yes --- Model store gets fed react proxy objects, so the cache is corrupted on some model changes. - Deep copy objects when inserting into recent/favorite stores to break reactive proxy references - Only filter models from provider sections if actually displayed in Recent section To repeat the existing problem (and show that the new behavior is correct), try this without exiting opencode in between. * Enter opencode * /models # and change to a model not on recent list * /models. # and change back to the previous model again * /models. # will show that is has lost your first model change.
yindo added the pull-request label 2026-02-16 18:16:47 -05:00
yindo closed this issue 2026-02-16 18:16:47 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11855