DeepSeek Harness (DSH) uses an “everything is a plugin” architecture. When developing agents or invoking models, developers often need to monitor token consumption, cost calculations, and wallet balances in real time. Without additional tools, this information is often scattered across logs or the console, making it hard to view at a glance. The following plugin is built specifically for DSH to address these pain points.
The plugin is named dsh-usage-meter-harness, maintained by developer faith1688. It is a standard DSH Cordis plugin that provides real-time metering of usage, costs, and balances for DeepSeek Harness.
Feature Overview¶
The plugin provides the following core capabilities:
- Real-time monitoring: Displays token counts, spend, and actual balance directly beside the chat input box.
- Token breakdown: Supports token breakdowns across input, cache hit, cache write, and output.
- Turn and speed: Provides a turn usage panel showing per-turn usage and unit price (peak/off-peak); supports real-time token speed monitoring.
- Cache statistics: Provides cache hit-rate statistics for sessions.
- Wallet and budget: Displays the actual DeepSeek wallet balance (other providers can use local ledger estimates), and supports budget and remaining quota tracking.
- Billing engine:
- Provides 6 billing templates (basic, cache hit/miss, peak/off-peak, cache write + hit, input + output, batch half-price).
- Supports custom pricing rows (up to 4 rows).
- Peak/off-peak billing is based on Beijing-time weekdays and hourly windows, and supports cross-midnight billing.
- Supports per-model pricing and shared wallets.
- Includes price tables for 137 models (19 vendors).
- Automatic currency conversion (USD -> CNY).
- Supports syncing official prices (an official API key is required).
- Settings and experience:
- Bilingual UI (Chinese/English).
- Provides 20+ built-in themes.
- Locks the price at generation time to ensure consistency.
- WYSIWYG pop-up.
Installation and Activation¶
Ensure DSH CLI is installed before proceeding. The installation method depends on whether you use pnpm.
Prerequisites (Methods 1 and 2 require pnpm)¶
DSH CLI itself runs on pnpm. If you use Method 1 or Method 2, install pnpm first:
npm install -g pnpm
# 或
corepack enable
Installation Methods¶
Method 1: Using the npm registry via DSH CLI (requires pnpm)
dsh plugin --profile web add --verbose @faith1688/dsh-usage-meter-harness@latest
Method 2: Using the GitHub repository via DSH CLI (requires pnpm)
dsh plugin --profile web add --verbose github:faith1688/dsh-usage-meter-harness#main
Method 3: One-line installation (recommended, no pnpm dependency)
This method uses npm directly, without requiring pnpm coordination:
npx -y @faith1688/dsh-usage-meter-harness@latest
After installation, you must restart dsh web to apply changes:
dsh web
Usage and Updates¶
After a successful installation, the real-time usage panel is available in the chat interface. To update the plugin:
- Fresh installation or using the npx method: Run the installation command above again.
- Update with pnpm: Run the following command in the configuration directory:
pnpm update @faith1688/dsh-usage-meter-harness
- Force update: If pnpm reports that the version has not been updated (due to the 24-hour cooldown after a new version release), or if the binding uses a
file:path, use thenpxcommand directly:
npx -y @faith1688/dsh-usage-meter-harness@latest
This command is idempotent and upgrades the configuration automatically.
Notes:
* The installer does not modify cordis.patch.yml at the profile root, so other plugin configurations you added manually will not be overwritten.
* If you see a “satisfied” message when updating in a pnpm environment, use the npx command to force-pull the latest version.
Use Cases¶
This plugin is suitable for developers using DeepSeek Harness to invoke models, especially those who need precise cost control, cache hit-rate monitoring, and shared wallets across multiple models.
Summary¶
dsh-usage-meter-harness provides DSH with a complete solution for cost control and usage monitoring. With real-time panels, peak/off-peak billing, and official price synchronization, developers can manage resource consumption more intuitively.
- Plugin homepage: https://www.skillhub.cn/plugins/faith1688/dsh-usage-meter-harness
- Source code: https://github.com/faith1688/dsh-usage-meter-harness