dsh-opencode-go-panel: Integrate OpenCode Go subscription quotas and model unit prices into the DSH sidebar

Introduction

For users running OpenCode Go subscriptions with DeepSeek Harness (DSH), the two most common problems encountered are: how much quota has been used, and how long the subscription will last at the current consumption rate. The OpenCode API only provides a normalized percentage without a ready-made interface; checking the Console website requires switching windows and manually calculating the reset time. This plugin directly renders subscription status, quota metering, and model unit prices into a DSH sidebar panel. All data is sourced from the OpenCode Go interface.

Below is an introduction to Wiselfx/dsh-opencode-go-panel. It is a DSH client plugin targeted at developers using OpenCode Go subscriptions who wish to see usage directly in the DSH sidebar. The plugin itself does not calculate or store quotas; it only reads, normalizes, and displays data.

Core Features

The panel displays four categories of information, all read from the OpenCode Go API:

  1. Subscription and Plan Status: Sourced from the OpenCode Console status interface, including plan, price, workspace, renewal or expiration dates, cancellation status, upgrade price, and whether extra usage is enabled.
  2. Unified Quota Meter Bar: Covers three windows: 5 hours, weekly, and monthly, displaying used and remaining USD, percentage, reset countdown, and consumption speed.
  3. Baseline USD Quota Model: Uses the maximum single-model limit as the baseline (Go is $100), with smaller limit models consuming the baseline quota proportionally faster.

The model quota and consumption multiplier table is as follows (from the README):

Model Monthly Limit Consumption Multiplier
DeepSeek V4.1 Flash $100 1.00×
GLM-5.3-Flash $60 1.67×
MiniMax M3.1 Flash $20 5.00×
Kimi K3 $15 6.67×

For mixed usage, this single meter suffices because the percentage returned by the OpenCode API represents the mixed total. The “Remaining Quota” in each row of the table represents the scenario of using that model in isolation.
4. Price per Million Tokens: Sourced from the OpenCode Go model interface (which requires authentication), including input, output, cache read, context, max output, and model tags.

Installation and Enablement

If you already have a local checkout, use Plugin Manager to install the bundle directly:

plugin_manager install_bundle target=/absolute/path/to/dsh-opencode-go-panel

Alternatively, you can install the bundle package via the GitHub repository through Harness Plugin Manager, and then enable it. The plugin will take effect after a page refresh upon the first installation of the client bundle.

Keyword configuration does not involve additional concatenation. The repository is essentially a bundle: dsh.bundle.patch in package.json points to ./cordis.patch.yml, and dsh.client declares platform: web and immediately: true, injecting @deepseek-ai/dsh-client-ui-layout.

Credential Resolution Order

The Host side resolves credentials in the following order:

  1. Harness credential store (OPENCODE_GO_API_KEY)
  2. Environment variables OPENCODE_GO_API_KEY, OPENCODE_API_KEY, OPENCODE_ZEN_API_KEY
  3. The plugin’s own ~/.dsh/opencode-go/api-key file
  4. ~/.pi/agent/auth.json (opencode-go)
  5. ~/.local/share/opencode/auth.json (opencode)

If no key is found, the panel displays a connect card; pasted keys will be saved to the Harness credential store.

Precise Console billing data also requires a local OpenCode Console login (~/.local/share/opencode/opencode.db); without it, the panel falls back to the percentage usage interface. This means you can see usage ratios without logging into the Console, but you cannot see precise bill amounts.

Typical Usage

After installing and configuring credentials, open the DSH client sidebar to see the icon and panel.

The panel consists of two layers: The Host side is responsible for routing and same-origin validation (index.js), as well as API, credential, quota, and model normalization (data.js); the Client side is responsible for the sidebar icon and panel UI (client.js). When credentials need to be pasted from the panel, use the connect card directly; no extra action is required if an OpenCode login session already exists.

To verify the data source, simply compare the percentage displayed on the panel with the numbers on the Console webpage. They should be consistent because the panel does not recalculate anything; it only reads from the interface.

Applicable Scenarios and Notes

It is suitable for two groups of people:

  1. Developers using OpenCode Go subscriptions who wish to see plan status and remaining quotas directly in DSH.
  2. People who need to compare the monthly limits and consumption multipliers of different models to decide on a primary model.

A few limitations to be aware of:

  • OpenCode only exposes a normalized percentage covering all models, with no per-model spend or total token volume. The plugin does not reconstruct tokens from local session logs.
  • The per-model limits are the Go quotas published by OpenCode; the status interface does not return these, so the plugin uses the published table.
  • Input, output, cache read unit prices, and the available model list come from the OpenCode Go Model API.
  • The plugin runs with the permissions of the current DSH process. Before installing, you should check the source code and license (MIT) to ensure that the contents of index.js, data.js, client.js, and cordis.patch.yml match your expectations.
  • This plugin is maintained by Wiselfx. It currently has 1 star on GitHub and is version 1.1.1. The community directory in the ecosystem belongs to a separate site and has no official affiliation with DeepSeek / Hypothesis (Fangfang).

Conclusion

The value of this plugin lies in converging information scattered across the OpenCode Console and model interfaces into one sidebar panel: subscription status, three-window quotas, consumption multipliers for each model, and the price per million tokens. It does not perform local estimation and does not replace the Console. It is suitable for OpenCode Go subscription users who want usage visibility but do not wish to open an additional webpage.

Directory Page: https://www.skillhub.cn/plugins/Wiselfx/dsh-opencode-go-panel

GitHub: https://github.com/Wiselfx/dsh-opencode-go-panel

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye