Skip to content

fix(app): list every provider added on this computer on v2 - #6472

Merged
benjaminshafii merged 1 commit into
devfrom
fix/v2-ai-providers-on-this-device
Oct 24, 2026
Merged

benjaminshafii merged 1 commit into
devfrom
fix/v2-ai-providers-on-this-device

Conversation

@benjaminshafii

@benjaminshafii benjaminshafii commented Oct 24, 2026 •

Copy link
Copy Markdown
Member

What is this about?

With localProviderMirror on and chat on OpenCode v2, every key added in AI Providers now appears under "On this device", not only the first.

What problem does it solve?

A second key (Anthropic after OpenRouter, or OpenAI after Anthropic) reached the model picker but was missing from AI Providers, so Settings and chat disagreed.

What was the situation before?

After saving the second key, "On this device" still listed only the first provider until a restart, while the picker already had the new provider's models.

How is this implemented?

What else changed?

  • The feature doc describes the in-place refresh.

Release note

On the new engine, AI Providers lists every API key you add on your computer, not just the first one.

Evidence

evals/proofs/v2-local-provider-mirror.proof.test.ts now saves two keys in sequence. Before: the Anthropic row never appears (fails on dev). After: both are Ready to use and both are in the picker.

dev this branch
dev: only OpenRouter listed after saving Anthropic branch: OpenRouter and Anthropic both Ready to use
branch: Anthropic models in the picker

Design: P1, P4, P11

…on v2

With localProviderMirror on, a second key saved in AI Providers reached
the model picker but never appeared under On this device. AI Providers
lists providers from OpenCode v1, which caches them per folder. The
server meant to refresh that cache after each save by reloading the
folder through the engine pool, but the pool skips a folder already
reloaded onto the same config file, and saved credentials are not in
that file, so every save after the first was skipped.

- The server disposes v1's instance for the folder in place after a key
  save, removal or provider sign-in on v2, bypassing the pool's config
  fingerprint. It never spawns an engine and never runs while v1 has
  work, so it cannot bring back reload storms.
- AI Providers reconciles v1's list with the engine's status: a provider
  the engine mirrored is listed as Ready to use and a skipped one with
  its reason, even when v1's list has not caught up.
- The proof now saves two keys in sequence and checks both in AI
  Providers and in the picker.

Signed-off-by: Benjamin Shafii <benjamin.shafii@gmail.com>
@vercel

vercel Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
openwork-app Ready Ready Preview Oct 24, 2026 3:00pm UTC
openwork-den Ready Ready Preview Oct 24, 2026 3:00pm UTC
openwork-diagnostics Ready Ready Preview Oct 24, 2026 3:00pm UTC
openwork-landing Ready Ready Preview, v0 Oct 24, 2026 3:00pm UTC

Request Review

@benjaminshafii
benjaminshafii deployed to pr-internal-specs October 24, 2026 14:59 — with GitHub Actions Active
@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

OpenWork evidence

Status Commit Preview Updated
🟢 Ready · evidence passed 434bd65 Open preview 2026-10-24 15:08:01 UTC

Run details · Open the preview to inspect evidence and sandbox options.

@diff-warden diff-warden Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Warden clearance. Complete security and confidentiality review of 434bd658dfc3f808d5bfb14aaba25fd0bad126cd found no high or medium security findings and no confidentiality findings. Any new push dismisses this approval. Analysis run

@diff-warden

diff-warden Bot commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Warden: approved

No high or medium security findings and no confidentiality findings.

Reviewed 434bd658dfc3 · Warden run · Updates after every Warden run.

@benjaminshafii
benjaminshafii merged commit fcb6464 into dev Oct 24, 2026
48 checks passed

This branch was successfully deployed

6 active deployments
Evidence / PR 6472 — 434bd658 Deployed Oct 24, 2026 by github-actions[bot]
Preview – openwork-landing — 434bd658 Deployed Oct 24, 2026 by vercel[bot]
Preview – openwork-app — 434bd658 Deployed Oct 24, 2026 by vercel[bot]
Preview – openwork-den — 434bd658 Deployed Oct 24, 2026 by vercel[bot]
Preview – openwork-diagnostics — 434bd658 Deployed Oct 24, 2026 by vercel[bot]
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