DeepSeek Harness 插件

use-opencode-local-provider

Use the opencode local server (OpenCode Zen client channel) as a provider in dsh(英文原文)

跳到安装方式

来源信息

GitHub 仓库
Payel-git-ol/use-opencode-local-provider
最近更新
2026年8月19日
分类
工具与能力
GitHub stars
1
载体类型
plugin
目录证据
上游声明已找到 dsh.bundle
证据路径
package.json#dsh.bundle
核对版本
0.1.0-rc.8
上游核对日期
2026-08-20

该证据由上游目录提供。本站没有安装、运行或安全审核这个插件。

安装

默认先复制一段 Prompt,让 Agent 读 GitHub 仓库和源码;需要自己装时再切到命令。

复制这段 Prompt,发给 DSH、Codex 或其他 Agent,让它先读 GitHub 仓库和源码。

请先不要安装或执行任何命令。阅读这个插件的 GitHub 仓库、README 和关键源码,然后用清楚、直接的方式回答以下问题,帮助我判断它是否适合我的需求:

1. 这个插件是什么,解决什么问题;
2. 适合哪些用户和典型使用场景;
3. 安装后如何使用,并给出一个最小使用示例;
4. 有哪些已知限制,以及隐私、安全、兼容性或维护风险;
5. 给出“推荐 / 有条件推荐 / 不推荐”的明确建议和理由。

请区分仓库明确说明、根据源码推断和未知信息。证据不足时请明确说明,不要猜测或照抄 README。

GitHub:https://github.com/Payel-git-ol/use-opencode-local-provider
插件名:use-opencode-local-provider
作者:Payel-git-ol

检查来源文件

安装前先看这个插件目录里的 README 和其他文件。

文件资源管理器3 个文件
README.md来源说明 · 只读预览

use-opencode-local-provider

A dsh plugin that makes OpenCode Zen available as a local provider in dsh.

How it works

  • On load, the plugin ensures an opencode serve instance is running (starts it if needed).
  • It starts a small OpenAI-compatible bridge (/v1/chat/completions, /v1/models) that

translates each request into an opencode serve session via its local HTTP API.

  • It registers the provider route opencode-local under the llm-pi-ai settings section,

so it appears in the dsh UI automatically.

The request flow uses the opencode client channel (opencode.ai/zen/go/v1) and does not need an OpenCode API key, nor does it consume the public /zen/v1 quota.

Installation

In the profile directory (~/.dsh/profiles/<profile>):

dsh plugin --profile <profile> add use-opencode-local-provider

Then add the plugin to cordis.patch.yml:

- entry: use-opencode-local-provider
  config:
    models: [deepseek-v4-flash-free, hy3-free]

Restart the dsh process. The opencode-local provider appears in the chat UI.

Configuration

keydefaultdescription
opencodeBinopencodepath to the opencode binary
serverHost127.0.0.1host of the opencode serve instance
serverPort17655port of the opencode serve instance
bridgeHost127.0.0.1bind host of the local OpenAI-compatible API
bridgePort17656port of the local OpenAI-compatible API
providerIdopencode-localroute name in the llm-pi-ai settings
providerNameOpenCode Localdisplay name in the dsh UI
apiKeyEnvOPENCODE_API_KEYenv var name dsh uses as the provider's key (the bridge ignores it; pi-ai still requires a credential)
modelsfull OpenCode Zen catalogmodel ids exposed to dsh
directoryprocess.cwd()working directory of opencode sessions
streamTimeoutMs600000max wait for the model to finish (incl. multi-step tool runs)
permissionReplyonceauto-reply to opencode permission requests: once, always or reject (false = never reply; the run then waits for a manual response or times out)

Tools and MCP

The bridge lets the model use opencode's own tools — including the MCP servers connected to opencode. Tool calls are executed by opencode's agent inside the opencode session (with its sandbox and permission rules); the bridge simply keeps the run going and returns the final answer. Pending permission requests are answered automatically according to permissionReply.

Tools are invisible to the dsh agent itself: dsh sees only the chat completions endpoint, so it cannot plan or observe tool calls — the model decides when to use them.

Development

npm install
node -e "import('./lib/index.js').then(m => console.log(Object.keys(m)))"