AllDSH
中文

dsh-cost-meter

Han-1413141 · Han-1413141/dsh-cost-meter

Session/daily cost, budget, multi-vendor Coding Plan quotas, peak/off-peak pricing alerts, and a bilingual settings UI for DeepSeek Harness.

dsh-cost-meter is a DSH plugin by Han-1413141. Session/daily cost, budget, multi-vendor Coding Plan quotas, peak/off-peak pricing alerts, and a bilingual settings UI for DeepSeek Harness. It is filed under UI & Experience and Tools & Capabilities. Verification level L3 (Install spec), an automated security scan has not run yet, and it targets DeepSeek Harness >=0.1.0-rc.5; the listing was last checked on 2026-09-18 and is published under the MIT licence. Install it with dsh plugin --profile web add dsh-cost-meter

Listing checked by Chiyu , data updated · How to cite

L3active
dsh-cost-meter verification panel: level L3 of 5 (Install spec) — Install command parsed, DSH target declared. Security scan: unverified — no scan has run. Compatibility target: DeepSeek Harness >=0.1.0-rc.5. Licence: MIT. GitHub stars: 311. Listing last checked 2026-09-18.
Verification panel for dsh-cost-meter. The listing holds level L3 of 5 — Install spec: Install command parsed, DSH target declared. Security scan: unverified — no scan has run. Compatibility target: DeepSeek Harness >=0.1.0-rc.5. Licence: MIT. Listing last checked 2026-09-18. How verification works

In use

Screenshots taken by this directory of the plugin running in a throwaway DeepSeek Harness on a generated demo project — not of your own machine, and not supplied by the author. Click any capture for the full-size version.

dsh-cost-meter — Installed and enabled, as the expanded row in Settings → Plugins → Plugin list: full package name, configuration state and runtime state.
Installed and enabled, as the expanded row in Settings → Plugins → Plugin list: full package name, configuration state and runtime state.
dsh-cost-meter — A real session that ran one short task on a generated demo project.
A real session that ran one short task on a generated demo project.

Captured by AllDSH on 2026-09-19 against DSH 0.1.5-rc.1 at a 1920×1080 viewport, package dsh-cost-meter@^1.7.29.

Install command

dsh plugin --profile web add dsh-cost-meter

Requires a running harness: start it withnpx @deepseek-ai/dsh webthen run the command above.New to this? See the installation guide.

What it does

dsh-cost-meter is a web-profile client plugin that meters what your Harness sessions actually cost. It wraps the host’s llm/stream path, writes a local ledger, and renders the numbers in the sidebar, session badge, composer dock and a Settings → Cost page — all bilingual (zh/en).

The surface is large for a “cost meter,” and several features people search for are adjacent rather than core:

Area What the README claims
Per-session cost Live amount + input/cache/output tokens under the composer or on the session title bar
Daily / history Today badge, per-day history (default retention 180 days), pre-install history import by replaying host session logs
Budget Limit + period (today / month / cumulative / custom range), progress box with ≥80% / ≥100% warnings — warnings only, never blocks calls
Official balance GET {baseURL}/user/balance against api.deepseek.com with the same API key as model traffic; only after you enable it
Peak/off-peak Official two-tier hours (UTC 01:00–04:00, 06:00–10:00 peak; weekends from 2026-08-23 all off-peak), period strips, pre-switch popup and optional system notification
Price catalog Built-in 90+ model catalog, model-id auto-matching, editable table, one-click parse of the official pricing page
Coding Plan quotas Separate per-vendor queries for Anthropic, Z.ai, MiniMax, Kimi, OpenRouter, SiliconFlow, CommandCode, SCNet, Volcano Ark (and related Go / Qwen paths)
Dual-track billing Plan-channel calls book as catalog-price equivalents; budget and “today” count pay-as-you-go money only (issue #64)

It is not a billing proxy and does not change which models run. Budget warnings never stop a call. Prices are estimates until you reconcile them against the official bill yourself — the README says so explicitly for minute-level lag, reasoning-token column mismatches, and USD/CNY FX.

How the meter works

Architecture claims from the README and package.json:

  • The host plugin registers a costUsage session projection from pure token buckets (per-model split). The browser reads that projection and prices it with the current table.
  • Global ledger, budget, balance and config go over Typert gateway RPC (remote.costMeter.*: getState, updateConfig, fetchPrices, refreshBalance, resetHistory).
  • Balance reuses the same API key as model requests, with an in-process cache expired per refreshMinutes.
  • cordis.patch.yml inserts a single cost-meter row into the web profile; package.json declares dsh.bundle.patch and dsh.client (platform: "web").
  • Runtime deps are Node builtins plus exact zod@4.5.1, with pure helpers from host-provided dsh-home-paths and dsh-credentials. The author states it never imports Cordis/dsh Service/Context classes, so it shares one host runtime.

Pricing math (README “Billing rules”): units are USD per 1M tokens; cost = cache-miss input × cache-miss + output × output + (cache read + cache write) × cache-hit, with cache writes billed at the hit price under the legacy official rule. Peak/off-peak tiers are anchored to each call’s initiation moment, not completion. The ledger stores USD; CNY display uses a configurable FX (default 1 USD = 7.2 CNY) unless you set pricing currency to the official CNY page and book directly on that table.

Plan dual-track: subscription-style channels are recorded as catalog-price equivalents only. Budget / today-cost / overview cards count the pay-as-you-go channel by default; a toggle can switch every amount to “total equivalent cost.” Classification is inferred from channel and config; mixed vendors can be overridden per provider:model.

Requirements and install

  • Node >=20 from engines. Client platform is web; os lists darwin / linux / win32.

  • Harness with a working dsh plugin command. Declared compatibility is dsh.compatibility.dsh: ">=0.1.0-rc.5", with a dshReleases map marking several later hosts compatible and 0.1.3-alpha.1 as unknown. Peer deps are only @deepseek-ai/dsh-credentials and @deepseek-ai/dsh-home-paths (host-supplied). Author host checks (v1.7.x doc) cover install/start/module-sharing on 0.1.2-rc.1, 0.1.3-alpha.2 and 0.1.5-alpha.1.

  • Install — README’s first path is the bare npm name (no special path, no install: field needed):

    dsh plugin --profile web add dsh-cost-meter

    Then restart dsh web. Alternatives: tag-pinned github:Han-1413141/dsh-cost-meter#v1.7.27, a GitHub tag tarball URL, a PowerShell irm … | iex script pinned to the release tag, and local link: for development. Review any remote install script before running it.

  • No install-time lifecycle scripts. package.json scripts are only build and test — no preinstall / install / postinstall / prepare. Runtime dependency is zod@4.5.1 exact; the two DeepSeek packages are peers. Published files ship lib/, cordis.patch.yml and docs/provider-pricing.json.

  • Restart required after install or upgrade (plugin rows, Typert manifest and client bundle are scanned at boot).

  • Source layout (master): host modules under lib/ (index.js, pricing.js, store.js, billing-stream.js, coding-plans.js, custom-balance.js, …), browser sources under src/client/, tests under test/, plus a large docs/ tree and SECURITY.md. A CLI bin dsh-cost-meter-repair-sessions is declared for session repair.

Network and data

Data lives locally. Ledger at $DSH_HOME/storages/cost-meter/ledger.json (atomic write, 2s debounce, up to ~200 session entries per day subject to historyDays). Delete the file or use Settings → clear history to reset. Settings autosave; uninstall keeps the ledger. First launch after install/upgrade can replay host session logs to import pre-install history (idempotent; re-runnable from Settings).

Credentials do not land in the ledger. Keys (official API key, Go key, coding-plan keys, Volcano AK/SK, custom-balance {{VAR}} placeholders) are resolved from the DSH credential store. README claims write-only inputs, no echo-back, blanking of secret-shaped headers before browser state, and a migration that imports older plaintext header secrets into the vault.

Outbound traffic is opt-in per provider. Disabled coding-plan endpoints are never contacted. Declared permission hosts include DeepSeek API/docs, Anthropic, Z.ai, MiniMax, Kimi/Moonshot, OpenRouter, SiliconFlow, CommandCode, Sugon SCNet, Qianwen/Aliyun, Volcengine Ark, and opencode.ai for Go quota. Official balance is hard-locked to api.deepseek.com; a non-official baseURL refuses balance lookup (model traffic is unaffected). Custom balance is user-configured HTTP(S): loopback may use http://, non-loopback requires HTTPS; redirects are refused; credential-bearing hosts need an allowedHosts match. Price sync fetches the official pricing HTML page.

No telemetry is documented. Nothing in the README, SECURITY.md or the published manifest describes outbound analytics. What is not verified: no third-party security scan or independent audit is on record for this listing (security: unverified). The project publishes its own August 2026 code audit and a CHANGELOG of high/medium fixes — that is author disclosure, not a trust rating. SECURITY.md is a private-reporting policy plus design notes, not an external attestation.

Known limits

  • Official-page price sync breaks if the pricing page is redesigned; manual table edit is the fallback.
  • Session-badge fallback estimate can mis-tier multi-hour sessions when ledger data is missing; exact figures come from the ledger.
  • Token Plan “per 1% / full-window” numbers are estimates from integer-percent vendors and local samples; other devices’ use of the same key is invisible to the ledger.
  • Plan vs API classification is inferred; mixed vendors can be overridden per provider:model.
  • Balance and quota APIs depend on those vendors’ uptime and response shapes (the OpenCode Go endpoint is community-documented).
  • Memory or other plugins that call external APIs without reporting usage to the host cannot be tracked.
  • Reconciling against the official bill: minute-level lag is expected; reasoning tokens are reported separately and are not billed by DeepSeek, so token columns will never match the official three-column layout — reconcile by amount.
  • Stars (303) and release cadence are not a substitute for an external security review. This listing is L3 (install command parsed, target declared) — not a smoke-tested install on this machine.

When to use it — and when not to

Use it if you run DeepSeek (or mixed catalog models through DSH) and want session-level cost, a hard budget visibility signal, peak-hour awareness, or Coding Plan quota in the sidebar without leaving the web UI. The dual-track ledger and multi-vendor quota strip are the main reasons to pick it over a thin “today total” widget.

Do not install it expecting spend enforcement, a cloud cost dashboard, or offline purity — every enabled balance/quota source is a live network call. If you only need a single number for today, this is far more surface area than that job requires. Prefer a lighter widget if you do not want another settings page and credential prompts.

FAQ

Does it block over-budget calls?

No. Budget and over-budget states are visual warnings only; the README states they never block calls.

Are my API keys written to disk?

The design says no: keys live in the DSH credential store; the ledger and browser state carry placeholders or blanks. That is the documented design and author-fixed audit items — not a substitute for scanning the published tarball yourself.

Which Coding Plan vendors does it query?

README and description list Anthropic Claude Pro/Max, Z.ai/GLM, MiniMax Token Plan, Kimi, OpenRouter, SiliconFlow, CommandCode, SCNet Token Plan and Volcano Ark (AK/SK signed). Volcano needs additional IAM permissions; SCNet may use an external console snapshot or a local estimate. Treat the vendor matrix as product surface, not a guarantee each adapter tracks every vendor UI change.

Will price sync match my official bill exactly?

Not automatically. Currency choice (USD vs CNY page), FX for USD display, minute-level debounce lag, and un-billed reasoning token columns all create small drift. Reconcile by amount, not by token column, per the README’s billing rules.

Does it need an API key just to show local session cost?

Live metering of DSH llm/stream usage is local and does not require calling DeepSeek’s balance API. Official balance display, Coding Plan quota cards and custom balance bars each need their own credentials and only fire after you enable that source. Local ledger math works without network once the table has prices (built-in catalog plus optional official sync).

Sources & references

The technical claims on this page rest on the primary documents below. Each link is followed so it can be checked directly.

  1. [1]Han-1413141/dsh-cost-meter — GitHubThe plugin’s own repository and README — the primary document every claim in this listing is checked against.
  2. [2]dsh-cost-meter on npm — npmThe published package the install command on this page resolves.
  3. [3]deepseek-ai/deepseek-harness — GitHubUpstream repository for DeepSeek Harness, the Cordis runtime and the plugin loading model.
  4. [4]@deepseek-ai/dsh on npm — npmPublished harness package, including the release tags our dshTarget field tracks.
  5. [5]dsh-plugin GitHub topic — GitHubThe discovery mechanism used to find plugins listed in this directory.

All links last verified 2026-09-11

Questions about this listing

Is dsh-cost-meter safe to install?
dsh-cost-meter holds verification level L3 of 5 — Install command parsed, DSH target declared — and its security status is unverified — no scan has run. A verification level records how far the install path was exercised; it is not a safety guarantee. Safety depends on what the plugin can actually reach, so read its source and install script and check its file, shell, network and credential access before you run it.
Which DeepSeek Harness version does dsh-cost-meter target?
dsh-cost-meter declares dshTarget >=0.1.0-rc.5, the DeepSeek Harness release this listing was checked against. dshTarget is the compatibility target the plugin author declares: it records that a release was checked, not that the plugin keeps working after upstream ships something new. Test in an isolated profile before upgrading your harness.
How do I install dsh-cost-meter?
Start the harness with npx @deepseek-ai/dsh web, then copy the install command shown at the top of this page. That command is generated from the package name the repository publishes — or from an install spec the listing declares — so it cannot drift from what the repository actually ships. This listing was last checked on 2026-09-18.
Does it block over-budget calls?
No. Budget and over-budget states are visual warnings only; the README states they never block calls.
Are my API keys written to disk?
The design says no: keys live in the DSH credential store; the ledger and browser state carry placeholders or blanks. That is the documented design and author-fixed audit items — not a substitute for scanning the published tarball yourself.
Which Coding Plan vendors does it query?
README and description list Anthropic Claude Pro/Max, Z.ai/GLM, MiniMax Token Plan, Kimi, OpenRouter, SiliconFlow, CommandCode, SCNet Token Plan and Volcano Ark (AK/SK signed). Volcano needs additional IAM permissions; SCNet may use an external console snapshot or a local estimate. Treat the vendor matrix as product surface, not a guarantee each adapter tracks every vendor UI change.
Will price sync match my official bill exactly?
Not automatically. Currency choice (USD vs CNY page), FX for USD display, minute-level debounce lag, and un-billed reasoning token columns all create small drift. Reconcile by amount, not by token column, per the README’s billing rules.
Does it need an API key just to show local session cost?
Live metering of DSH llm/stream usage is local and does not require calling DeepSeek’s balance API. Official balance display, Coding Plan quota cards and custom balance bars each need their own credentials and only fire after you enable that source. Local ledger math works without network once the table has prices (built-in catalog plus optional official sync).

Similar DSH plugins

Browse all

Renders local Wallpaper Engine wallpapers behind the DSH web UI, with an iOS-style liquid-glass settings window.

L3
301 JavaScript

dsh-ios

ZSeven-W

A live iOS Simulator — and a USB-connected iPhone — inside the conversation: 22 agent tools, a tappable MJPEG panel, accessibility and OCR taps, and SwiftUI preview hot reload.

L3
295 TypeScript

dsh-image-gen

shanliuling

An image studio for DSH: chat generate and edit, a tldraw canvas, batch Studio, multi-model compare, a 500+ prompt library, a gallery and local ComfyUI — BYOK or subscription login.

L2
437 TypeScript

Spreadsheets, documents, slides, canvases and Base tables as local .univer files, edited in draft worktrees you approve or discard.

L3
362 TypeScript

Lets the model render interactive HTML fragments as sandboxed iframe cards inside DSH Web conversations.

L2
262 TypeScript

Text-to-image, image-to-image and a node-graph canvas in the DSH Web GUI, using the image provider channels you configure.

L2
78 TypeScript
ESC

Type to search the index. Built at deploy time by Pagefind.