Introduction

DSH (DeepSeek Harness) adopts an “everything is a plugin” architecture. For agent developers, monitoring usage and balance is an essential requirement. dsh-usage-stats-plus is an enhanced plugin for the official panel, aimed at solving issues such as inaccurate local estimates and the lack of cross-channel consumption tracking. It is forked from dsh-usage-stats, maintained by Nixz0824, and released under the MIT license.

Core Features

The plugin mainly includes the following capabilities:

  • Real-time retrieval of official balance: Directly calls the /user/balance endpoint to obtain the balance, without relying on local estimates.
  • Event-level precise pricing: Based on the official peak/off-peak pricing schedule, accurately bills each event in conversation logs.
  • Cross-channel consumption estimation: Calculates consumption using daily snapshot differences from the official balance endpoint, aligning with the Open Platform billing scope (requires the previous day’s snapshot and takes effect the next day).
  • Codex-style activity timeline: Provides a 12-month rolling view, supporting daily, weekly, and cumulative modes.
  • Monochrome black/white/gray UI: Visual style aligned with the official DeepSeek whale logo, with adaptive light/dark themes.
  • No additional dependencies: Implemented in pure JavaScript, requiring no build step and introducing no new runtime dependencies.

Installation and Activation

The plugin repository is public and can be installed using the following commands. The prebuilt package from GitHub Releases is recommended:

dsh plugin --profile web add https://github.com/Nixz0824/dsh-usage-stats-plus/releases/latest/download/dsh-usage-stats-plus-0.3.0.tgz

Alternatively, install from the GitHub source:

dsh plugin --profile web add github:Nixz0824/dsh-usage-stats-plus

After installation, refresh the browser page to load client-side resources, and restart dsh web to ensure the sidebar entry displays correctly.

Configuration and Pricing Basis

The plugin supports overriding prices through configuration. Add an insert entry in cordis.patch.yml:

- insert:
    - id: usage-stats
      name: dsh-usage-stats-plus
      config:
        prices:
          "deepseek-v4-pro": { peak: { hit: 0.30, miss: 9.0, output: 27.0 }, offpeak: { hit: 0.15, miss: 4.5, output: 13.5 } }
          # 其他模型可在此补充

Pricing is based on the official pricing document (effective 2026-08-17) and includes three billing dimensions: cache hits, input misses, and output. Peak-hour determination is based on Beijing Time.

Notes

  • Cache billing: Cache writes are billed at the input-miss price.
  • Time zone limitation: Peak-hour determination is strictly based on Beijing Time and is independent of the machine time zone.
  • Unknown models: Except for V4-Pro and V4-Flash, other models are not priced by default and are displayed as unknown.
  • Cross-channel estimation: Cross-channel consumption estimation requires the previous day’s balance snapshot; the data takes effect the next day.
  • Copyright retention: The copyright notices of upstream dsh-usage-stats contributors (2026) are retained.

The plugin refines the pricing engine and UI, providing DSH users with a consumption view that better aligns with official bills. See the links below for source code and documentation.