fix(server): support OpenCode 2.x provider inventory - #13606
Closed
Narayan201120 wants to merge 1 commit into
Closed
Narayan201120 wants to merge 1 commit into
Narayan201120 wants to merge 1 commit into
Conversation
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.
Member
Member
Contributor
ApprovabilityVerdict: 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13605.
OpenCode 2.x broke provider status: T3 Code waited for the old
opencode server listeningbanner that 2.x no longer prints, so everystatus check ended in
Timed out waiting for OpenCode server start after 30000mswith the server actually running.This detects the new
server listening onbanner, picks up the printedserver passwordfor 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/clientwith a bounded retry while a freshserver'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.