OpenCode Go in the DeepSeek Harness model list, providing subscription quota display, model discovery, session affinity, and more.
Install
# from npm (prebuilt)
dsh plugin --profile web add dsh-llm-opencode-go
# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)
dsh plugin --profile web add github:a2580vb/dsh-llm-opencode-go
Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).
README
English | 简体中文
A DeepSeek Harness (DSH) plugin that serves OpenCode Go (https://opencode.ai/inference/go/v1) as a native model provider. The plugin implements the service's three wire protocols itself: requests translate harness messages, tools and reasoning into the protocol's shape, and responses stream back as DSH StreamChunk values. Node.js ≥ 20; no runtime dependencies.

The usage panel and the quota capsule in the web client. The quota and the counters in the image are sample data.
At a glance
| Provider route | opencode-go, or the name provider sets |
| Protocols | OpenAI Responses, OpenAI-compatible Chat Completions, Anthropic Messages |
| Model facts | Live GET /models rows, with a dated models.dev snapshot as the fallback |
| Runtime | Node.js ≥ 20 |
| Runtime dependencies | None |
Features
- Model discovery.
GET /modelssupplies each model's display name, description, context window, output cap, input modalities, reasoning ladder and preferred protocol. The answer is cached in memory and on disk; amodels.devsnapshot covers deployments that cannot reach the service. - Protocol selection per model. The catalog carries an ordered protocol list per model, opening with the service's preferred
apientry. A call the service refuses withModelProtocolUnsupportedis retried on the next protocol; any other failure is reported as it is. - Session affinity. Every request carries
x-opencode-session, one stable id per conversation, which keeps a conversation's turns on the same upstream backend and prompt cache. - Tool calls. Definitions, fragmented arguments, tool results and the follow-up turn are translated per protocol. A call and its result are sent together or left out, because every protocol rejects one half alone.
- Reasoning. Per-model effort ladders come from the service and are translated per protocol, including Anthropic thinking budgets. Reasoning history is replayed only where the upstream requires it.
- Streaming. Byte-level SSE framing becomes
StreamChunkvalues, with usage, finish reason, an idle watchdog and a retry when a stream is cut off before its terminal event. - Failures. HTTP status and transport failures map to stable, provider-neutral codes (
AUTH,RATE_LIMIT,QUOTA,CONTEXT_WINDOW_EXCEEDED,MODEL_DEPRECATED,MODEL_UNAVAILABLE, …). - Configuration page. One page in the web client, registered both in Settings' own navigation and on the sidebar Plugins page's row. It edits the API key, the credential reference, model visibility (retired rows included), model variants, the quota-refresh intervals and the transport/retry settings; it can re-read
GET /modelsand shows what this route spent. - Usage surfaces. A quota capsule at the sidebar's foot, a usage panel opened from it or with
Ctrl/Cmd+U, and a tab under Settings → Built-in plugins.
Quick start
1. Install
dsh plugin add dsh-llm-opencode-go
Bundle layers are read at startup, so fully restart the profile after installing. The startup log should carry:
dsh-llm-opencode-go: provider "opencode-go" ready at https://opencode.ai/inference/go/v1 (split endpoints, credential OPENCODE_GO_API_KEY, models discover)
2. Provide a key
Either export OPENCODE_GO_API_KEY in the environment that launches DSH, or store the key through the credential seam — the web client's Models page writes it there. The config holds the reference (apiKeyEnv), never the value; the plugin resolves the reference on every request, so a stored key applies to the next call without a restart.
3. Pick a model
Open the model picker and choose a model under the OpenCode Go route. The first catalog read fetches GET /models; later reads are answered from memory or the cache file.

The model picker under the OpenCode Go group.
Configuration
Every key is optional. The shortest useful block restates the defaults:
- insert:
- id: opencode-go
name: dsh-llm-opencode-go
config:
apiKeyEnv: OPENCODE_GO_API_KEY
apiKeyEnv is a credential reference, not the key itself. To point it at another variable:
config:
apiKeyEnv: OC_KEY
The full field table, catalog shaping and image-input settings live in Configuration.
Graphical configuration
The plugin's page is also reachable from the web client: a row of Settings' own navigation (OpenCode Go), and the sidebar's Plugins page, where the bundle's row has a Configure control. Both register the same component. The page writes ordinary config fields through the profile patch, and the API key through the credential store; the key value never enters cordis.patch.yml. A deployment without a web client has no page and behaves the same otherwise. See Configuration.

The configuration page. The API key is reported as configured; its value is never displayed.
Usage
Three entries read the same facts:
| Entry | Where |
|---|---|
| The quota capsule | At the sidebar's foot, beside Settings: one ring per metered window (5H / Wk / Mo), with what is left of each. The row opens the usage panel; the gear beside it opens the configuration page. |
| The usage panel | From that row, or the keyboard (Ctrl/Cmd+U): the subscription's windows first, this route's counters by model and by day under them. |
| A tab under Settings → Built-in plugins | The same content as the panel, on the settings surface. |
The panel keeps two sources apart. The subscription bars come from GET {baseURL}/usage and describe the plan's metered windows. The counters below them are what this plugin recorded locally at ~/.dsh/cache/opencode-go-usage.json, aggregated by local calendar day. They answer different questions and can disagree. The capsule can be switched off (showQuotaCapsule, on by default); the panel and the tab stay.

The usage panel: subscription windows above, this route's counters below. Sample data.
Verification
npm test # the offline suite; no credential, no quota spent
npm run test:cordis # mount the plugin on the harness's own cordis
npm run test:live # live suite; needs OC_KEY
npm run check:pack # read back what `npm publish` would upload
npm test replays response bodies captured from the live service (tests/golden/), so a translator that drifts from what the service sends fails offline. The offline count is restated in both README badges and in both development pages — the four places the runner checks when the suite finishes. Details in Development.
FAQ
Do configuration changes need a restart?
No. The adapter reads the resolved config on each request, so a saved field applies to the next call. Installing or upgrading the plugin is the exception: bundle layers are read at startup.
Does it work without the web client?
Yes. The configuration page, the capsule and the panel are web-client surfaces; a headless deployment has none of them, and the provider route is unchanged.
Where is the API key stored?
In the harness credential store, under the name apiKeyEnv points at. The config file holds only that name, and no page endpoint returns the value.
A model I use is gone from the picker. Can I still call it?
Yes, if the service still serves it or the catalog still carries its row. Retired models stay in the catalog with their last measured protocol order and capacity; the picker leaves them out, but a session that still names one resolves it and sends the call, and the service answers MODEL_DEPRECATED or MODEL_UNAVAILABLE. Hiding a model (hiddenModels) has the same listing-only effect.
Why does an image not reach the model?
A route declares image only when the model takes images and the deployment can resolve their bytes through the attachment seam. Without the seam, sendImages: auto reports text-only and the model's description names what was left out; always attempts the bytes anyway and fails on the missing seam.
Documentation
- Models — live model facts, protocol preference and fallbacks, the training-data gate, the capacity snapshot, text/image split
- Configuration — full field table, shaping the catalog, image input, the graphical and fast entries
- Wire protocol — endpoints and auth,
x-opencode-session, reasoning and tool-calling translations - Reliability — stable failure codes and limits
- Development — project status, verification suites, re-measure probes, architecture
License
MIT
Links
More in this category
Ebony-Vinyl/dsh-our-free-model★ 90775
Adds free model lanes to DeepSeek Harness — DeepSeek V4.1 Flash, Kimi K3 and others — with no login, sign-up or API key, plus a local OpenAI-compatible gateway, fallback routing and a usage dashboard.
dingminhua/dsh-connect-workbuddy★ 2129
Connects locally signed-in WorkBuddy models, CN and international alike, to DSH, reading each model's credit multiplier from the upstream catalog on every refresh, with per-model image input toggles, account switching backed by an auto-failing-over pool, manual daily check-in, and read-only credit overviews shown as compact pills on the card and in the composer.
Alice-Marx/dsh-model-router★ 1026
Routes DeepSeek Harness work across configured model APIs and supported vendor CLIs with dependency-aware packages and cost previews.
V1ki/dsh-plugin-subscriptions★ 646
Use ChatGPT (Codex), Claude, and Grok subscriptions as DeepSeek Harness LLM providers, with Settings login, model catalogs, usage, plus image_generate, video_generate, and x_search tools.
XDTrees/dsh-workbuddy-xdpool★ 638
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool (multi-account rotation, live credits, and a model catalog showing per-model credit multipliers and free/night-discount tags).
XDTrees/dsh-xdpool★ 638
Merge every locally signed-in WorkBuddy account into DeepSeek Harness as one auto-failing-over model pool: multi-account rotation, 429 cooldowns, live credits, a model catalog with per-model credit multipliers and free/night-discount tags, QR-code login for 13 vendors, and aggregate free-tier channels. Accounts persist across restarts.
Community comments
Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.