dsh-cost-breakdown: A Session Cost Billing Panel for DeepSeek Harness

liaimei/dsh-cost-breakdown

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

A DSH plugin that shows a session cost breakdown in DeepSeek Harness: balance, peak/off-peak pricing, and how each session's spend (including forked sub-sessions) is composed.

dsh-cost-breakdown is a DSH plugin that turns the invisible session spend inside DeepSeek Harness into always-visible readings. It fills the gap left by a harness that ships without any pricing model, letting you see below the input box, in the right sidebar, and on the cost overview page how much the current session costs, what balance remains, and whether peak or off-peak pricing applies. Costs are computed across three token buckets — cache-hit, cache-miss input, and output — and split by peak/off-peak and by own versus derived sessions, with derived sessions counted only once. Maintained by liaimei under the MIT license and written in JavaScript.

How to Install

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

dsh-cost-breakdown Key Features

Inline cost readout below inputUsage & cost sidebar panelLive peak/off-peak countdownCost split by token bucketsAccount-wide daily spend overview
Listed on dsh-plugin.org

dsh-cost-breakdown Repo Summary

What Does It Do?

DSH Cost Breakdown is a DSH plugin for DeepSeek Harness that turns session spend and account balance into always-visible readings. It solves the problem that the harness ships without any pricing model, so you can see directly below the input box, in the right sidebar, and on the cost overview page how much the current session costs, what balance remains, whether peak or off-peak pricing applies, and how the spend splits across peak/off-peak, own versus derived sessions, and the three token buckets. Maintained by liaimei under the MIT license and written in JavaScript, it is a usage-observability tool in the DSH plugin ecosystem.

Core Features

  • Three entry points: a persistent one-line reading under the input box that expands into a detail card, a "Usage & Cost" tab in the right sidebar, and a "Cost Overview" page in the left navigation for the whole account.
  • Accurate token bucketing: prices cache-hit input, cache-miss input, and output separately, avoiding the order-of-magnitude overestimate that comes from billing cached input at the miss rate.
  • Peak/off-peak pricing with a live countdown: distinguishes Beijing-time weekday peak windows from idle windows, where idle costs half of peak, and drives the countdown from a shared one-second ticker that re-reads state when the window actually flips.
  • Derived sessions counted once: detects seeded fork and summary-rebuilt sessions, excludes the inherited ancestor event prefix, and matches the own + children accounting of the single-session view session by session.
  • Cost overview and daily chart: switches between the last 7 days, last 30 days, and all time, with a daily bar chart toggleable between cost and token views and a session table sorted by recent activity that flags derived sessions.
  • Live statistics without disk cache: replays session logs on every open or range change, counting at most 500 sessions at a time and clearly labeling anything beyond that.

How to Use This Plugin?

After enabling it in DSH, a persistent cost reading appears under the input box; click it to expand a detail card showing account balance, the current billing window and price table, a token statistics ring, and stacked cost-composition bars. For long-running observation, open the "Usage & Cost" tab in the right sidebar; to see whole-account daily spend and per-session costs, click the gauge icon in the left navigation to open "Cost Overview" and switch between the 7-day, 30-day, and all-time ranges there. Balance is read from the harness's built-in account service first and falls back to a direct API key query when not signed in; costs are estimates computed from the official price table, and models not covered are counted as requests but not billed, with a note shown in the interface.

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