dsh-cost-receipt: A Cost and Balance Receipt for Every DeepSeek Harness Reply

divineeagleblackhand/dsh-cost-receipt

Models & ReasoningVerified
Listed on 2026-10-15
Page last updated 2026-10-15

A DSH plugin that adds a cost and balance badge under every reply, pricing each turn from its own token usage at official peak/off-peak CNY rates, with a hover cost pie chart and explicit reasons when a price cannot be computed.

dsh-cost-receipt is a DSH plugin that appends one receipt line beneath every DeepSeek Harness reply, telling you what the latest exchange cost and how much the account still holds. It prices each turn from its own token usage at the official peak and off-peak rates, splits the balance into top-up and bonus amounts, and draws side-by-side cost-share rings for the current exchange and the whole conversation on hover. When a price cannot be computed it states unpriced model, mixed models, or unlabeled usage rather than failing silently. The plugin makes no network calls, stores nothing, and has no dependencies; the balance comes through the host's account query and CNY accounts only are supported.

How to Install

install
npmdsh plugin --profile web add dsh-cost-receipt
Category
Models & Reasoning
Platform
DSH Plugin
Author
divineeagleblackhand
Distribution
Plugin

dsh-cost-receipt Key Features

Per-reply cost badgeSeparate recharge and bonus balancesHover cost breakdown pie chartPeak/off-peak and holiday pricingStates why pricing failed
Listed on dsh-plugin.org

dsh-cost-receipt Repo Summary

What Does It Do?

dsh-cost-receipt is a DSH plugin for DeepSeek Harness that adds one line under every reply showing what that exchange cost plus the account balance. It prices each turn from its own token usage at the official peak and off-peak CNY rates, splits the balance into top-up and bonus amounts, and draws a cost-breakdown pie chart on hover. When a price cannot be computed it states the reason instead of guessing or silently failing. The plugin makes no network calls of its own, stores nothing, and has no dependencies; it is maintained by divineeagleblackhand under the MIT license.

Core Features

  • Per-exchange pricing: each reply shows what the latest question cost, and historical turns are priced at the rate of their own time window so old sessions still compute correctly.
  • Split balance display: the account balance counts top-up funds only, with bonus balance listed separately and hidden when there is none; balances appear only on the newest turn.
  • Hover cost breakdown: two side-by-side rings compare the current exchange with the whole conversation, drawn by cost share rather than token share so cache hits do not collapse the chart into a sliver.
  • Explicit failure reasons: the badge states unpriced model, mixed models, or unlabeled usage instead of applying another model's rate.
  • Time-window and holiday logic: peak hours are Beijing time Monday to Friday 9:00–12:00 and 14:00–18:00 excluding statutory holidays, with the 2026 State Council schedule built in and timezone-independent evaluation.
  • Privacy by design: the plugin issues no network requests itself, reads the balance through the DSH host's account query, writes no files, and never touches credentials.

How to Use This Plugin?

After enabling it in DSH, a cost badge appears beneath every reply and can be read directly with no further action. The timestamp on the badge marks when the balance last changed, so a still timestamp means the number has not moved; hovering also reveals the last query time, letting you tell a stale reading from a genuinely unchanged balance. Balance queries fire every 30 seconds, dropping to every 3 minutes when the page is hidden. The plugin supports CNY accounts only and shows no amounts at all for non-CNY wallets, displaying just a notice that only CNY accounts are supported. It relies on internal turn data and account capabilities from DSH 0.2.0-rc.2, so if the badge disappears after an upgrade, that compatibility requirement is the first thing to check.

How to Troubleshoot This Plugin?

If the badge does not appear, fully quit and restart the desktop app, then confirm your DSH version satisfies the 0.2.0-rc.2 requirement the plugin depends on. If the badge reads unpriced model, mixed models, or unlabeled usage, that turn simply cannot be priced and the message is an intentional notice rather than a fault. If no amounts show at all, check whether the account is a CNY wallet, since non-CNY accounts are rejected outright. Turns crossing a peak/off-peak boundary are priced entirely by their end time with up to roughly 50% deviation, and the conversation total undercounts when a very long session is paginated; both are documented known margins rather than errors.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: divineeagleblackhand/dsh-cost-receipt. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.

Install, update, and uninstall this plugin in the Plugin Market of DeepSeek Harness's DSH Plugin Hub

DSH Plugin FAQ