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.

Cost Governor — DSH Plugin for DeepSeek Harness
← Plugins
C

dsh-cost-governor

Cost Governor

Cost governance & budget enforcement for DeepSeek Harness: multi-provider pricing, per-model cost accounting, budget quotas with soft/hard thresholds, and cross-session trends.

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

npx -y @deepseek-ai/dsh plugin --profile web add github:yushuosun/dsh-cost-governor#db33c9b6e6f86c43f317e42f5d6d692808153eeb
READMECompatibilityVersions

Compatibility and provenance

Cost Governor is published as dsh-cost-governor and currently resolves to version 0.1.0. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
web
Release source
github
Registry updated
8/22/2026

Versions

0.1.0stable
8/22/2026

Related plugins

Loading related plugins…

Latest
0.1.0
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
Unavailable
Files
Unavailable
Surface
web
License
MIT
Source
github
GitHub
★ 0
Weekly downloads
0
Last push
8/22/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.

Usage@linxin666/dsh-usageUsage statistics plugin for the dsh web GUI: per-provider balance and coding-plan quota detection plus a live token usage ledger, with a dedicated pet bubble for the current providerWhale 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 editinUsage Stats@ychris12138/dsh-usage-statsToken usage heatmap, provider balances, and subscription quotas for the dsh web GUICodex Connectdsh-codex-connectChatGPT OAuth and Codex models for DeepSeek Harness.

README

dsh-cost-governor

Cost governance & budget enforcement for DeepSeek Harness.

A finance-grade "cost governor" layered on top of DSH's built-in token metering: it turns the harness's already-disjoint token buckets (input / output / cache-read / cache-write / reasoning) into money, then enforces a budget — soft warn → hard ceiling → block or steer to a cheaper model — with a polished in-app dashboard.

Not another "cost counter". The counter exists (dsh-token-meter). This plugin is the budget keeper that says how much you're spending, what it will cost by month-end, and stops you when you told it to.


Why this one

Capabilitycore dsh-token-metertypical community cost pluginsdsh-cost-governor
Disjoint token buckets✅partial✅ (reuses core)
Compaction-safe accounting✅⚠️ often drifts✅ (official projection seam)
Multi-provider precise pricing—mostly DeepSeek-only✅ catalog + cache/reasoning buckets
Budget warn—display only✅ threshold events + webhook
Budget enforce (block / steer)—❌✅
Cross-session trends + CSV—❌✅
Model cost comparison + savings tip—❌✅

Features

  • Per-model cost accounting on the official sessionProjections seam — stays correct through compaction and cold reads, and re-prices history instantly when you edit a price.
  • Multi-provider price catalog (DeepSeek, OpenAI, Anthropic, Google, xAI, Qwen, GLM, Moonshot) with separate cache-read/write and reasoning rates. Fully overridable.
  • Budget governance: daily | weekly | monthly | unlimited budget, warnRatio soft threshold, hardRatio ceiling, and a hardAction of notify-only | block-new-requests | steer-to-cheaper-model.
  • Webhook notifications (Slack-style / Feishu / DingTalk) on threshold crossings — fail-soft.
  • Dashboard (Settings → Usage & Cost): KPI cards, animated budget bar, per-model spend table, daily chart, savings tip, CSV export.
  • Compact HUD budget ring for the sidebar rail.

Install

# 1. install the plugin
npm i -g dsh-cost-governor          # or add it to your project

# 2. add to your DSH composition (cordis.yml)
- name: dsh-cost-governor
  config:
    currency: USD
    budget:
      period: monthly
      budgetUsd: 20
      warnRatio: 0.8
      hardRatio: 1.0
      hardAction: notify-only      # notify-only | block-new-requests | steer-to-cheaper-model
    notifyWebhook: ""              # optional
# 3. restart dsh — the dashboard appears under Settings → Usage & Cost

Configuration

keydefaultdescription
currencyUSDdisplay currency
budget.periodmonthlydaily | weekly | monthly | unlimited
budget.budgetUsd20period cap
budget.warnRatio0.8soft-warn at 80%
budget.hardRatio1.0ceiling at 100%
budget.hardActionnotify-onlyceiling behavior
notifyWebhook—optional webhook URL
priceCatalogbuilt-inper-model overrides (USD / 1M tokens)

Architecture

client dashboard / HUD
        ▲  session/projection frames + settings scope
host   UsageCost service ── BudgetGovernor · CostLedger · Notifier
        ▲  ctx.sessionProjections.register(costUsage)
costUsage projection   (pure fold: raw per-model token buckets)
        ▲  reuses core token buckets (request/context → model attribution)
dsh-token-meter · dsh-llm (TokenUsage)

The costUsage projection stores raw token buckets only — never currency — so it is replay-safe and a price-table edit re-prices history without refolding the log.

Development

pnpm install
pnpm build          # tsc (see PUBLISHING.md for the full DSH toolchain notes)

Open preview/dashboard.html for a zero-build visual preview of the dashboard.

Limitations

  • Only final assistant/message usage is billed; input spend of a request that fails before assembling a message is not captured (a provider still charges it). This matches the harness's own usage-carrier semantics and is a documented edge, not a miscount.
  • block-new-requests / steer-to-cheaper-model are exposed as a governance gate (BudgetGovernor.gate) and emitted events; wiring them into the LLM waterfall is the one integration point to verify against the official DSH plugin docs at first build.
  • Prices in the built-in catalog are community placeholders — verify against each provider before trusting absolute dollar figures.

License

MIT