dsh-cost-meter: An Automatic Conversation Cost Plugin for DeepSeek Harness

creakono/dsh-cost-meter

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

A DSH plugin that auto-calculates session cost based on a configurable price list, with per-model pricing and peak/off-peak rates.

dsh-cost-meter is a Web plugin for DeepSeek Harness that automatically calculates conversation costs based on a configured price list, eliminating the hassle of manual token estimation. It appends the session's cumulative cost after the stats line and offers an editable per-model price table with peak/off-peak pricing. Each turn is billed independently using the price snapshot at that time, and the session total is the sum of all entries, cleaned up on archiving. Price configuration is stored in settings.yaml and takes effect immediately, ideal for developers who need precise control over AI conversation costs.

How to Install

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

dsh-cost-meter Key Features

Cumulative cost displayPer-model price listPeak/off-peak pricingPer-turn independent ledger
Listed on dsh-plugin.org

dsh-cost-meter Repo Summary

What Does It Do?

dsh-cost-meter is a DSH plugin for DeepSeek Harness that automatically calculates conversation costs based on a configured price list. It solves the hassle of manually estimating token expenses by appending the current session's cumulative cost to the conversation stats line, and offers an editable per-model price table with peak/off-peak pricing. Core capabilities include per-turn independent accounting, price snapshots, local persistence, and a bilingual UI.

Core Features

  • Cumulative cost display: appends the session's total cost after the stats line (cache hit rate / input / output), with hover details showing model, billed turns, peak windows, and itemized breakdown.
  • Per-model price table: a new "Estimated Cost Price List" in settings lets you configure currency (CNY/USD), default prices, and three-tier unit prices (cache hit, cache miss, output) for any number of models.
  • Peak/off-peak pricing: enable multiple peak windows per model, each with its own three-tier prices, supporting overnight windows (e.g., 22:00–06:00); when a turn falls in a peak window, it is billed at peak rates and shows a "peak" badge.
  • Per-turn independent accounting: each turn is saved as an immutable entry with the price snapshot (model, peak window, unit prices, currency, tokens, amount) at the time it occurred; the session total is the sum of all entries, and archiving a session deletes its entries.
  • Local persistence: price configuration is stored in the dsh-cost-meter section of settings.yaml and takes effect immediately after saving; changes only affect new turns.

How to Use This Plugin?

After enabling the plugin in DSH and restarting the server, open "Settings → Estimated Cost Price List" to adjust currency, default prices, or per-model prices. For peak pricing, check "Peak Pricing" on a model, add windows, set peak prices, and click "Save"; subsequent turns will be billed per the new price list. Click "Restore Defaults" to clear user configuration and revert to factory prices. The cost line auto-hides when there is no usage data or the price list hasn't loaded. Note: historical turns before the upgrade won't generate entries, and currency cannot be switched once entries exist.

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