OpenCode Bridge
中文 | English
A plugin for using OpenCode free models in
DeepSeek Harness (DSH).
No OpenCode account or API key is required by default.
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.
- Streaming and 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 and try another egress when one is rate-limited or a connection fails.
Install and get started
Install in DSH Desktop
-
Open Plugins in the sidebar, then click Add plugin in the top-right corner.
-
Enter:
dsh-opencode-bridge@0.5.1
-
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.1
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.1
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 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:7890 or socks5h://127.0.0.1:1080. You can keep direct (this machine) as an egress.
- Use Test all to check connectivity. Adding or removing an entry saves and applies the change automatically.
The plugin prefers available entries in list order. HTTP 429 or a connection failure temporarily cools that entry and triggers an attempt through the next one. A reply that has already started streaming is not replayed through another egress.
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.
- Input limitations: this path primarily supports text and tool calls; images and attachment contents are not fully forwarded to the model.
- 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. |
| 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.1.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.