When developing or debugging agents in DeepSeek Harness (DSH), real-time visibility into API call costs and official account balances can help control your budget. dsh-usage-meter is a plugin designed to provide simple, direct monitoring of usage and balance.

This plugin is a simple usage metering tool that displays the amount of API consumed. It supports peak/off-peak pricing. The author is HunterCHCL, it is classified under admin-security, and it is licensed under MIT.

Core Features

  • Display balance and spending: Displays the DeepSeek official API balance and current session spend.
  • UI interaction: Displays the amount in the upper-right corner of the interface, with details shown on hover.
  • Configuration options: Supports configuring the price table and peak/off-peak pricing in the settings page.
  • Language follow: The UI language follows the DSH language setting.
  • Official interface: Calls the official DeepSeek API through the Session header indicator to retrieve the balance.

Installation and Enablement

Use the official installation command to install it:

dsh plugin --profile web add @hunterchcl/dsh-usage-meter

Typical Usage

  1. Switch language: In DSH Settings -> General -> Language, switch the interface language, and the plugin UI will update accordingly.
  2. View details: Hover over the amount in the upper-right corner of the interface to view detailed spending for the current session.
  3. Configure pricing: Enable peak/off-peak pricing in settings to calculate fees based on the time window in which requests occur.

Use Cases and Notes

  • Estimation reference: The usage data is a local estimate based on DSH’s persisted session event logs (assistant/chunk and assistant/message). It is for reference only and is not a platform bill. Please rely on the official DeepSeek figures.
  • Historical calculation: When a session is opened, the full historical usage is calculated, including records from before the plugin was installed.
  • Compatibility: Only the official DeepSeek API is supported. For non-official APIs, missing keys, or query failures, the balance is hidden.
  • License: MIT license.
  • Maintenance tip: Running pnpm install manually may clean up the local plugin directory. It is recommended to use the provided installation script instead.

This plugin provides DSH users with a lightweight means of cost control. Related documentation and source code can be viewed on the directory page below and in the GitHub repository.