dsh-cost-meter: An Automatic Conversation Cost Calculator Plugin for DeepSeek Harness
creakono/dsh-cost-meter
DSH plugin that auto-calculates session cost based on configured price list with peak/off-peak pricing.
Let DeepSeek Harness automatically calculate the cost of each conversation based on a configured price list, and display the cumulative amount after the statistics line.
dsh plugin --profile web add dsh-cost-meter- Category
- Models & Reasoning
- Platform
- DSH Plugin
- Author
- creakono
- Distribution
- Plugin
dsh-cost-meter Key Features
dsh-cost-meter Repo Summary
dsh-cost-meter is a DSH plugin for DeepSeek Harness that automatically calculates conversation costs. It solves the hassle of manually estimating token expenses by appending a cumulative cost display after the conversation statistics line, and provides an editable per-model price list. The plugin is maintained by Creakono, licensed under MIT, last updated in 2026-08, with current version 0.2.0.
What core features does the dsh-cost-meter DSH plugin support?
The plugin supports per-model price configuration with prices per 1,000,000 tokens, covering three billing items: input cache hit, input cache miss, and output. Each round is priced independently and saved as an immutable entry, with the session showing the cumulative sum. It also supports peak/off-peak pricing, allowing multiple peak windows per model, using local time HH:mm, where start > end indicates crossing midnight. Cost entries are stored in DSH's own storage-domain sidecar table, isolated per session, and automatically deleted when the session is archived.
How to install dsh-cost-meter?
In the harness directory, add the plugin to the web profile by running:
dsh plugin --profile web add github:creakono/dsh-cost-meter
Or use a local source link:
dsh plugin --profile web add "link:<dsh-cost-meter directory>"
After installation, restart the web server and refresh the page.
How to configure the price list for dsh-cost-meter?
Open the "Estimated Cost Price List" in settings to modify currency (CNY/USD), default prices, and per-model prices. Each model can enable peak pricing, add windows, and set peak prices. The configuration is saved in the dsh-cost-meter section of $DSH_HOME/settings.yaml and takes effect immediately. Click "Restore Default" to clear user config and revert to factory prices.
Which DeepSeek Harness versions and platforms are compatible with dsh-cost-meter?
The plugin is written in TypeScript and runs as a DSH plugin under the web profile. It registers to conversation.composer.dock and auto-refreshes on session switch. The UI supports both Chinese and English, switching with the interface language. The plugin uses its own same-origin routes for config and ledger, not writing session data to settings.yaml.
What are the default prices and billing logic of dsh-cost-meter?
On first install, a CNY price list is preset, e.g., deepseek-v4-flash: cache hit ¥0.02, cache miss ¥1, output ¥2. Each round cost = (cache hit × hit price + cache miss × miss price + output × output price) / 1,000,000. Each round is priced independently based on the model and peak/off-peak period at that time, saving a price snapshot; later price changes only affect new rounds.
