Skip to content

fix(providers): keep Token Plan catalog across registry races - #1124

Merged
XingYu-Zhong merged 1 commit into
developfrom
codex/fix-tokenplan-model-catalog-race
Aug 7, 2026
Merged

fix(providers): keep Token Plan catalog across registry races#1124
XingYu-Zhong merged 1 commit into
developfrom
codex/fix-tokenplan-model-catalog-race

Conversation

@XingYu-Zhong

Copy link
Copy Markdown
Collaborator

Summary

  • Prevent Aliyun Token Plan fetched models from reverting when AppSettings and the model-connections registry race.
  • Connect missing shared connections before catalog PATCH, retain pending local catalogs during SSE projection, and skip AppSettings writes while a catalog drain is in flight.

Changes

  • commitSharedModelConnectionCatalog accepts an optional connect source and performs connect-then-patch.
  • projectSharedModelConnections keeps local-only providers that still have a pending catalog (plus the DeepSeek placeholder).
  • SSE refresh skips AppSettings projection writes while hasInFlightSharedProviderCatalogMutation() is true.

Tests

  • npx vitest run src/renderer/src/components/settings-section-providers.test.ts (44 passed)
  • git diff --check

Fixes #1117

Made with Cursor

Fetch/import could stage models before the shared connection existed,
so catalog commit failed and SSE projection dropped the local provider
back to presets. Connect-then-patch missing connections, retain pending
local catalogs during projection, and skip AppSettings writes while a
catalog drain is in flight.

Fixes #1117

Co-authored-by: Cursor <cursoragent@cursor.com>
@XingYu-Zhong
XingYu-Zhong merged commit ccfc194 into develop Aug 7, 2026
3 checks passed
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