igormel81/dsh-chat-cost

Prices every chat, its subagents and the whole session tree from a bundled seven-provider catalog, with per-answer cost badges and an append-only JSONL cost log written into your project folder.

The catalog covers seven providers and 139 models with peak and off-peak tiers plus cache read and cache write rules, and pricing runs on the host half that walks the session tree, prices every session per interval and appends a JSONL log. The composer shows one line under the harness stats and every finished answer gets a badge for its own spend rather than a share of the session total. Six budget tools (cost_price, cost_history, cost_estimate, cost_plan, cost_mark, cost_scenarios) let the agent ask what something will cost before doing it. The limitations section is unusually honest: a web-search call runs its searches server-side inside one request and those page reads are billed outside the session's token usage, so the readout counts and names those calls without pretending to price them; a host killed mid-turn is priced from the newest checkpoint, a log record carries basis 'durable' when it is a catch-up, and inherited routes are marked modelSource 'inherited'.

Usage & Billing ★ 1
View on GitHub ↗

Install

dsh plugin --profile web add dsh-chat-cost

The npm line from the README; dsh-chat-cost@0.6.11 resolves its registry repository to this repo. The README also documents link:$PWD for local development.

Compatibility

Needs a DSH profile (the package is a bundle whose dsh.bundle.patch points at cordis.patch.yml), Node >= 20 for ESM and AbortSignal.timeout, and the loader contract apply(ctx, config) — settings arrive as the second argument and reading them from ctx throws in this Cordis. The composer readout needs the conversation.composer.dock slot and the per-answer badges need conversation.chat.turnTail; without them the host half still prices, logs and answers its route.

Details

Alternatives

gmen1057/dsh-arckep · nielskrikke/dsh-cost-widget · Sttrevens/dsh-cost-meter

More plugins in Usage & Billing

Browse more in Usage & Billing

Guides for Usage & Billing plugins