Introduction

The core philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing or using agents, tracking token consumption and costs in real time is a common need, especially because the official pricing for DeepSeek V4-Flash includes peak and off-peak periods. dsh-fare-meter was created to solve this pain point: it visualizes the billing information to the left of the model selector in the input box, so you can see the cost ticking in real time while generation is running.

What Is dsh-fare-meter

It is a plugin maintained by bunipai. It simulates the behavior of a taxi meter: while the model is generating, the cost ticks up second by second, and it resets to zero when generation ends—it only counts what is being spent “at this moment” and does not accumulate totals or display a final price.

Core Features

The plugin provides the following capabilities:

  1. Real-time billing display: A minimal billing capsule appears in the input toolbar, to the left of the model selector, showing five decimal places and ticking in real time during generation.
  2. Peak/off-peak pricing: It includes DeepSeek’s official peak/off-peak periods (Beijing Time 09:00–12:00 and 14:00–18:00 are peak; all other times are off-peak at half price) and displays peak/off-peak labels.
  3. Price table configuration: It includes the official V4-Flash price list.
    • Peak period: non-cached input ¥3/M, cache hit ¥0.1/M, output ¥9/M.
    • Off-peak period: the above prices are halved.
  4. Dual calculation logic: Settled usage is calculated precisely from a session snapshot, while in-flight output is estimated in real time based on measured decoding speed.

Installation and Activation

Install it by running the following command in the command line:

dsh plugin --profile web add dsh-fare-meter

After installation, refresh the page. The meter will then appear in the input toolbar, to the left of the model selector.

Notes

  1. Price estimation: The meter uses estimates based on publicly available official prices. If the actual model rates are different, please notify the maintainer via the plugin catalog or GitHub repository for calibration.
  2. Display logic: The meter only appears when there is an active session.
  3. Runtime permissions: The plugin runs with the permissions of the current DSH process. It is recommended to review the source code and license before installation.

Summary

For developers who need fine-grained control over model invocation costs, dsh-fare-meter provides an intuitive real-time monitoring method. For more details, see the plugin catalog or the GitHub repository.