Introduction

When using DeepSeek Harness (DSH) for development, if the model you call belongs to the OpenCode Go plan, you need to keep track of quota consumption at all times. Manually switching or opening a web page to check is inefficient. The dsh-plugin-opencode-go-quota plugin adds a floating window in the bottom-right corner of the DSH Web interface to display the current OpenCode Go plan’s remaining quota in real time.

Core Features

The plugin provides the following capabilities:

  • Floating window display: Shows a circular floating button in the bottom-right corner of the Web interface; click to expand the popup. The button supports mouse dragging.
  • Multi-cycle quota: Displays quota for 5-hour rolling, weekly, and monthly cycles (percentage, limit, reset time).
  • Automatic refresh: Automatically refreshes data every 5 minutes while the popup is open.
  • Smart visibility: Shows the button only when the model selected in the current session belongs to the opencode-go provider family; automatically hides when switched to other models.
  • Model adaptation: Displays the limit based on the currently selected model, and supports limit adjustments for higher-priced models after price changes.
  • Multiple account support: Supports configuring multiple opencode-go accounts, automatically corresponding to their API keys and quotas.

Installation and Enabling

Use the official CLI to install the plugin package and register it in the configuration file.

dsh plugin --profile web add github:haipisao/dsh-plugin-opencode-go-quota

Append the registration entry to ~/.dsh/profiles/web/cordis.patch.yml:

- insert:
    - id: opencode-go-quota
      name: dsh-plugin-opencode-go-quota
      config:
        timeoutMs: 15000
        visibleProviders: [opencode-go, opencode-go-2]
        providers:
          opencode-go:
            usageUrl: https://opencode.ai/zen/go/v1/usage
            keyRef: OPENCODE_GO_API_KEY
          opencode-go-2:
            usageUrl: https://opencode.ai/zen/go/v1/usage
            keyRef: OPENCODE_GO_API_KEY_2

Configuration and Usage

  1. In DSH Settings → Models, configure the API key (e.g., OPENCODE_GO_API_KEY).
  2. Switch the session model to an opencode-go model (e.g., opencode-go/deepseek-v4-flash).
  3. A floating button appears in the bottom-right corner; click it to expand and view the quota.
  4. Switch to another model (e.g., deepseek-official), and the button automatically hides.

Notes

  • After first installing a new bundle, if HMR does not take effect, restart dsh web once.
  • If keyRef is not explicitly configured, the host will fall back to reading the OpenCode CLI auth.json (by detecting the path per platform).
  • After removing all dependencies, bundle manifests, node_modules, and registration entries, restarting the instance leaves no residue.
  • Development and updates for dsh-related plugins are currently on hold.

References

  • GitHub: https://github.com/haipisao/dsh-plugin-opencode-go-quota
  • Plugin directory: https://www.skillhub.cn/plugins/haipisao/dsh-plugin-opencode-go-quota