dsh-session-cost
Run the following command in DeepSeek Harness:
dsh plugin install F1shn/dsh-session-cost
Paste the following prompt into your AI chat to install this plugin:
Install this plugin in DeepSeek Harness by running dsh plugin install F1shn/dsh-session-cost; the full source is at https://github.com/F1shn/dsh-session-cost. After installation, simply restart DSH Web or Desktop and the session cost badges will appear without any extra configuration or API key setup.
About this plugin
When you run inference on the DeepSeek API, the scariest part is rarely a crash but the monthly bill that reveals tokens quietly burned through a chunk of budget. dsh-session-cost surfaces that number in real time: a cumulative cost badge sits to the right of the DSH session title bar, and a floating line under every completed reply shows exactly what that turn cost, so every inference call is priced at a glance.
The pricing logic goes beyond a flat tokens-times-rate figure. The plugin splits each model call into cache-hit input, cache-miss input, and output tokens, then automatically applies peak (Beijing 09:00-12:00 and 14:00-18:00, at 2x off-peak) or off-peak unit prices based on request time. Built-in rates are calibrated against actual DeepSeek usage billing as of 2026-08-17, covering DeepSeek-V4-Flash and V4-Pro. A single reply aggregates every model step in the turn, including multi-step reasoning around tool calls, sharing the same turn boundary as the adjacent duration, first-token, and tok/s metrics; when streaming and final usage belong to the same step the final value replaces the stream to avoid double counting. Opening a historical session triggers a full re-fold from the complete session log so old data is still priced correctly.
It is a pure plugin registered through the conversation.chat.assistant-actions slot and touches zero lines of DSH core frontend. Uninstalling it makes both the title-bar total and per-reply badges vanish immediately with no rollback required. It is built for developers who run DeepSeek inference daily through DSH Web or Desktop and want a running cost meter before the invoice arrives.
Use Cases
- Check cumulative API cost at a glance in the DSH title bar
- Review per-turn token usage and cost under each reply
- Auto-apply peak and off-peak pricing based on request time
Best For
- Developers who call DeepSeek API daily via DSH
- Teams that want cost visibility before invoices arrive
- Users who need to distinguish cache-hit vs cache-miss costs
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.