Introduction¶
When integrating the OpenCode Go / Zen gateway in DeepSeek Harness (DSH), model lists typically come from the /models endpoint: it only indicates which models the gateway can provide, not whether your account can actually call them. Regional blocks, insufficient balance, free tiers limited to official clients, and similar issues usually only surface after you’ve selected a model and sent a request.
The community plugin dsh-opencode-doctor takes a different approach: it performs availability probing ahead of time — sending real requests to all 79 models one by one — and writes the conclusions into the model names shown in the DSH model selector; for the 15 models blocked in mainland China, it automatically routes around them via a per-model local proxy. Below is an overview of its positioning, capabilities, and installation/usage instructions.
What Is This¶
dsh-opencode-doctor is published by maintainer fffcodefox, categorized as a model inference-related DSH plugin, licensed under MIT, with version 0.2.2 in the current material, requiring Node >= 20.18.
In one sentence: it gives DSH an OpenCode Go / Zen model routing layer whose availability has been empirically tested, with availability annotations (regional block handled by proxy, requires payment, limited to official clients, etc.) reflected directly in the model names; at the same time, as a dependency it automatically brings in the configuration capabilities of the official companion plugins dsh-opencode-go and dsh-model-proxy.
This plugin is a pure configuration plugin in the DSH ecosystem: its behavior is written in cordis.patch.yml, and the apply function in lib/index.mjs is empty — it exists only to conform to the plugin spec and does not execute custom runtime code (installing it still activates the dsh-opencode-go dependency, so capabilities like quota queries are available).
What Problems It Solves¶
The models listed by a gateway are not always the same as the models that actually work under the “current environment, current key, current protocol”. The same model may also behave differently under different protocols (Anthropic Messages, OpenAI-compatible, OpenAI Responses).
At release time, this plugin completes probing and generates routing based on the protocols that actually work; the DSH selector only renders model names and does not display description fields, so the probe conclusions are written directly into the names, and fuzzy search filtering is supported (e.g., typing ★, 需充值, 限官方客户端).
Fixed issues are no longer repeated in the names: the 15 models that require a proxy due to regional restrictions are routed by the plugin through model-proxy, and the “region-restricted” label no longer appears in their names.
Core Features¶
Pre-Probed Routing and Name Annotations¶
At release, a total of 67 unannotated / 79 models are shipped (probe dates are listed in the repo’s models.catalog.json), covering Claude, GPT, Grok, DeepSeek, GLM, Qwen, Kimi, MiniMax, and other series. Routing examples (empirical statistics from the material):
| Routing id | Protocol | Available / Total |
|---|---|---|
opencode-go-doctor-anthropic |
Anthropic Messages | 2 / 2 |
opencode-go-doctor-openai |
OpenAI-compatible | 30 / 31 |
opencode-go-doctor-responses |
OpenAI Responses | 4 / 4 |
opencode-zen-doctor-anthropic |
Anthropic Messages | 7 / 8 |
opencode-zen-doctor-openai |
OpenAI-compatible | 11 / 21 |
opencode-zen-doctor-responses |
OpenAI Responses | 13 / 13 |
Example names in the selector (from the original material):
★ Claude Opus 5.5
★ Claude Sonnet 5.5
★ Grok 4.7
★ DeepSeek V4.1 Flash
★ GPT-5.3 Codex
Claude Fable 5(需充值)
Cat Jam Free(限官方客户端)
Annotation meanings (glossary from the material):
| Annotation | Meaning |
|---|---|
| (需充值) | Insufficient account balance |
| (限官方客户端) | Free tier, only available in the official OpenCode client |
| (需授权训练数据) | Requires authorization to use data for training |
| (暂不可用) | Other failures |
| No annotation | Available at probe time |
Per-Model Proxying for Region-Restricted Models¶
The probe records show 15 models that return unsupported_country_region_territory in mainland China. The plugin routes these models through a local HTTP proxy (default http://127.0.0.1:7897) while all other models connect directly; the exit rule is restricted to opencode.ai; when fallbackToDirect: true, it falls back to direct connection if the proxy is unavailable. The list uses exact model ids — no global proxying.
Common Model Filtering¶
The names of 10 frequently used models carry a ★ prefix; typing ★ in the selector displays only this batch of models (the material lists Claude Opus/Sonnet/Haiku 5.5, GPT-5.3 Codex, Grok 4.7, DeepSeek V4.1 Flash, GLM-5.3, Kimi K3, Qwen3.8 Max, MiniMax-M3, etc.).
Quota Query and Official Plugin Integration¶
Upon installation, dsh-opencode-go is automatically installed as a dependency and activated by this plugin’s patch — no need to install it separately or add it to dsh.profile.bundles; quota capsules and the account settings page become available accordingly. The command line can query Go plan quota:
npx dsh-opencode-doctor usage
Supports --json output; keys are only displayed in masked form.
CLI and Self-Check¶
After installation, you can use dsh-opencode-doctor (or npx dsh-opencode-doctor):
npx dsh-opencode-doctor list # View catalog and annotations offline
npx dsh-opencode-doctor usage # Go quota
npx dsh-opencode-doctor check # Credentials, gateway, patch conflicts (recommended to run once after install)
npx dsh-opencode-doctor probe # Re-probe, rewrite catalog and patch
npx dsh-opencode-doctor render # Generate patch offline from catalog only
check reports silent failure issues such as a custom patch overriding this plugin’s routing, or model-proxy / opencode-go being inserted multiple times. Since 0.2.2, it supports --proxy and the environment variable OPENCODE_DOCTOR_PROXY for custom proxy addresses.
Installation and Enabling¶
The install command must include a version tag to avoid installing a floating main:
dsh plugin --profile web add github:fffcodefox/dsh-opencode-doctor#v0.2.2
After installation, restart dsh and check the newly added routes under Settings → Models.
If you don’t need the auto-activated dsh-opencode-go, you can disable it in the profile patch:
- id: opencode-go
disabled: true
Credentials are resolved via refs.OPENCODE_API_KEY, in the following order: environment variables OPENCODE_API_KEY / OPENCODE_GO_API_KEY / OPENCODE_ZEN_API_KEY → refs in $DSH_HOME/.credentials.yaml (default ~/.dsh/.credentials.yaml) → OpenCode’s auth.json. The patch only references variable names; no keys are written into the repository.
Typical Usage¶
1. Self-check after installation
npx dsh-opencode-doctor check
The first line shows the currently active proxy configuration (if set).
2. Regenerate the patch when the proxy port is not 7897 (recommended)
npx dsh-opencode-doctor render --proxy http://127.0.0.1:7890
Or set the environment variable before running render / probe:
OPENCODE_DOCTOR_PROXY=http://127.0.0.1:7890 npx dsh-opencode-doctor render
3. Re-probe after gateway models are updated
npx dsh-opencode-doctor probe --proxy http://127.0.0.1:10809
probe sends real requests for every model and writes back to models.catalog.json and cordis.patch.yml; normally this doesn’t need to be run day-to-day.
4. Select models in DSH
Rely on the annotations in the names and the ★ prefix for fuzzy search, to avoid selecting entries that require payment or are client-restricted; models that are region-restricted and already in the proxy list have names identical to ordinary available models — if you can’t connect, first check the proxy port and the check output.
Use Cases and Notes¶
This is suitable for developers who already use, or plan to use, OpenCode Go / Zen inference in DSH, want to know availability before selecting a model, and want to reduce the trial-and-error cost of regional restrictions while operating from mainland China.
Please note:
- DSH plugins run with the permissions of the current dsh process; before installing, review the GitHub repository source code and its MIT license yourself, and confirm that you accept its patch and dependency behavior.
- If dsh-model-proxy is separately enabled in the profile’s
dsh.profile.bundles, it may be chained redundantly with themodel-proxyconfiguration inserted by this plugin — remove the duplicate entry from the bundle and usecheckto confirm. - If you keep the official
dsh-opencode-gorouting alongside this plugin, the same model may appear twice in the selector; use the official plugin’smodelVisibilityto hide one of them. - The community plugin directory entry on SkillHub is an independent site with no official affiliation with DeepSeek / High-Flyer; star counts and other metadata depend on the page at the time you visit — at the time of writing, GitHub showed 0 stars.
Conclusion¶
dsh-opencode-doctor shifts the question of whether an OpenCode model “can be used” from post-trial-and-error to a conclusion probed at install/release time, and combines that with per-model proxying and quota commands to reduce the cost of model selection when integrating OpenCode in DSH. For more information, visit the directory page at skillhub.cn/plugins/fffcodefox/dsh-opencode-doctor and the source code at github.com/fffcodefox/dsh-opencode-doctor.