Preface¶
DeepSeek Harness (dsh) model lists are sourced from various llm-provider adapters. If you want to use OpenCode Zen’s free model tier, the common approach is to build a custom HTTP proxy, modify the provider’s baseURL, or manually maintain API keys and availability checks. Zen’s free tier has gating requirements for client identity; configuring it directly as a standard OpenAPI endpoint often leads to 403 FreeTierError, 426 UpgradeRequired, or repeated 429 FreeUsageLimitError during rate limiting. Furthermore, the model catalog may include -free entries that are actually currently unavailable.
Below is an introduction to the community plugin dsh-zen-proxy (Maintainer: Yee-h, Category: Networking Tools). It registers OpenCode Zen’s free tier as an in-process llm-provider, injects the request headers required by the official OpenCode desktop client, and periodically probes models to populate the model selector only with those determined to be available. According to the current README, the new version has removed the local HTTP proxy interface; there is no longer a need to listen on ports, write to settings.yaml, or configure user API keys.
What is this¶
dsh-zen-proxy is a dsh plugin (npm package name dsh-zen-proxy, version 0.2.2 in current materials, MIT License). It integrates OpenCode Zen’s free models as a native dsh provider: after installation and a host restart, Zen free models can be used directly in the desktop model selector.
Credentials use the upstream pooled Bearer public, carried by the plugin. Every 10 minutes (configurable), the plugin fetches the upstream manifest, filters for models with IDs ending in -free, and probes them individually. It maps the results into two route groups based on availability: “Available” and “Region Restricted” (displayed as “OpenCode Zen Free Models” and “OpenCode Zen Free Models (Region Restricted)”). Paid models, models deemed unavailable, and those not yet probed will not appear in the catalog.
Community Catalog Page: SkillHub - dsh-zen-proxy. Source Code & Docs: GitHub - Yee-h/dsh-zen-proxy (GitHub stars approx. 3, forks approx. 2 in materials).
Core Features¶
Two Model Routes¶
Since dsh’s listModels / normalizeModelInfo contract does not have an “unavailable” field, the plugin uses route grouping to express availability:
| Route ID | Meaning | Catalog Content |
|---|---|---|
opencode-free |
Free Models (Main Group) | Free models determined as Available in the most recent probe |
opencode-free-region |
Free Models (Region Restricted) | Free models determined as Region Restricted in the most recent probe |
The “Free” criterion is that the model ID ends with -free (upstream manifest items contain only id / object / created / owned_by).
Probing and Catalog Updates¶
- An asynchronous probe is initiated immediately upon mounting without blocking the mount; it then repeats at the configured interval (default 10 minutes).
- Availability determination requires parsing streaming data frames: HTTP 200 may still carry an error object within the stream. The plugin classifies failure types according to the order described in the README.
- Transient failures (rate limiting, upstream 5xx, network failures) retain the previous determination if they occur within 3 consecutive attempts. If an entire round is rate-limited, the probe interval undergoes exponential backoff (lower bound is the configured interval, upper bound is 1 hour).
403 FreeTierErroror426 UpgradeRequiredare treated as plugin-level failures; both routes are cleared and diagnostics are logged. Manifest fetch failures only invalidate the current round, keeping the existing catalog unchanged.- The latest determination is persisted to
$DSH_HOME/zen-proxy/availability.json(or the same path under the host config root ifDSH_HOMEis not set), reflecting the last known state upon restart before the first probe completes.
Upstream Identity and Protocol¶
Manifest: GET https://opencode.ai/zen/v1/models. Conversations select the chat or responses family based on the model ID (muse-spark* uses responses, others use chat; the README notes this criterion cannot be fully verified locally).
Every upstream request carries six identity headers (excerpt from README example):
user-agent: opencode/<version> # version >= 1.18.0
authorization: Bearer public
x-opencode-client: desktop
x-opencode-project: global
x-opencode-session: ses_<12 hex><14 base62>
x-opencode-request: msg_<12 hex><14 base62>
The request body requires stream: true and declares a tool array (including gate-required tool names like bash, glob, grep, read; the plugin maps caller tools according to README rules).
Because the Zen free tier only accepts user-agent: opencode/<version> (not lower than 1.18.0), which conflicts with dsh’s default deepseek-harness/... attribution, the plugin overrides user-agent here to pass the gate; the README provides source-level explanations in src/identity.js.
Thinking Intensity Menu¶
The “Thinking Intensity” in the model selector is provided by the plugin: the upstream gateway is primarily affected by the output budget limit. The plugin maps the three levels light / balanced / deep to max_tokens (chat family) or max_output_tokens (responses family), and can be configured alongside model capacity (see the README “Thinking Intensity” section for details).
Installation and Activation¶
The profile is managed by pnpm; please use dsh plugin or pnpm install. Do not use npm install to avoid lock file inconsistencies.
1. Desktop Plugin Manager (Recommended)¶
Install dsh-zen-proxy via the desktop “Settings → Plugins” (local checkout or git address both work). The plugin manager will invoke the profile’s package manager to install and automatically append the package name to dsh.profile.bundles in package.json (without this entry, the bundle will not be loaded as a profile layer).
2. Command Line Installation¶
dsh plugin --profile desktop add git+https://github.com/Yee-h/dsh-zen-proxy.git
# Or for a local checkout:
# dsh plugin --profile desktop add file:C:/path/to/dsh-zen-proxy
dsh plugin only passes arguments to the package manager; it will not automatically write back to dsh.profile.bundles. After installation, you can restart the host to let it reconcile (it detects dependencies with bundle patches and appends bundles), or manually edit $DSH_HOME/profiles/desktop/package.json:
{
"dsh": {
"profile": {
"bundles": [
"dsh-zen-proxy"
]
}
}
}
3. Restart Host¶
This package injects a loader entry via cordis.patch.yml (ID: zen-proxy). The plugin has no browser half and requires no additional dsh.client configuration.
4. Optional Configuration¶
| Field | Default Value | Description |
|---|---|---|
probeIntervalMinutes |
10 |
Probe interval (minutes); changes take effect in the next round |
opencodeVersion |
1.18.31 |
Spoofed OpenCode version; values below 1.18.0 fall back to the threshold and log diagnostics |
There is no longer a need to point the provider’s baseURL to a local port, nor is settings.yaml required.
Typical Usage¶
After the installation and restart steps above, open the model selector in the dsh desktop client and select a -free model that appears in the OpenCode Zen Free Models or OpenCode Zen Free Models (Region Restricted) group to start a conversation. Upon first mounting, the catalog may be empty or use the last persisted result before the first probe returns; this is normal behavior as described in the README.
If you encounter a 429 RATE_LIMIT immediately after a probe round, the README suggests waiting about one minute before trying again. Probe traffic uses a separate session, isolated from user conversation sessions, to prevent probes from exhausting conversation quotas.
Use Cases and Notes¶
Who it is for: Developers already using the dsh desktop profile who wish to try OpenCode Zen free models without configuring API keys and rely on the plugin to automatically maintain a list of “currently available” models.
Runtime and Trust Boundary: The plugin initiates external HTTPS requests as an llm-provider within the dsh process and overrides certain attribution headers to satisfy upstream gates. Before installing, you should review the Source Repository and the MIT License to ensure you accept its behavior and network egress scope. Node engine requirements are listed in package.json: ^22.19.0 || >=24.0.0.
Known Limitations (Excerpted from README): Some region-restricted muse-spark models cannot establish a truly usable link via local egress and can only be verified for classification; the responses protocol family is similarly restricted locally. The chronological relationship between region restrictions and rate limiting may cause 429 to appear before RegionError during rate limiting; the plugin uses grace logic to retain previous region assignments.
Community catalogs like SkillHub have no official affiliation with DeepSeek / Hithink RoyalFlush. The plugin is maintained by the community; availability and upstream policy changes should be based on actual probe results.
Conclusion¶
dsh-zen-proxy consolidates the OpenCode Zen free tier from “self-hosted proxy + manual baseURL modification” to a path of “install bundle, restart, select model in selector,” and uses periodic probing to reduce the likelihood of unavailable free models appearing as options. For details, configuration, and probe semantics, the repository README is the source of truth.
- Catalog Page: https://www.skillhub.cn/plugins/Yee-h/dsh-zen-proxy
- GitHub: https://github.com/Yee-h/dsh-zen-proxy