[PR #2475] ci: fix GitHub action API calls and update SDK to latest #10319

Closed
opened 2026-02-16 18:14:56 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/2475

State: closed
Merged: No


This pull request updates the integration with the OpenCode SDK to use the latest API methods and ensures compatibility with the most recent SDK version. The changes focus on switching to new method names in the OpenCode client and updating the SDK dependency.

OpenCode SDK API updates:

  • Changed the connection check in assertOpencodeConnected to use client.session.list instead of the deprecated client.app.get method.
  • Updated the chat invocation in the chat function to use client.session.prompt instead of client.session.chat, and refactored the request body to include the model object as required by the latest API.

Dependency management:

  • Updated the @opencode-ai/sdk dependency in package.json to use the latest version, ensuring compatibility with the new API changes.

Important Note:

Currently @latest tag in the repo points to an old version of opencode. And it also have 0.5.29 version as pinned. Check: https://github.com/sst/opencode/commit/661f229037fe41d02c75e6e3040f5820adc6b791.
A new version should be released with this tag, otherwise github actions won't work.
cc: @thdxr

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/2475 **State:** closed **Merged:** No --- This pull request updates the integration with the OpenCode SDK to use the latest API methods and ensures compatibility with the most recent SDK version. The changes focus on switching to new method names in the OpenCode client and updating the SDK dependency. OpenCode SDK API updates: * Changed the connection check in `assertOpencodeConnected` to use `client.session.list` instead of the deprecated `client.app.get` method. * Updated the chat invocation in the `chat` function to use `client.session.prompt` instead of `client.session.chat`, and refactored the request body to include the `model` object as required by the latest API. Dependency management: * Updated the `@opencode-ai/sdk` dependency in `package.json` to use the `latest` version, ensuring compatibility with the new API changes. ## Important Note: Currently `@latest` tag in the repo points to an old version of opencode. And it also have 0.5.29 version as pinned. Check: https://github.com/sst/opencode/commit/661f229037fe41d02c75e6e3040f5820adc6b791. A new version should be released with this tag, otherwise github actions won't work. cc: @thdxr
yindo added the pull-request label 2026-02-16 18:14:56 -05:00
yindo closed this issue 2026-02-16 18:14:56 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10319