- Home
- Plugins
- Models & Providers
- dsh-opencode-bridge
dsh-opencode-bridge
vikrant-aleph/dsh-opencode-bridge
OpenCode free models for DSH with dynamic model-list refresh, optional HTTP(S)/SOCKS proxy failover, a fail-closed tool bridge and offline agent-scoped compatibility auditing.
Install
dsh plugin --profile web add github:vikrant-aleph/dsh-opencode-bridgeREADME
OpenCode Bridge
中文 | English
A plugin for using OpenCode free models in DeepSeek Harness (DSH). No OpenCode account or API key is required by default. Supports automatic model refresh, optional context trimming of completed-turn reasoning, and egress-proxy rotation, with a fail-closed tool bridge and offline agent-scoped auditing.
Features
- Automatic model refresh: fetches the free-model list at startup and every 10 minutes by default, adds/removes models as the upstream catalog changes, and retains the last successful list if a refresh fails.
- Optional context trimming: clear only confirmed completed-turn reasoning, retain the current tool chain, and keep full replay by default.
- Streaming and tool calls: preserves reasoning history across multi-step tool calls, adapts DSH's native tools, and rejects unverified conversions rather than treating Bash commands as PowerShell.
- Optional proxy failover: configure multiple HTTP(S) or SOCKS proxies, try another ready egress for explicit egress-quota errors or connection failures, and respect server-requested waits.
Install and get started
Image input requires DSH's attachment request-version API; this version is built and verified against DSH SDK 0.2.1-rc.2.
Install in DSH Desktop
-
Open Plugins in the sidebar, then click Add plugin in the top-right corner.
-
Enter:
dsh-opencode-bridge@0.5.5 -
Prefer the official npm registry under Installation source. Mirrors may take time to sync new versions.
-
Click Install and wait for completion.
Install from the command line
Install from npm into your DSH profile:
dsh plugin --profile desktop add dsh-opencode-bridge@0.5.5
Replace desktop with the profile you use. If dsh is not available in your terminal, use:
npx @deepseek-ai/dsh plugin --profile desktop add dsh-opencode-bridge@0.5.5
After installation, select a model under OpenCode Bridge in the model picker. If it does not appear, restart the corresponding DSH profile. Normal use requires no API key or manual configuration-file edits. List changes are announced to DSH's model picker without restarting the plugin. Advanced refresh-interval configuration is documented in the configuration reference.
Optional context trimming
Open Settings → OpenCode Bridge → Context trimming to enable Trim reasoning from completed turns. It is off by default (full replay). Only reasoning from confirmed successful completed turns is cleared; the current tool chain and uncertain/interrupted history remain intact. Required reasoning_content fields are still sent.
The setting is saved through DSH and applies to new requests without deleting local history or interrupting running requests. Savings depend on the upstream; DSH's local estimate may still include full history. Turn it off if continuity is affected.
Optional proxy setup
Without proxy configuration, the plugin uses a direct connection from your machine.
- Open Settings → OpenCode Bridge → Egress rotation (optional).
- Add your existing proxy addresses one at a time, such as
http://127.0.0.1:7890orsocks5h://127.0.0.1:1080. You can keepdirect(this machine) as an egress. - Use Test all to check connectivity. Cooling entries are skipped to avoid early requests. Adding or removing an entry saves and applies the change automatically.
The plugin prefers ready entries in list order. Explicit egress-quota errors or connection failures temporarily cool an entry. A server-requested wait prevents immediate failover, and a fully cooling pool sends no early requests. Model-backend unavailability and unexplained 429s are not automatically treated as exhausted proxy quota.
DSH centrally performs at most two automatic retries; excessive waits return an error for you to retry later. Replies that have started streaming are not automatically replayed.
HTTP(S), SOCKS4/4a and SOCKS5/5h proxies are supported. Use only authorized proxies and respect upstream service limits.
Important notes
- Unofficial project: not affiliated with OpenCode or DeepSeek. Upstream protocols, models and free quotas may change; continued availability is not guaranteed.
- Third-party processing: model requests are sent to OpenCode's service and, when configured, traverse your proxy. Do not send content you would not entrust to those third parties.
- Attachments: image input follows each model's declared capability. DSH prepares request versions and applies image budgets/offload decisions; ordinary files remain text handles rather than native file inputs. Image bytes and data URLs are not written to diagnostic logs.
- Credentials and logs: proxy passwords are stored in plaintext locally. SOCKS username/password authentication is not encrypted by SOCKS itself; use trusted proxies and networks. Do not publish the configuration file; inspect logs and screenshots for sensitive information before sharing.
Troubleshooting
| Problem | What to try |
|---|---|
| No models after installation | Check the target profile, confirm the plugin is enabled, restart DSH and check network connectivity. |
| Thinking mode fails after a tool result with missing reasoning_content | Update the plugin; 0.5.3 restores the required assistant-history field, including empty reasoning. |
| HTTP 429 | Retry later. If proxies are configured, inspect their status in Settings. |
| HTTP 403 or 503 | Check for plugin updates and upstream service issues, then retry later. These errors do not trigger proxy failover. Report persistent problems. |
| Tool calls fail | Check the Diagnostic log tab, or ask the agent to run opencode_bridge_audit for tool compatibility. |
For bugs or feature requests, choose an Issue form and fill in the requested versions, reproduction steps and expected/actual behavior. Redact logs first; do not include API keys, proxy passwords or private conversations.
Development and technical documentation
Develop and install from source
Requires Node.js ≥ 20.18.1 and pnpm. Node.js 22 or 24 LTS is recommended.
git clone https://github.com/Vikrant-Aleph/dsh-opencode-bridge.git
cd dsh-opencode-bridge
pnpm install
pnpm build
pnpm test
Build output is not committed to Git. To install a local build in DSH:
pnpm pack
dsh plugin --profile desktop add ./dsh-opencode-bridge-0.5.5.tgz
See the technical documentation (中文) for implementation details, full configuration, testing and maintenance rules.
Credits and license
Protocol research drew on the official OpenCode source and open-source projects including sub2api, 9router, hermes-oc-free-provider and cpa-plugin-opencodezen. Sources and comparison records are documented in the technical documentation.
Licensed under MIT.
Related plugins
dsh-our-free-model
ebony-vinyl/dsh-our-free-model
dsh-routing-suite
yjh051108/dsh-routing-suite
dsh-workbuddy-connect
corrinehu/dsh-workbuddy-connect
dsh-connect-workbuddy
dingminhua/dsh-connect-workbuddy