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-zenprovider 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.devwhen the plugin loads. - Support for automatically discovering models marked with the
freeflag from the gateway/models. - Translate harness requests into OpenAI-compatible
chat completionsrequests and parse SSE streaming responses. - Paid models can be configured with an API key via the
OPENCODE_API_KEYcredential or environment variable. - Configuration options such as
baseURL,maxTokens,models, andautoSyncModelscan be overridden via DSH Web settings or thellm-opencodesection insettings.yaml. - Includes
cordis.patch.ymlfor 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.0to satisfy OpenCode Zen’s client identity verification; the defaultdeepseek-harnessuser-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¶
- Install the plugin into DSH’s web profile:
dsh plugin --profile web add dsh-llm-opencode
-
Open DSH Web settings → Models and select OpenCode Zen as the provider.
-
Select a free model, such as
deepseek-v4-flash-free, and start coding directly. Free models do not require an API key. -
If you need to use a paid model, set
OPENCODE_API_KEYin DSH credentials, or export it as an environment variable:
export OPENCODE_API_KEY="..."
- If you need to override default behavior, configure fields like
baseURL,maxTokens,models, andautoSyncModelsin the DSH Web settings or thellm-opencodesection ofsettings.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 completionsand 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-harnessuser-agent is rejected, and the plugin carries headers such asUser-Agent: opencode/1.0.0. - Keep the built-in directory when startup directory sync fails; the custom
modelslist 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
dshprocess; 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