Introduction

In the plugin system of DeepSeek Harness (DSH), extending LLM providers typically requires registering corresponding routes, handling request protocols, and model directories within the harness’s LLM seam. dsh-llm-opencode targets this aspect: it adds the OpenCode Zen provider to DSH, enabling coding tasks in DSH to select OpenCode Zen free models, and free models do not require configuring an API key.

What is this

dsh-llm-opencode is a DSH plugin maintained by bobowsh, licensed under the MIT License.

Its main purpose is to register the opencode-zen provider route within DSH’s LLM seam and translate DSH requests into OpenAI-compatible chat completions requests. The plugin also handles OpenCode Zen’s client identity verification and free model directory synchronization.

Core Capabilities

  • Register the opencode-zen provider route within DSH’s LLM seam.
  • Support for OpenCode Zen free models; free models do not require an API key.
  • Built-in free model directory, synchronized in the background from the gateway and models.dev when the plugin loads.
  • Support for automatically discovering models marked with the free flag from the gateway /models.
  • Translate harness requests into OpenAI-compatible chat completions requests and parse SSE streaming responses.
  • Paid models can be configured with an API key via the OPENCODE_API_KEY credential or environment variable.
  • Configuration options such as baseURL, maxTokens, models, and autoSyncModels can be overridden via DSH Web settings or the llm-opencode section in settings.yaml.
  • Includes cordis.patch.yml for registering the plugin into the DSH bundle loader.
  • Plain text requests are supported; image content will be rejected as UNSUPPORTED_CONTENT.
  • Requests carry headers such as User-Agent: opencode/1.0.0 to satisfy OpenCode Zen’s client identity verification; the default deepseek-harness user-agent is rejected by the gateway.

Installation and Activation

First, confirm that the DSH version meets the requirements:

DeepSeek Harness >= 0.1.0-rc.7
@deepseek-ai/cordis ^4.0.1 (peer dependency)

Then install from npm:

dsh plugin --profile web add dsh-llm-opencode

You can also install directly from GitHub:

dsh plugin --profile web add "github:bobowsh/dsh-llm-opencode#main"

After installation, select OpenCode Zen as the provider in DSH Web settings → Models. The included cordis.patch.yml is used to register the plugin into the DSH bundle loader, allowing the plugin to participate in loading as part of the current DSH profile.

Typical Usage

  1. Install the plugin into DSH’s web profile:
dsh plugin --profile web add dsh-llm-opencode
  1. Open DSH Web settings → Models and select OpenCode Zen as the provider.

  2. Select a free model, such as deepseek-v4-flash-free, and start coding directly. Free models do not require an API key.

  3. If you need to use a paid model, set OPENCODE_API_KEY in DSH credentials, or export it as an environment variable:

export OPENCODE_API_KEY="..."
  1. If you need to override default behavior, configure fields like baseURL, maxTokens, models, and autoSyncModels in the DSH Web settings or the llm-opencode section of settings.yaml.

Use Cases and Notes

Suitable for the following scenarios:

  • Using OpenCode Zen free models in DSH.
  • Wanting free models to not require an API key.
  • Needing to integrate OpenAI-compatible chat completions and SSE streaming responses into DSH’s LLM seam.

Notes before use:

  • Free models are served by the OpenCode Zen public gateway and availability may change.
  • Free models do not require an API key; paid models require an API key.
  • Only plain text requests are supported; image content will be rejected as UNSUPPORTED_CONTENT.
  • The OpenCode Zen gateway verifies client identity; the default deepseek-harness user-agent is rejected, and the plugin carries headers such as User-Agent: opencode/1.0.0.
  • Keep the built-in directory when startup directory sync fails; the custom models list in settings is never overwritten.
  • Environment requirements: DeepSeek Harness >= 0.1.0-rc.7; @deepseek-ai/cordis ^4.0.1 (peer dependency).
  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing. The license is MIT © bobowsh.

References

Directory page: https://www.skillhub.cn/plugins/bobowsh/dsh-llm-opencode
GitHub: https://github.com/bobowsh/dsh-llm-opencode