The plugin architecture of DeepSeek Harness (DSH) allows developers to extend functionality as needed, but the native features often fall short when viewing live token consumption and cross-model cost comparisons in the chat editor. The dsh-token-live plugin provides an intuitive dashboard for the DSH chat editor, addressing pain points such as draft estimation, session billing, and cost comparison.

Plugin Positioning

This is a client-side plugin maintained by woodfood111. It contains no server-side components and runs entirely in the browser. The plugin does not read API keys or credentials; it reads the internal state of DeepSeek Harness through injected hooks and provides CJK-weighted draft counts, session consumption, context usage, and cross-model cost estimates.

Core Features

The plugin adds a statistics panel below the chat editor and provides the following data:

  • CJK-weighted draft count: Estimates the number of tokens in the current input box, with adjusted weights for CJK characters (approximately 0.7 token/character), rather than the default 4 characters/token.
  • Session consumption: Calculates session cost separately for Peak and Idle periods based on the official price list.
  • Context usage: Displays the used window size; it appears only after the provider reports usage.
  • Cross-model cost comparison: Calculates the cost of completing the same task on the most expensive other model. Hover over the “Comparison” or “vs” label to view detailed pricing for the current session across models.

Installation and Enablement

To install the plugin, run the following command in your terminal:

dsh plugin --profile web add dsh-token-live

After installation, refresh the page; the plugin will be automatically enabled.

Usage

The plugin adds a statistics panel below the chat editor.
* Check the “Draft” line to see the current input volume.
* Check the “Cost” line to see the total session cost.
* Check the “Comparison” or “vs” label and hover over it to see the estimated cost of the current session on the most expensive other model.

Notes and Limitations

  • Security mechanism: The plugin has no server-side components, does not read API keys or credentials, and its security is ensured by the browser sandbox.
  • Accuracy note: Draft counts are estimates mainly for preview purposes; code/JSON and other symbol-dense content may result in higher values. Session consumption, context usage, and Session statistics are accurate.
  • Context reading: Context usage data appears only after the provider reports usage; it may be empty initially.
  • No streaming count: Real-time per-token counting is not provided during generation.
  • Pricing periods: Uses the official price list effective from 2026-09-10. Peak hours are 09:00-12:00 and 14:00-18:00, Monday to Friday, UTC+8; all other times are Idle hours, billed at half the peak price.

Summary

This plugin addresses DSH’s shortcomings in real-time statistics and cross-model cost comparison through pure front-end calculations, making it suitable for developers who need fine-grained token budget control.