Skip to content

Every connected OpenCode provider shows, and any OpenCode provider can be connected - #446

Merged
logancsack merged 2 commits into
aldo/cloud-platformfrom
aldo/r4qvf0g2yz
Nov 28, 2026
Merged

logancsack merged 2 commits into
aldo/cloud-platformfrom
aldo/r4qvf0g2yz

Conversation

@logancsack

@logancsack logancsack commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Why

Two gaps in what the app shows of a user's connected models.

  1. Sleeping threads lose models. A machine's OpenCode lists only the backends of the keys it had when it started. When a key is added, a machine that started before it lists fewer models than the account has. For threads whose machine isn't running, the client's template took the captured machine's provider whole. So the model picker on a sleeping thread could lose every OpenRouter model, and Logan's account flipped between 356 OpenCode models and 2.
  2. Only four providers can be connected. Settings offered OpenCode keys for just four providers (Zen, Go, Anthropic, OpenRouter), though OpenCode itself supports far more with a single API key.

What changed

Kept backends (apps/web/src/aldo/serverConfig.logic.ts, serverConfig.ts)

  • withSavedBackends: when a captured machine report doesn't list an OpenCode backend, it takes that backend's models from Aldo's saved catalog and adds them after the machine's own. capture() applies it before the usual per-provider merge.

  • The report sent to Aldo stays the machine's own list.

  • Aldo's catalog is the authority:

    • it keeps each backend a machine reported, for a week;
    • it drops a disconnected key's backend at once (logancsack/aldo#786).

    So this never brings back a disconnected key.

  • With no saved catalog yet, nothing changes.

Another provider (apps/web/src/aldo/AldoAgentConnections.tsx, accountApi.ts)

  • Settings → Agents → Provider accounts gets an "Another provider" row.
  • "Choose a provider" opens a search over OpenCode's own provider registry. The list comes from GET /api/connections/opencode/providers, fetched only when the search opens.
  • Picking one opens the usual key dialog (<id>-api-key), with the provider's documentation link. "Change" goes back to the list.
  • Connected keys of other providers show by name, with Disconnect.

Server compatibility. The client assumes no server feature:

  • The row shows only when the server's connections list says otherProviders: true.
  • An older Aldo's catalog simply has fewer backends to keep.

The server half is logancsack/aldo phase 2b, which follows pingdotgg#786.

Tests

  • vp test run src/aldo/serverConfig.logic.test.ts: 12 passed, including a new test of kept backends, own backends, other agents, and an empty saved catalog.
  • Typecheck of apps/web with effect-tsgo: no errors.
  • vp fmt and vp lint on the changed files: clean.
  • Tried in a local build against the phase 2b server, in Aldo cloud mode:
    • searched "groq" and "deep" and got the right matches;
    • opened the Groq key dialog and saved a test key into the local database only, after which it showed as "Groq · Connected";
    • Disconnect removed it;
    • "Change" returned to the list.

The client ships with the usual pin PR once this is green. This PR doesn't pin.

🤖 Generated with Claude Code

logancsack and others added 2 commits November 28, 2026 04:23
A machine's OpenCode lists the backends of the keys it started with. The
template for threads whose machines aren't running now keeps Aldo's saved
models of the backends a captured machine doesn't list (Aldo's catalog drops a
disconnected one at once), so a sleeping thread's picker shows every connected
key's models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A searchable "Another provider" row, shown only when the server offers it,
lists OpenCode's own provider registry and opens the usual key dialog.
Connected keys of those providers show by name with Disconnect.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@logancsack logancsack changed the title A machine without an OpenCode key no longer hides that key's models Every connected OpenCode provider shows, and any OpenCode provider can be connected Nov 28, 2026
@logancsack
logancsack marked this pull request as ready for review November 28, 2026 04:41
@chatgpt-codex-connector

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

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T04:43:57.270953Z 3012de2 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-28T04:45:15.541576Z 3012de2 Draft marked ready
ℹ️ 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: 3012de2165

ℹ️ 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 +64 to +66
fetchOpenCodeProviders()
.then((list) => !cancelled && setProviders(list))
.catch(() => !cancelled && setFailed(true));

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 Clear the provider-load error when retrying succeeds

If the initial provider request fails, closing and reopening the search retries it, but a successful response only updates providers and never resets failed. Since the render checks failed before displaying the results, the error remains visible and no providers can be selected even after the retry succeeds. Clear the error when starting a retry or accepting its successful response so a transient network failure does not block this flow until the component remounts.

Useful? React with 👍 / 👎.

@logancsack
logancsack merged commit 8fab06e into aldo/cloud-platform Nov 28, 2026
5 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