Skip to content

Windows & Linux: the chat's picker offers the providers that are set up - #364

Closed
shakibbinkabir wants to merge 1 commit into
Louis-CFM:mainfrom
shakibbinkabir:chat-picker-configured
Closed

shakibbinkabir wants to merge 1 commit into
Louis-CFM:mainfrom
shakibbinkabir:chat-picker-configured

Conversation

@shakibbinkabir

Copy link
Copy Markdown
Contributor

A proposal, separate from #363 so each can be decided on its own. This one changes behaviour, and it departs from the Mac, so say no if you want the two to stay alike.

What changes

The picker lists every cloud provider whether or not it has a key. Picking one without a key leads to "No API key — add it in Settings". Model servers already work differently: Ollama, LM Studio and a custom server only show once connected.

This treats cloud providers the same way: one shows once its key is in the credential store. The active provider always shows, so the picker never hides where the chat goes. With nothing set up, the active provider still says its key is missing and links to Settings, exactly as today.

Before (0.2.0) After

Same machine, same keys: Anthropic, Google and OpenRouter have one, OpenAI does not. The chips keep their look and their order; only the one with nothing behind it is gone.

How

  • visibleProviders(settings, hasKey) in core/providers.ts is the whole rule and stays pure.
  • The picker asks the credential store whether each provider's key is there, when it is built and each time it opens, so a key added in Settings shows the next time. It only ever asks about presence, as before.

Parity

On the Mac, ModelPickerView shows the cloud providers always. If you want this there too, it is the same filter with KeychainStore; I can add it, compiled and tested by CI only, since I have no Mac.

Tests

  • npm test: 325 pass. The providers test is rewritten for the new rule, and the chat test that pinned four chips with no key now expects only the active one; one new test covers a key added between two openings. tsc --noEmit clean. No Rust change.
  • Run by hand on Windows 11 with a release build. Linux not run; it shares the code.

🤖 Generated with Claude Code

The picker listed every cloud provider, with or without a key, next to the
model servers, which only show once connected. It now treats them alike: a
cloud provider shows once its key is in the credential store, a model server
once it is connected, and the active provider always, so the picker never
hides where the chat goes. With nothing set up, the active provider says its
key is missing and links to Settings, as before.

The store is only asked whether each key is there, when the picker is built
and each time it opens, so a key added in Settings shows the next time.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@shakibbinkabir

Copy link
Copy Markdown
Contributor Author

Folded into #365, which has this as one of four separate commits you can take or leave on their own.

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