Skip to content

Providers settings page in Cline's style, with stored secrets encrypted by default - #1726

Merged
currentbits merged 1 commit into
mainfrom
coder/providers-page-1714-1715
Oct 28, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/providers-page-1714-1715

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #1714. Closes #1715.

What changes for users

  • Settings › Providers (new pane, modelled on Cline Desktop's provider settings):
    • The list has search, a "N configured · M available" count, Configured / Available / Custom groups, and an Add provider button.
    • Each provider has its own page with:
      • Sign-in state ("Signed in via claude · Max"), Sign in / Sign out / Install.
      • "Use an API key instead": API key + base URL fields (Show / Copy, "Get a … API key" link). Claude, Codex, Cursor and Grok runs pick these up, on local runs only; keys never travel to ssh/WSL command lines.
      • A Models panel: live list from the provider's /models endpoint (fetched in main; the key never reaches the renderer), search, ★ favourites and custom model ids. Favourites and custom ids show up in every model picker.
    • Add provider covers:
      • Any OpenAI-compatible endpoint, run through OpenCode (key passed as {env:…}, not written into config).
      • A second Claude Code / Codex account.
      • A custom CLI.
    • Provider rows moved out of Settings › Agents. Agent profiles and the worker pool stay there.
  • Stored secrets are encrypted by default (OS keychain via Electron safeStorage):
    • On for packaged builds; off for dev runs, which avoids the keychain prompts that got it disabled in 371f104. SOLENTA_ENABLE_SAFE_STORAGE=1/0 forces either way.
    • A sealed value that can't be opened is kept on disk and reported as locked instead of being dropped.
    • OpenAI-compatible custom headers (often Authorization: Bearer …) are sealed too.
    • Machines without a keychain backend show "Secrets are stored unencrypted on this machine".

Release notes ⚠️

  • Ship prod and Nightly together. They share userData; a build without this change drops enc:v1: values when it loads them.
  • Each channel asks for keychain access once (different signatures, shared keychain item).
  • Ad-hoc-signed local packaged builds will prompt; SOLENTA_ENABLE_SAFE_STORAGE=0 is the escape hatch.

Known limits

  • A locked secret can't be cleared by blanking its field: replace it or delete the row.
  • Renaming an MCP server or GitHub host whose secret is locked loses that ciphertext.

Testing

On top of current origin/main:

  • npm run typecheck (incl. the IPC preload sync check): passes.
  • npx vite build: passes.
  • npm run test:electron: 5090/5090 pass (run with inherited CODER_* vars removed).
  • Renderer suite: 3210/3210 pass.
  • New tests: electron/test/providers-settings-pane.test.js (env mapping, base overlay local-only, opencode provider config, live model fetch with mocked fetch) and electron/test/secrets.test.js (defaults, migration, locked round-trip, header sealing). test/settingsModal.test.tsx covers the pane UI.

🤖 Generated with Claude Code

…ed by default (#1714, #1715)

Settings › Providers replaces the provider rows in Agents: a searchable
list (Configured / Available / Custom), and a page per provider with its
sign-in state, an API key and base URL that runs pick up, and a models
panel with live fetch, search, favourites and custom ids. "Add provider"
creates OpenAI-compatible endpoints (run through opencode), second
Claude/Codex accounts, or custom CLIs.

Stored secrets are now encrypted with the OS keychain by default in
packaged builds (dev runs stay off to avoid keychain prompts), and a
sealed value that can't be opened is kept on disk instead of dropped.
OpenAI-compatible custom headers are sealed too.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-28T11:09:10.642135Z 7f47f14 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f47f14460

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +186 to +190
if (compat && compat.openaiCompatible) {
opencodeEnv = { ...opencodeEnv, ...instanceEnv(compat) };
const prefs = (store.getSettings().providerModels || {})[`opencode:${compat.id}`];
const prefix = `${compat.id}/`;
const extra = [...((prefs && prefs.custom) || []), thread.model || ""]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Apply the compatible provider's default model to runs

When a user selects an OpenAI-compatible provider's Default row, thread.model is null, but this block only registers the provider and never applies openaiCompatible.defaultModel. The serve call still receives thread.model || null, so electron/opencode-serve.js omits body.model; the generated config also contains no top-level model selection. Consequently, the selected endpoint and its configured default are not enforced, and OpenCode can use its global/default model instead. Resolve the instance's default to <instance id>/<default model> and use it for both transports when no explicit model is selected.

Useful? React with 👍 / 👎.

Comment on lines +1287 to +1290
for (const id of pref.custom) {
if (p.models.includes(id)) continue;
p.models.push(id);
p.modelInfo.push({ id, label: id, description: "Custom model", vendor: "" });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include starred live models in the provider's picker catalog

When Refresh returns a model absent from the existing catalog, starring it saves its ID only in prefs.favorites through ModelsPanel.toggleFav. This function adds only pref.custom before sorting existing rows, so that starred live model never reaches either p.models or p.modelInfo. It therefore remains unavailable in the composer picker and disappears from the Settings list after reopening the pane until another live refresh. Include missing favorite IDs in the returned model catalog, or persist live models as custom entries when they are starred.

Useful? React with 👍 / 👎.

@currentbits
currentbits enabled auto-merge (squash) October 28, 2026 11:16
@currentbits
currentbits merged commit b23c027 into main Oct 28, 2026
6 checks passed
currentbits added a commit that referenced this pull request Oct 30, 2026
…k), plus hide-tests, fuzzy folder search and per-project notifications (#1750)

* Merge worktree coder/diff-hide-tests-filter-1745-e590bc: Diff hide-tests filter (#1745)

* Merge worktree coder/fuzzy-folder-search-1747-bee396: Fuzzy folder search (#1747)

* Merge worktree coder/pr-ci-tools-for-agents-1749-3b52fd: PR + CI tools for agents (#1749)

* Drop external reference from prTools header comment

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Merge worktree coder/secret-card-polish-survive-restart-1744-faa122: Secret card polish + survive restart (#1744)

* Merge worktree coder/per-project-notifications-1746-0284c3: Per-project notifications (#1746)

* threadSecrets: values are keychain-encrypted in packaged builds since #1726

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* Test: use a placeholder secret value the push guardrail recognises

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Willem <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant