Sttrevens/dsh-cost-meter

Per-turn USD cost badge in the Web UI: session total in the header and per-turn cost in each message footer, with a hover breakdown.

A live USD cost badge for the open conversation in the dsh Web UI: the badge sits in the assistant-message action row showing that turn's cost; hovering opens a tooltip with per-bucket breakdown (input / output / cache-read / cache-write) plus the session total. The host half registers a sessionCost projection on the session-projection seam, tracking provider/model from request/header events and accumulating provider-reported usage buckets (reusing token-meter's replace-same-(turn,step) rule to avoid double-counting). Ships a default pricing table (deepseek-v4-pro/flash) keyed per million tokens; editable JSON.

Usage & Billing ★ 3 updated 2026-08-17
View on GitHub ↗

Install

dsh plugin --profile web add @steven-wu/dsh-cost-meter

dsh plugin --profile web add @steven-wu/dsh-cost-meter (npm 0.1.0-rc.3 verified on registry), then restart the web profile and refresh the page. The dsh.bundle manifest auto-adds the profile bundle layer — no manual patch edit. Local checkout: dsh plugin --profile web add file:/path/to/dsh-cost-meter. Purely-cordis mounting (cordis.patch.yml insert row) also works.

Compatibility

dsh web profile; dual-face dsh.client package. Pricing from ~/.dsh/cost-pricing.json (DSH_COST_PRICING env or config.pricingPath override); unknown models fall back to the default row.

Details

Recent updates

per-turn USD cost badge; hover tooltip with bucket breakdown + session total; editable JSON pricing table.

FAQ

Where does the badge appear?
In the action row at the end of each assistant message; hovering shows per-bucket breakdown and session total.
How do I change prices?
Edit ~/.dsh/cost-pricing.json (or the DSH_COST_PRICING path) and restart dsh web; models without entries fall back to default.
Which cost buckets are tracked?
Uncached input, output, cache-read, and cache-write from provider-reported usage.

Alternatives

Han-1413141/dsh-cost-meter · LemCAE/dsh-balance · YYTbit/dsh-plugin-cost-tracker

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins