AI Agent Hub
Back to plugins
🖥️

dsh-session-cost

Client Updated 2026.08.18

Run the following command in DeepSeek Harness:

dsh plugin install dog-lin/dsh-session-cost

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install dog-lin/dsh-session-cost inside DeepSeek Harness to install this plugin; the source is available at https://github.com/dog-lin/dsh-session-cost , then refresh the browser page to activate the sessionCost projection.

About this plugin

If you run DeepSeek sessions through Harness on a regular basis, the question that keeps resurfacing is rarely about output quality: it is about cost. How much did this turn actually spend? When DeepSeek adjusts its pricing or ships a brand-new model, manually looking up rates on the official page and doing the arithmetic by hand is tedious and easy to get wrong. dsh-session-cost answers that by rendering the live session cost right in the status bar beneath the composer, so you can see how much you have already spent and how much budget remains before you hit send.

Pricing is computed by a deterministic replay of the persisted session log. The four buckets — input, cacheRead, cacheWrite, output — are mutually exclusive, and each step is charged exactly once, consistent with the dsh-token-meter accounting standard. By default the plugin auto-syncs with the DeepSeek official pricing page: it fetches the page at startup and every 24 hours, and the parser discovers every model by its column layout, so when DeepSeek releases a future model the plugin picks up its price automatically with zero code changes. Historical requests are priced from a per-model timeline at the moment they occurred, meaning later adjustments never retroactively rewrite old invoices. The peak-and-off-peak pricing DeepSeek introduced in August 2026 (peak 09:00-12:00 and 14:00-18:00 Beijing time, off-peak at half rate) is natively supported, and the peak window is configurable.

If you prefer full control, set pin to true on any model to lock its price permanently; unlisted models fall back to a safe default that is explicitly flagged as unpriced in the UI rather than silently dropped. Every projection carries the price source, the last successful fetch timestamp, and any warning, all visible in a hover tooltip. This plugin is a natural fit for teams or individual developers who call DeepSeek at high volume and need accurate, auditable budget tracking.

Use Cases

  • Monitor cumulative token cost in real time during long sessions to stay within budget
  • Auto-sync DeepSeek pricing after official rate changes without manual config edits
  • Schedule heavy workloads in off-peak windows to reduce actual spend

Best For

  • Developers who call DeepSeek at high volume and need live cost visibility
  • Teams with audit or compliance requirements for AI spend
  • Engineers focused on token economics and precise inference cost control