DeepSeek Harness (DSH) is a plugin-architecture-based agent development framework. Integrating external models usually requires writing an adapter or finding an existing solution. OpenCode Zen provides free-tier models, but the official integration process is cumbersome and typically requires managing an API key. The dsh-connect-opencode-free plugin aims to solve this problem. It connects OpenCode Zen’s free tier to DSH without requiring a key and provides a visual management interface.
Core Features¶
Key-free access to OpenCode Zen free tier
Authentication is fixed as Bearer public. To pass free-tier validation, the adapter impersonates the OpenCode CLI (with a specific User-Agent, x-opencode-session session id, and bash/read tool names). Note that bash/read are real executable tools, not placeholders; when invoked by the model, these two tools are actually executed.
Dual-source model discovery
It merges two data sources in real time: opencode.ai/zen/v1/models (which ids actually exist at the moment) and the opencode section of models.dev/api.json (which models are free, their context size, and supported capabilities). If either source is unreachable, the last known result is retained, so a single network blip will not make models disappear.
One-click management on the settings page
On the settings page, you can search, enable/disable individual models, and enable/disable all models. It also displays the rate-limit status and recovery time for the public quota.
Three-tier usage rules
By default, only the public quota is used. The other two tiers (public-first / private-first) require key validation before they can be selected. This allows users to flexibly switch billing sources when needed.
One-click provider write
It writes the current free model list to llm-pi-ai.providers.opencode-zen, making it easy to use the models directly in DSH’s provider management.
Installation and Activation¶
This plugin is a DSH cordis plugin package and is integrated through the profile’s package.json.
Method 1: npm installation (recommended)
1. Enter the target profile directory (e.g., ~/.dsh/profiles/<profile-name>/).
2. Add the following to dependencies in package.json:
"dsh-connect-opencode-free": "^0.4.0"
- Add the package name to the
dsh.profile.bundlesarray:
"dsh-connect-opencode-free"
- Run installation in that profile directory:
pnpm install
- Restart dsh (e.g.,
dsh web), then openSettings → OpenCode Free Modelsto use it.
Method 2: Run from source (development mode)
1. Clone this repository locally.
2. In the profile’s package.json dependencies, use link: to point to the absolute source path:
"dsh-connect-opencode-free": "link:/absolute/path/to/dsh-connect-opencode-free"
- Also add the package name to the
dsh.profile.bundlesarray. - Run
pnpm install, then restart dsh.
Dependencies requirement: Node ≥ 18, and the host provides @deepseek-ai/dsh-llm (peer range >=0.1.7-rc.1 <0.3.0).
Typical Usage¶
- Open
Settings → OpenCode Free Models. - Click
One-click syncto fetch the currently available free model list. - Configure one of the three quota strategies as needed (default is
publicOnly). - After configuring, click
One-click write providerto write the model list into Harness’s configuration.
Notes¶
- OpenCode Zen is a third-party public service, and its availability, model list, and rate-limiting policy are determined by its operator.
- Authentication is fixed as
Bearer public. - The browser-side artifacts are generated by
scripts/build.mjsand must be built before running in development mode.
This plugin provides DSH users with a convenient way to integrate OpenCode Zen free models, suitable for scenarios that require low-cost LLM calls and are sensitive to key management.