Skip to content

Fix model picker breaking when Cursor CLI is unavailable#117

Open
Zeus-Deus wants to merge 1 commit into
Emanuele-web04:mainfrom
Zeus-Deus:feature/103-bug-retry-models-when-cursor-cli-is-not-available
Open

Fix model picker breaking when Cursor CLI is unavailable#117
Zeus-Deus wants to merge 1 commit into
Emanuele-web04:mainfrom
Zeus-Deus:feature/103-bug-retry-models-when-cursor-cli-is-not-available

Conversation

@Zeus-Deus
Copy link
Copy Markdown

Fixes #103

When the Cursor CLI isn't installed or authenticated, Cursor's model discovery fails — and that failure was rejecting the whole models query, leaving the model picker stuck in a loading/error state for every provider.

Changes

  • providerModelsQueryOptions now catches discovery failures and resolves to an empty result instead of rejecting. A failing CLI degrades only that provider; every other provider keeps its models.
  • The Cursor/Kilo discovery skeleton is gated on isLoading instead of isFetching, so background refetches don't re-blank the picker once discovery has settled.
  • Added tests covering a single provider failing without affecting the others, plus a missing kilo key in an existing test fixture.

Testing

  • bun lint and bun run test pass.
  • Verified in the app: with Cursor's binary path pointed at a missing binary, the picker opens normally, Cursor falls back to its static model list, and every other provider works as usual.

Note: bun typecheck still reports one pre-existing, unrelated error in composerDraftStore.ts (Pi provider), and two server tests fail for environment reasons — both already present on main and untouched here.

Model discovery runs per provider, but a failing CLI rejected the
whole query and left the shared model picker stuck in a loading/error
state instead of degrading only that provider.

- Catch discovery failures in providerModelsQueryOptions and resolve
  to an empty result, so one provider's failure no longer blanks the
  picker. Every other provider keeps its own models.
- Gate the Cursor/Kilo discovery skeleton on isLoading so background
  refetches don't re-blank the picker once discovery has settled.
- Add coverage proving a single provider failure doesn't affect the
  others, and fix a missing kilo key in an existing test fixture.

Fixes Emanuele-web04#103
@github-actions github-actions Bot added size:M vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Retry models, When cursor CLI is not available.

1 participant