dshbase

Plugin directory / Developer / use-opencode-local-provider

use-opencode-local-provider

Unverified Payel-git-ol

✓ Actively maintained

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
Language
2026-08-19Last push
Cross-platformPlatform

What it does

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

Our take
Unverified — not yet verified

dsh plugin: use the opencode local server (OpenCode Zen client channel) as an OpenAI-compatible provider Not yet verified — install and test it yourself.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

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)))"

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install use-opencode-local-provider for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

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

Test report

Not yet L3-verified — see failure note below if we already ran it.

Status: pending · last test 2026-08-26
Note: 验证: load-fail Browse all pending failures →
Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 7795 plugins →