dsh-llm-opencode-go-live
skylerfee/dsh-llm-opencode-go-live
为 DSH 提供 OpenCode Go 模型来源:从 Models.dev 读取 opencode-go 目录,在独立的 opencode-go-live 路由上提供,内置 opencode-go 路由保持原样。目录快照缓存在 DSH home 下,刷新失败时沿用上一次成功的目录;插件自带 Models 设置卡片用于填写该路由密钥,并可显示 OpenCode Go 订阅用量。
安装
dsh plugin --profile web add github:skylerfee/dsh-llm-opencode-go-liveREADME
@skylerfee/dsh-llm-opencode-go-live
English | 中文
An OpenCode Go live model catalog plugin for DeepSeek Harness. It reads the opencode-go catalog from Models.dev, registers the separate opencode-go-live route, contributes its own Models settings card, and uses pi-ai for model requests. The model list shows each model's monthly equivalent allowance for Go, Go Plus and Go Teams, and can be ordered by name or allowance in either direction. The card can refresh the catalog on demand and reports the added, updated, and removed model counts in a transient notice. The session model selector shows the selected tier's allowance beside each model. The built-in opencode-go route remains available. A switch in that card renders the OpenCode Go subscription usage in a frame-wide floating panel.
Quick Start
Runtime: Node.js 22.19 or newer (the floor pi-ai declares), pnpm, and DeepSeek Harness 0.1.7-rc.1 or newer.
Peers: @deepseek-ai/cordis ~4.0.4 || ~4.0.5-alpha.1 together with @deepseek-ai/dsh-credentials, @deepseek-ai/dsh-llm, @deepseek-ai/dsh-llm-pi-ai and @deepseek-ai/dsh-settings at >=0.1.7-rc.1. The four harness peers declare a lower bound only.
The host checks them with semver.satisfies(version, range, { includePrerelease: true }), so prereleases compare like ordinary versions and every later build — including new patch-line prereleases — stays satisfied without another branch. The tradeoff is deliberate: no upper bound means a future 0.3.0 or 1.0.0 host is not blocked either; installs that need to stay on the 0.2 line should pin the plugin version instead. @deepseek-ai/cordis keeps its upper bound because a major bump there is a protocol change, not a routine upgrade. The image-input hooks it wires in ship in those versions.
pi-ai: the host must also provide @earendil-works/pi-ai ^0.87.1 || ^1.0.0. DSH resolves this peer to the host's pi-ai at runtime, including linked source installs, and the range covers both the 0.87.1 line and the 1.x builds hosts ship (1.0.2, 1.1.0). The plugin keeps pi-ai 1.1.0 as a development dependency for its own build and tests.
Install from npm (recommended) into the Web profile with the installed dsh CLI:
dsh plugin --profile web add @skylerfee/dsh-llm-opencode-go-live
This installs the npm latest tag. To pin this release, append @0.4.1. When running DSH from source, use pnpm dsh plugin --profile web add @skylerfee/dsh-llm-opencode-go-live from the DSH repository root. The usage guide covers npm installation and the source-checkout and tarball alternatives for development.
Installing the package and enabling it from the Web client's plugin page:

Restart the Web profile. Open Settings → Models, click Edit in the plugin-owned OpenCode Go (Live) card, enter your API key, and apply it. Choose a model under opencode-go-live in the model picker. DSH stores the key through its credentials service under the default reference OPENCODE_GO_LIVE_API_KEY, which is deliberately distinct from the OPENCODE_GO_API_KEY that the Models page derives for the built-in opencode-go route, so the two routes never share one credential record. The bundle stores a catalog snapshot at cache/opencode-go-live.json under the Harness home — ~/.dsh/cache/opencode-go-live.json by default, or under $DSH_HOME when that variable is set. Installation does not change the default model.
The card's Show usage overlay switch controls a bottom-right usage control (default on when unconfigured). It has three forms:
| Form | Reached by | Content |
|---|---|---|
| Collapsed (default) | — | small ring pill; the arc length is the 5-hour used share, text such as Go-38% |
| Brief | hovering | Go + bar + percent, plus expand, pin, refresh, and close buttons |
| Full | clicking Expand | the OpenCode Go subscription usage percent and reset time for the rolling 5-hour, weekly, and monthly windows |
The full form ignores the pointer leaving — only Collapse returns it to the brief form, and a further pointer leave returns it to collapsed.
- Tooltips: resting the pointer on an icon button for about 0.2s shows a plugin-drawn tip describing it.
- Dragging and pinning: all three forms are draggable while unpinned; the pin button toggles pinning (filled = pinned, hollow = unpinned, off by default).
- Resizing: the full form resizes from its bottom-right handle (minimum 200×120, maximum 480×520, capped by the viewport) or with the arrow keys in 16px steps.
- Close: its close button turns that switch off in step.
The host queries https://opencode.ai/zen/go/v1/usage with the same credential. That endpoint does not appear in OpenCode's public documentation and is an upstream implementation convention. The key resolves only on the host and never reaches the browser. Field reference and troubleshooting live in the usage guide.
The overlay in the browser. The three forms, in order: collapsed (the default — ring plus Go-2%, no buttons), brief (on hover — Go + bar + percent, with expand, pin, refresh, and close buttons), and full (after clicking Expand — the three billing windows plus the updated time):
| Collapsed (default) | Brief (hover) | Full (expand) |
|---|---|---|
![]() | ![]() | ![]() |
The animation below records the older two-form "chip ↔ full panel" interaction. Its forms differ from the table above and it is kept only for historical reference:

The plugin's card in Settings → Models — saving the API key in the editor, the dynamic model list after the catalog resolves, and the live models in their own group in the model picker, with the reasoning level beside them:

Refreshing the catalog on demand — click Refresh model list next to the model count and a transient notice reports the added, updated, and removed model counts:

The model list is grouped by vendor and shows each model's monthly allowance for Go, Go Plus and Go Teams; free models show ∞:

Two selects on the card: Model selector quota tier picks which tier the session model selector shows, and Model list order orders the list by name or allowance in either direction.

The session model menu and the composer's model button both carry the chosen tier's allowance:


Documentation
- Usage guide: installation, key setup, configuration, and troubleshooting.
- Architecture: component responsibilities, Mermaid data-flow and sequence diagrams, catalog refresh, and request behavior.
- Usage overlay design: data-source contract, the host balance route, the display switch, and the test plan.
- Development and release: feature and bug-fix PRs, verification, version tags, and GitHub pre-releases.
The plugin requires the DSH llm and credentials services; the Web settings page also uses settings, and the usage overlay additionally needs the browser carrier connection (without it the plugin runs normally and simply registers no balance route). A failed refresh retains the last successful catalog. With no catalog, the provider remains visible but has no live models. Calls without a credential return MISSING_CREDENTIAL. A visible model does not establish that the upstream API will authorize its requests.
Image inputs (a read_image tool result or a pasted screenshot) are resolved through the host's durable attachment service, exactly as on the built-in routes; when no attachment service is mounted, a request carrying an image fails with UNSUPPORTED_CONTENT instead of silently dropping it. File attachments never reach any provider as bytes: request assembly projects every file block to deterministic handle text on all routes. Declared input modalities follow the remote catalog's modalities.input (text and image), and a model that declares no image input receives text-only image placeholders.
Verification
Verified on macOS only. The plugin's installation, the catalog refresh against the live Models.dev source, the Models settings card, and model calls were all exercised on a single macOS machine; Linux and Windows have not been run.
CI executes the build and the offline test suite on ubuntu-latest. That is a build signal, not a runtime verification: the tests use fixed catalog doubles, and no automated run reaches the real OpenCode Go API.
License
MIT © 2026 SkylerFee — see LICENSE.


