dsh-llm-opencode-go-live: DeepSeek Harness's OpenCode Go Dynamic Model Directory Plugin

Preface

DeepSeek Harness (DSH) adopts a plugin architecture to extend its functionality. When integrating the OpenCode Go model, manually maintaining the model list and routing configuration can be cumbersome. The dsh-llm-opencode-go-live plugin solves this issue by syncing the opencode-go directory from Models.dev in real-time, registering an independent route, and providing a settings card and subscription monitoring panel.

What is this

This is a model inference plugin for DeepSeek Harness, maintained by SkylerFee and licensed under the MIT License.

The core responsibilities of this plugin include:
* Reading the opencode-go model list from Models.dev
* Registering an independent opencode-go-live route
* Contributing its own Models settings card
* Using pi-ai for model requests

Core Features

  • Dynamic Directory Synchronization: The plugin automatically fetches the latest model list from Models.dev.
  • Independent Routing: In addition to the built-in opencode-go route, this plugin registers a dedicated opencode-go-live route; the two do not affect each other.
  • Settings Card: On the DSH settings page, the plugin has an independent configuration card for managing API keys.
  • Subscription Monitoring Panel: Provides a floating panel displaying OpenCode Go subscription usage. The panel expands on hover and collapses when the mouse leaves, and its visibility can be controlled via a switch.
  • Request Handling: Processes model requests based on the pi-ai service.

Installation and Activation

The plugin requires DeepSeek Harness 0.1.7-rc.1 or newer, and Node.js 22.19 or newer.

  1. Install the plugin under the Web profile:
    dsh plugin --profile web add @skylerfee/dsh-llm-opencode-go-live
  1. After installation and activation, restart the Web profile.
  2. Open Settings -> Models.
  3. Click Edit in the OpenCode Go (Live) card owned by the plugin.
  4. Enter your API key and apply.

Typical Usage

In the model selector, navigate to the opencode-go-live group and select a model to initiate a request.
DSH will store the key via its credentials service, with the default reference being OPENCODE_GO_LIVE_API_KEY.

Dependencies and Notes

  • Dependencies:
    • Requires @earendil-works/pi-ai ^0.87.1 provided by the host.
    • Requires DeepSeek Harness 0.1.7-rc.1 or newer.
    • Requires the following peer dependencies: @deepseek-ai/cordis ~4.0.4 || ~4.0.5-alpha.1, @deepseek-ai/dsh-credentials, @deepseek-ai/dsh-llm, @deepseek-ai/dsh-llm-pi-ai, and @deepseek-ai/dsh-settings.
  • Runtime Status:
    • Currently verified only on macOS. Linux and Windows have not been tested.
  • Behavioral Details:
    • If directory refresh fails, the last successful directory snapshot is retained.
    • If there is no directory, the provider is visible but has no live models.
    • Calls without credentials will return MISSING_CREDENTIAL.
    • Visible models do not imply that the upstream API has authorized their requests.
    • Data Source: The host queries the https://opencode.ai/zen/go/v1/usage API to fetch subscription data when invoked.

Summary

This plugin simplifies the integration process for OpenCode Go models in DSH through automated directory synchronization and independent routing configuration. Combined with the subscription monitoring panel, it makes it convenient for developers to track resource consumption. Project URL: GitHub

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye