dshbase

插件目录 / Developer / use-opencode-local-provider

use-opencode-local-provider

未验证 Payel-git-ol

✓ 持续维护

查看 GitHub ↗ ← 返回插件目录

1Stars
0Forks
0未关闭 issue
语言
2026-08-19最近推送
跨平台平台

功能简介

dsh plugin: use the opencode local server (OpenCode Zen client channel) as an OpenAI-compatible provider

我们的评价
未验证 — 尚未实测

dsh plugin: use the opencode local server (OpenCode Zen client channel) as an OpenAI-compatible provider 尚未验证——请自行安装测试。

「未验证」表示我们的自动化 CI 尚未安装过该插件。功能描述与版本兼容性均为作者声明。这不是安全审计,也不代表对第三方代码的背书。

你是插件作者? 想拿到「已验证」标签——提交你自己的验证证据(截图、日志或短视频),我们审核通过后即改为「已验证」。

提交验证证据 ↗

README

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

key default description
opencodeBin opencode path to the opencode binary
serverHost 127.0.0.1 host of the opencode serve instance
serverPort 17655 port of the opencode serve instance
bridgeHost 127.0.0.1 bind host of the local OpenAI-compatible API
bridgePort 17656 port of the local OpenAI-compatible API
providerId opencode-local route name in the llm-pi-ai settings
providerName OpenCode Local display name in the dsh UI
apiKeyEnv OPENCODE_API_KEY env var name dsh uses as the provider's key (the bridge ignores it; pi-ai still requires a credential)
models full OpenCode Zen catalog model ids exposed to dsh
directory process.cwd() working directory of opencode sessions
streamTimeoutMs 600000 max wait for the model to finish (incl. multi-step tool runs)
permissionReply once auto-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)))"

安装

🧩 让 Agent 自动装(推荐)

装一次目录插件,之后本站所有插件都能让 DeepSeek Harness 自动找、自动装:

dsh plugin add dshbase-catalog

然后对 agent 说「帮我装 use-opencode-local-provider」,它会在目录里找到并自动安装。文档:dshbase-catalog · 已验证场景包

该插件是 GitHub 源码(未发 npm)——直接从仓库装:

Web profile:

dsh plugin --profile web add github:Payel-git-ol/use-opencode-local-provider

Headless(CLI)profile:

dsh plugin --profile headless add github:Payel-git-ol/use-opencode-local-provider

实测报告

尚未 L3 验证——若已跑过,见下方失败备注。

状态:pending · 最近测试 2026-08-26
备注:验证: load-fail 浏览全部待验证失败 →
安全:尚未扫描——我们的每日静态扫描将很快覆盖它。

分享徽章

Developer 里更多

浏览全部 7795 个插件 →