Skip to content

fix(server): support OpenCode 2.x provider inventory - #13606

Closed
Narayan201120 wants to merge 1 commit into
pingdotgg:mainfrom
Narayan201120:fix/opencode-2x-provider-inventory
Closed

Narayan201120 wants to merge 1 commit into
pingdotgg:mainfrom
Narayan201120:fix/opencode-2x-provider-inventory

Conversation

@Narayan201120

Copy link
Copy Markdown

Fixes #13605.

OpenCode 2.x broke provider status: T3 Code waited for the old
opencode server listening banner that 2.x no longer prints, so every
status check ended in Timed out waiting for OpenCode server start after 30000ms with the server actually running.

This detects the new server listening on banner, picks up the printed
server password for health checks, detects the v1 vs v2 API per server
(falling back to v2 only on the incompatibility signal), and loads v2
inventory through @opencode/client with a bounded retry while a fresh
server's catalogs warm up. The v1 path is unchanged. Live agentic sessions
still use the v1 SDK and need their own migration; provider status,
models, skills, and commands work on 2.x now.

Verified with focused suites (214 passing; the one failure is the
pre-existing Windows XDG path assertion in OpenCodeProvider.test.ts),
clean typecheck, and a live run against OpenCode 2.0.16 showing
authenticated status with 9 providers and 708 models.

Before/after screenshots of Settings and Providers to follow in the
comments (posting from the machine that ran the dev server).

Built with Muse Spark 1.3 Free via OpenCode.

OpenCode 2.x broke provider status with "Timed out waiting for OpenCode
server start after 30000ms". The 2.x server prints `server listening on`
instead of `opencode server listening on`, prints a generated server
password, moved the API under /api with new envelopes, and answers empty
catalogs for a few seconds after its banner.

Detect the new banner, pick up the printed password, detect v1 vs v2 per
server, and load inventory through @opencode/client on v2 with a bounded
warm-up retry. Live sessions still use the v1 SDK and need their own
migration.

Built with Muse Spark 1.3 Free via OpenCode.
@github-actions github-actions Bot added the vouch:unvouched PR author is not yet trusted in the VOUCHED list. label Sep 25, 2026
@juliusmarminge

Copy link
Copy Markdown
Member

Superseded — #13605 was closed as a duplicate of #11790.

Please continue any OpenCode 2.x provider inventory work on #11790 (related draft includes #12643).

@juliusmarminge

Copy link
Copy Markdown
Member

Closing as superseded of duplicate #13605 → #11790.

@github-actions github-actions Bot added the size:L 100-499 changed lines (additions + deletions). label Sep 25, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 25, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR adds a substantial OpenCode 2.x production integration, including API-version detection, authenticated v2 requests, generated-password handling, catalog warm-up retries, and new user-facing provider inventory. The authentication-sensitive connection changes and expanded runtime surface warrant human review.

You can add or adjust custom eligibility rules. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). 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.

OpenCode 2.x provider shows Unavailable: timed out waiting for server start

2 participants