use-opencode-local-provider
在终端中运行以下命令:
dsh plugin install Payel-git-ol/use-opencode-local-provider
将以下提示词粘贴到 DeepSeek Harness 对话框中:
在 DeepSeek Harness 中运行 dsh plugin install Payel-git-ol/use-opencode-local-provider 即可安装该插件,完整源码地址为 https://github.com/Payel-git-ol/use-opencode-local-provider 。
插件介绍
OpenCode Zen models are capable, yet dsh does not expose them as a native provider out of the box, so wiring them up usually means rolling your own forwarding layer. This plugin removes that friction: install it and the full OpenCode Zen catalog appears in the dsh chat UI immediately.
Under the hood, the plugin ensures an opencode serve instance is running on load, then spins up a lightweight OpenAI-compatible bridge that maps /v1/chat/completions requests into opencode sessions over the local HTTP API. The flow travels through the opencode client channel, meaning no OpenCode API key is needed and public /zen/v1 quota stays untouched. Crucially, the bridge preserves opencode's native tool calls and connected MCP servers, letting the model decide when to invoke them inside its own sandbox, while dsh simply receives the final chat completion and stays out of the tool-orchestration loop.
Ideal for developers who already have opencode installed and want to drop the OpenCode Zen model family directly into their dsh interface—without extra API keys or public quota consumption. Configuration covers server and bridge ports, working directory, stream timeout, and an automatic permission-reply policy (once, always, or reject), so sensible defaults get you running right out of the box.
使用场景
- 在 dsh 聊天界面中直接使用 OpenCode Zen 全系模型进行推理
- 通过本地桥接调用 opencode 的工具与已连接的 MCP 服务器完成多步任务
- 在本地开发环境中免 API key、不消耗公共额度地使用 OpenCode Zen
适合人员
- 已安装 opencode 并希望将其模型接入 dsh 的开发者
- 需要本地推理且不想依赖公共 API 额度的技术用户
- 希望统一在 dsh 中管理多个模型 provider 的 AI 工作流构建者