Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture, allowing developers to extend inference capabilities through components. For OpenCode Go model integration, a dedicated adapter is required. The dsh-llm-opencode-go plugin resolves the issue of invoking OpenCode Go services within a DSH environment by bridging the OpenCode Go protocol with DSH’s standard interfaces.

What This Is

dsh-llm-opencode-go is a DeepSeek Harness plugin maintained by user NOirBRight. It is an integration layer for OpenCode Go, designed to allow DSH to invoke OpenCode Go models for inference. The plugin uses a shared pi-ai adapter to handle chat interactions, while leveraging native Go endpoints for non-chat protocol features such as model discovery and subscription usage.

Core Features

  1. Hybrid protocol support: Chat uses the shared pi-ai adapter and, depending on model configuration, supports three protocols: OpenAI Completions, Responses, and Anthropic Messages.
  2. Native endpoint access: Model discovery (GET /zen/go/v1/models) and subscription usage checks (GET /zen/go/v1/usage) are implemented through native Go endpoints and do not depend on chat protocols.
  3. Web configuration UI: Provides a card configuration entry under Settings → LLM Providers, supporting configuration of API Key, Base URL, and model list.
  4. Capability support: Supports Vision and Thinking capabilities.
  5. Routing and loading: Host route is opencode-go, Loader entry is llm-opencode-go.

Installation and Enablement

Before installation, ensure DSH version compatibility (supports 0.1.7-alpha.2 or later), and install dsh-llm-providers-ui to display the configuration page in Web mode.

dsh plugin --profile web add --force \
  https://github.com/NOirBRight/dsh-llm-providers-ui/releases/download/v0.2.13/dsh-llm-providers-ui-0.2.13.tgz
dsh plugin --profile web add --force \
  https://github.com/NOirBRight/dsh-llm-opencode-go/releases/download/v0.1.34/dsh-llm-opencode-go-0.1.34.tgz
dsh web

Typical Usage

After installation, configure the plugin in the Web UI. The API key can be set via the environment variable OPENCODE_API_KEY.

  1. Set API Key: Configure it in the LLM Providers settings, using apiKeyEnv: OPENCODE_API_KEY to introduce the environment variable.
  2. Select protocol type: Configure the api field for each model, for example choosing openai-responses.
  3. Retrieve model list: Use the Host endpoint GET /zen/go/v1/models to retrieve available models and their context window, Vision, and Thinking capabilities.
  4. Check subscription usage: Use the Host endpoint GET /zen/go/v1/usage to check the remaining quota.

Use Cases and Notes

This plugin is suitable for developers who need to manage OpenCode Go model resources uniformly within DSH.

  • Web mode dependency: In Web mode, dsh-llm-providers-ui must be installed to display the Providers page and this plugin card; otherwise, only command-line routing capabilities are retained.
  • Environment variable configuration: The API Key is only supported via environment variable injection; plaintext in configuration files is not supported.
  • Known limitations:
    • CodexHub lock file conflict: If a lock file generated by CodexHub exists, it may block DSH credential operations.
    • Unsupported parameter: The GenerateOptions.stop parameter is not supported by the shared PiAiAdapter.
    • Registration conflict: The plugin does not call registerConfigurableProviders, indicating directory or functional overlap with llm-pi-ai.

Short Conclusion

dsh-llm-opencode-go provides a standard way to integrate OpenCode Go models into DSH. By configuring environment variables and native endpoints, developers can fully leverage the model’s Vision and Thinking capabilities. See the project homepage for more details.