ChatGPTClaudeGrok / X / CursorGemini

dsh-usage-billing: A Session Usage and Billing Panel for DeepSeek Harness

vacum972/dsh-usage-billing

Models & ReasoningVerified
Listed on 2026-11-05
Page last updated 2026-11-05

A DSH plugin that pins a live usage capsule under the composer, estimating session cost by official peak/off-peak pricing along with balance, request count and tokens.

dsh-usage-billing is a DSH plugin for DeepSeek Harness that keeps a compact usage capsule below the composer in the web interface, so a click reveals what the current session has cost, how much balance remains, how many requests were made, and how many tokens were used. Each request is priced by the peak or idle window it occurred in, with official prices calibrated automatically and the Chinese statutory holiday calendar fetched so peak/idle decisions follow official rules. Balance lookup, spend breakdown, and average cost all live in one popup styled to match the host's stats controls without covering the input box.

How to Install

install
npmdsh plugin --profile web add @vacum972/dsh-usage-billing
Category
Models & Reasoning
Platform
DSH Plugin
Author
vacum972
Distribution
Plugin

dsh-usage-billing Key Features

Live usage capsule under composerPer-request peak/off-peak pricingAuto-calibrated prices and holidaysShows account remaining balancePopup with cost and token details
Listed on dsh-plugin.org

dsh-usage-billing Repo Summary

What Does It Do?

Usage & Billing is a DSH plugin for DeepSeek Harness that adds a persistent real-time usage capsule below the composer in the web interface, and opens a popup showing this session's spend, remaining balance, API request count, tokens, and the official price list for the current time window. It solves the problem of not knowing what a long DSH session costs, folding per-request pricing, balance lookup, and peak/idle window detection into one compact panel instead of a trip to the platform dashboard. Maintained by vacum972 under the MIT license and written in JavaScript, it is a billing helper in the DSH plugin ecosystem.

Core Features

  • Per-request peak/idle pricing: each model request is priced by the window it occurred in, and switching windows never recalculates history.
  • Automatic price calibration: the host periodically fetches the official DeepSeek price document and parses model prices, falling back to the last successful prices with a popup notice on failure and retrying every 2 minutes.
  • Statutory holiday calendar: Chinese public holidays are fetched automatically so peak/idle decisions match official rules, with weekends and holidays idle all day and idle prices at roughly half of peak.
  • Remaining balance lookup: reads the logged-in account's top-up and bonus balances, shows the combined total, refreshes on popup open and every 60 seconds afterward, and supports manual retry.
  • Spend breakdown: the popup lists spend, request count, total tokens, average cost, and a split between peak and idle consumption.
  • Non-intrusive UI: the capsule and popup match the host composer's stats controls in a compact layout that never covers the input box.

How to Use This Plugin?

After enabling it in the DSH web interface, a real-time capsule appears below the composer, to the right of the host's own turn and context metrics, and accumulates this session's data as you chat. Click it to see spend, remaining balance, request count, tokens, and the official prices in effect for the current window; in logged-out or pure API-key mode it shows a login prompt, and on read failure it shows a retry prompt. To change currency, time zone, peak windows, refresh interval, or custom model prices, override the matching entry in the profile patch config, keeping in mind that a patch replaces the whole config so every key you want to keep must be written out. The plugin measures this session only, so values differ from the platform's 30-day usage summary by design; amounts are estimates and actual charges follow the DeepSeek bill.

This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: vacum972/dsh-usage-billing. 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
ChatGPTClaudeGrok / X / CursorGemini

DSH Plugin FAQ