DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

Plugin Session Cost Pill — DSH Plugin for DeepSeek Harness
← Plugins

dsh-plugin-session-cost-pill

Plugin Session Cost Pill

Live session spend in the DeepSeek Harness composer dock, pricing every assistant step at DeepSeek's peak or off-peak rate for its own timestamp.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-plugin-session-cost-pill@1.1.2
READMECompatibilityVersions

Compatibility and provenance

Plugin Session Cost Pill is published as dsh-plugin-session-cost-pill and currently resolves to version 1.1.2. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
npm
Registry updated
10/13/2026

Versions

1.1.2stable
10/13/2026

Related plugins

Loading related plugins…

Latest
1.1.2
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
33 kB
Files
9
Surface
web
License
MIT
Source
npm
GitHub
★ 0
Weekly downloads
0
Last push
10/13/2026
View source ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue
DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in

Related plugins

More verified plugins in models-usage.

Whale Widgetdsh-whale-widgetDeepSeek balance whale widget in the bottom-right corner of the DSH Web interface: balance/today’s usage/peak-off-peak pricing, customizable bubble click sequence (text/balance/today/peak-off-peak/image/random phrases and parallel weighted selection), per-line styles and fonts, floating quick editinClient Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilitiesPer-model capability declarations (image input and reasoning efforts) for custom pi-ai providers, edited in place on the Models settings cards; writes the official llm-pi-ai settings namespace, no DSH source changes.Cost Meterdsh-cost-meterDeepSeek Harness session cost statistics plugin: current session cost, today’s charges, historical records, and synchronization with official pricing; supports multi-provider, multi-model price calculation (built-in pricing catalog for 170+ model IDs with automatic matching); queries and displays suCodex Subscriptiondsh-codex-subscriptionUse ChatGPT and Codex subscriptions in DeepSeek Harness with OAuth, quota, safe resets, web search, images, and Fast mode

README

💸 Session Cost Pill — DeepSeek Harness

Live session spend, right in the composer dock.

Session cost pill in the DeepSeek Harness composer dock

DeepSeek tells you how many tokens you burned. It does not tell you what that cost. This plugin does — live, per session, without a single line of patched harness source.


What you get

The composer dock already tracks turns, speed, tokens, and context. The cost pill joins that row:

PillShows
⏱ activityturns · steps · decode speed
💾 usagetotal tokens · cache-hit rate
💸 costestimated spend for this session
🪫 contextcontext-window pressure

The glyph climbs with the session total, so the row reads at a glance before the number does:

💸💵💰🔥🚨
under $1under $5under $20under $100$100 and up

Click it and the breakdown opens: uncached input, cache reads, and output, each priced separately, plus how much of the total was charged at peak rates and how many steps that covered. It closes on Escape, on a click outside, or on a second click — the browser's own popover behaviour, so the plugin ships no dialog state, listeners, or positioning code of its own.

The cost pill The cost breakdown panel open above the pill

Full window with the pill running


Install

dsh plugin --profile web     add ~/code/github.com/vegerot/deepseek-harness-session-cost-pill
dsh plugin --profile desktop add ~/code/github.com/vegerot/deepseek-harness-session-cost-pill

That is the whole install. No build, no bundler, no dependencies. Restart the profile and refresh.


Why the number is right

Most cost trackers multiply a session's tokens by one flat rate. That is wrong for DeepSeek twice over.

1. DeepSeek has peak pricing

Prices double during peak hours, so a single rate per model cannot price a session.

ModelTierCache hit inputCache miss inputOutput
deepseek-flashoff-peak0.0030.150.60
deepseek-flashpeak0.0060.301.20
deepseek-v4-prooff-peak0.0220.661.98
deepseek-v4-propeak0.0441.323.96

USD per 1M tokens, transcribed from Models & Pricing.

Peak is 01:00–04:00 and 06:00–10:00 UTC, Monday–Friday. Everything else — all weekend — is off-peak.

So this plugin prices every assistant step at the rate in effect for that step's own timestamp. A session that crosses a peak boundary gets a correctly blended total instead of a guess.

2. Cache hits dominate, and they are ~50× cheaper

A cache hit costs a fraction of a cache miss. A tracker that folds all prompt tokens into one bucket will miss the mark badly on a long agent session — exactly the kind that reads 96% cache-hit.

Verified against real billing

DeepSeek publishes no pricing API, but its Platform console reports authoritative cost. Checking this plugin's table against one real account's October deepseek-flash usage:

tokens:  hit 140.56512M   miss 2.828971M   out 0.758458M
published all-off-peak total   = $1.301116
platform's own billed total    = $0.453778 + ¥6.0056894
                               = $1.301116 at FX 7.0877 CNY/USD

A 0.11% match. The table is right, and that month's usage was effectively all off-peak — assuming peak would have doubled the estimate.


How it works

It is an ordinary Cordis client plugin. Nothing in the harness is patched, forked, or monkey-patched.

ctx.slots.inject('conversation.composer.dock', () => ctx.slots.register({
  name: 'conversation.composer.dock',
  id: 'cost-pill',
  order: 2,            // joins the activity (0) and usage (1) pills
}, CostPill));

The pill reads the chat snapshot through the session standard kit and folds it:

  • useChat → every settled assistant step, each carrying its own time and provider usage
  • useProjection('modelSelection') → the session's model
total = Σ over steps  costOfUsage(step.usage, model, isPeak(step.time))

isPeak classifies one request from its UTC weekday and hour, so pricing is per-request rather than per-session.


Known limits

Honest ones, not footnotes:

  • Chinese public holidays are off-peak in full, and this is not modelled. That needs a PRC holiday calendar, so weekday windows falling inside a holiday week are priced as peak — slightly overstating those days.
  • The model is priced at session level. Chat assistant nodes carry time and usage but not the model, so a session that switched models mid-way prices every step at the most recently used model's rates.
  • Account-level spend is not shown. DeepSeek's Platform console does expose real billed cost through private endpoints that authenticate with x-dsh-auth-token (not Authorization: Bearer), and DSH already holds that grant via getPlatformSession(). It is deferred here because the browser half of a Remote needs generated zod codecs.

Development

pnpm test        # tsc --noEmit && node --test test.ts
pnpm typecheck   # the type check alone

Types without a build step. client.js ships as plain JavaScript on purpose: the harness injects plugin bundles into the page as a classic script (<script src>, no type="module"), so the file reaches the JS engine verbatim. There is no build step and no runtime type stripping on the browser side.

Types therefore live in JSDoc annotations, verified by tsc --checkJs. Real, CI-visible checking with no toolchain. test.ts is different — Node strips its types natively.

The suite pins the behaviour that matters:

  • peak windows, both edges, the mid-day gap, and weekends
  • published rates for both models, off-peak and peak
  • one off-peak plus one peak step in a single session, asserting the summed per-step rates — the case a session-wide total provably cannot produce
  • an unpriced model renders no pill rather than a wrong number

License

MIT — see LICENSE.