Introduction

When conducting session and agent debugging in DeepSeek Harness (DSH), token usage is usually visible, but information such as the accumulated cost of the current session, model price tiers, and peak/off-peak periods needs to be verified separately. dsh-cost-display is a DSH plugin used to display the accumulated cost of the current session in real-time on the session status bar and to calculate costs based on the model and peak/off-peak periods.

What is this

dsh-cost-display is the DeepSeek Harness cost display plugin: it appends cost information to the session status bar and manages price tables, effective dates, peak/off-peak windows, fallback prices, and peak/off-peak toggles in the settings page.

Repository: https://github.com/misakimiku2/dsh-cost-display

License: MIT

Core Features

  • Status Bar Cost Display: Appends the accumulated cost of the current session to the token statistics (e.g., Cost ¥X.XX); hovering over it reveals a detailed cost breakdown.
  • Cost Breakdown Popup: Splits token usage and costs by model, and displays the number of Chain-of-Thought (reasoning) tokens separately.
  • Peak/Off-Peak Pricing: Default peak hours are Beijing Time 09:00-12:00 and 14:00-18:00; off-peak hours are automatically billed at the off-peak rate.
  • Configurable Price Table: Each model supports multiple price tiers that automatically switch based on effective dates, used to handle official price adjustments.
  • Automatic Model List Sync: After adding or modifying a model in the “Model Settings” page, it is automatically added to the price table without manual operation.
  • Fallback Price for Unknown Models: Models not listed in the price table are billed at a fallback price, and the cost display is prefixed with ?.
  • Per-Model Peak/Off-Peak Toggle: Allows disabling peak/off-peak pricing for a specific model, making it always bill at the standard price.

Installation and Enablement

Installation via dsh Command

First, prepare the local plugin directory, then execute the installation command. The command adds the plugin to the web profile.

dsh plugin --profile web add <plugin directory path>

Manual Profile Configuration

If you do not use the dsh command, you can also manually configure the web profile.

Add the following to the dependencies in ~/.dsh/profiles/web/package.json:

"dsh-cost-display": "link:<absolute path to plugin directory>"

At the same time, add the following to the dsh.profile.bundles array:

"dsh-cost-display"

Then restart Harness.

When installing manually, the package.json declares the following peerDependencies:

@deepseek-ai/cordis ^4.0.1
@deepseek-ai/schemastery ^3.18.1
react ^18.2.0

Typical Usage

  1. Install and restart Harness.

  2. Go to “Cost Settings” in the settings page and view/modify the following configurations:

  • Price Table: The price tiers for each model.
  • Effective Date: Used to switch price tiers when the official price changes.
  • Peak/Off-Peak Window: Default peak hours are Beijing Time 09:00-12:00 and 14:00-18:00.
  • Fallback Price: Models not listed in the price table are billed at this price.
  • Peak/Off-Peak Toggle: Decides whether to enable peak/off-peak pricing for a specific model.
  1. After saving the changes, new requests are billed immediately at the new price, and the cost of historical sessions is not affected.

Costs are estimated using the following formula:

Cost = (Miss Input Tokens + Cache Write Tokens) × Miss Unit Price
     + Cache Hit Tokens × Hit Unit Price
     + Output Tokens × Output Unit Price

Unit prices are selected based on the model’s effective date and Beijing Time peak/off-peak periods: Hit, Miss, and Output correspond to different unit prices; peak and off-peak periods use different price tiers.

Applicable Scenarios and Notes

Suitable for users who want to track session costs, maintain multiple model price tiers, or handle official price adjustments or peak/off-peak periods within DSH.

Please note the following:

  • Costs are estimates based on token usage and unit prices and may differ from the actual deduction on the DeepSeek official website, for example due to unrecorded requests or tokenizer differences.
  • The plugin runs with the permissions of the current dsh process; you should check the source code and license before installing.
  • You need to restart Harness after manually configuring the profile.
  • Unknown models are billed at the fallback price, and the cost display is prefixed with ?, making it easy to distinguish that this is not a clearly defined price from the configured price table.

Conclusion

The value of dsh-cost-display is straightforward: placing session costs in the status bar and managing price tables, effective dates, peak/off-peak windows, and fallback prices in the settings page. The community directory is an independent site and has no official affiliation with DeepSeek / Xiaofang.

Directory Page: Current verified information does not provide a fixed URL.

GitHub Repository: https://github.com/misakimiku2/dsh-cost-display