dsh-cost-meter: Adding Session Spend to the DeepSeek Harness Stats Line

nanako660/dsh-cost-meter

Models & ReasoningVerified
Listed on 2026-09-21
Page last updated 2026-10-23

Adds a spend pill to the DSH Web composer stats line, pricing the session's tokenUsage projection with your own per-bucket unit prices and a click-through bill breakdown.

dsh-cost-meter is a DSH plugin that adds a spend pill to the right of the token-usage pill in the DeepSeek Harness Web client's bottom stats line, showing what the current session has cost. It addresses the gap that the host carries no price information at all, so unit prices are entirely user-configured. The plugin only reads the host's existing tokenUsage projection and performs one multiply-add across four disjoint billing buckets — uncached input, cache read, cache write, and output — never metering, touching a model request, or writing the session log. Clicking the spend pill reveals the per-bucket bill, with an optional savings figure for cache hits.

How to Install

install
dsh plugin --profile web add github:nanako660/dsh-cost-meter
Category
Models & Reasoning
Platform
DSH Plugin
Author
nanako660
Distribution
Plugin

dsh-cost-meter Key Features

Session spend in stats lineClick for per-bucket billConfigurable prices and currencyReads tokenUsage projection only
Listed on dsh-plugin.org

dsh-cost-meter Repo Summary

What Does It Do?

Cost Meter is a DSH plugin for DeepSeek Harness that shows the current session's spend to the right of the token-usage pill in the Web client's bottom stats line. It solves the problem that DSH carries no price information at all: model metadata has no price field and router catalogs supply no unit prices, so prices can only be configured by the user. The plugin does not meter anything, never touches a model request, and never writes the session log — it simply multiplies the existing tokenUsage projection by the per-bucket unit prices you enter.

Core Features

  • Session spend pill: adds a currency pill next to the turn and token-usage pills in the stats line.
  • Per-bucket bill: clicking the spend pill opens a detail panel breaking the cost down into four disjoint billing buckets — uncached input, cache read, cache write, and output.
  • User-configured unit prices: set the currency symbol, the pricing unit (such as per million tokens), the price of each of the four buckets, and the number of decimals.
  • Savings display: an optional savings figure shows how much cache hits save on the current session.
  • Pure consumer design: it only reads the host's existing tokenUsage projection, leaving host token accounting, model requests, and the session log untouched.

How to Use This Plugin?

Once enabled in the DSH web profile, the bottom stats line gains a spend pill alongside the existing turn and token-usage pills. On first use you need to fill in the currency symbol, pricing unit, and the four per-bucket unit prices in the plugin config, otherwise the amount stays at zero; after that the stats line reflects the session's spend in real time. Clicking the spend pill shows the per-bucket bill, while the other two pills open detail panels identical to the originals. Because the web profile hot-applies configuration, no host restart is needed, but the browser requires one page refresh to fetch the new client bundle. Maintained by Nanako660 under the MIT license, it is a cost-tracking tool in the DSH plugin ecosystem.

How to Troubleshoot This Plugin?

If the spend pill does not appear in the stats line, first check whether the plugin row made it into the composed configuration tree by dumping the profile config and looking for the corresponding entry. If the row is present but still inactive, run the repository's install verification script, which checks whether the profile can resolve both halves, import the host half, and validate the row config. Note that requesting the launch URL without credentials cannot be used to verify anything — such requests always return 404, including for built-in plugin bundles.

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