Skip to content

fix(models): reload the model catalog on reconnect and broadcast its events - #413

Merged
chriswritescode-dev merged 1 commit into
mainfrom
fix/model-catalog-refresh
Oct 9, 2026
Merged

chriswritescode-dev merged 1 commit into
mainfrom
fix/model-catalog-refresh

Conversation

@chriswritescode-dev

Copy link
Copy Markdown
Owner

Summary

Model pickers without a location (goal auditor and walkthrough model in settings) could stay stuck on an empty model list after OpenCode loaded or restarted.

Validation

  • backend: vitest run test/services/sse-aggregator.test.ts (41 passed)
  • frontend: vitest run src/contexts/EventContext.test.tsx (69 passed)
  • pnpm lint:backend, pnpm lint:frontend

…events

Model pickers without a location, such as the goal auditor and walkthrough model settings, could stay stuck on an empty model list. OpenCode's model and provider catalog events were only delivered to clients subscribed to the originating directory, and the provider catalog was not reloaded on a browser stream reconnect or upstream resync, so a list cached empty while OpenCode was loading or restarting never refreshed.

Route model.updated, provider.updated and integration.updated through the resolved-event broadcast like the command, agent and skill catalogs, and reload the provider catalog on reconnect and resync alongside them.
@chriswritescode-dev
chriswritescode-dev merged commit 458f3a4 into main Oct 9, 2026
1 of 2 checks passed
@chriswritescode-dev
chriswritescode-dev deleted the fix/model-catalog-refresh branch October 9, 2026 15:44
@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 38c03def-eff4-4f84-a70c-e3f810bdd5ed

📥 Commits

Reviewing files that changed from the base of the PR and between 4eec94b and 9c32ba2.


📒 Files selected for processing (4)
  • backend/src/services/sse-aggregator.ts
  • backend/test/services/sse-aggregator.test.ts
  • frontend/src/contexts/EventContext.test.tsx
  • frontend/src/contexts/EventContext.tsx

 __________________________________________________________
< My fitness tracker wants me to tackle 10,000 bugs a day. >
 ----------------------------------------------------------
  \
   \   (\__/)
       (•ㅅ•)
       /   づ
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR

🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR


  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

1 participant