dsh-gateway-billing
Run the following command in DeepSeek Harness:
dsh plugin install LeslieWylie/dsh-gateway-billing
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install LeslieWylie/dsh-gateway-billing in DeepSeek Harness to install this plugin; the source code is available at https://github.com/LeslieWylie/dsh-gateway-billing
About this plugin
Self-hosted LLM gateways often route a single conversation through multiple models, yet figuring out the actual cost used to mean digging through logs or writing throwaway scripts. dsh-gateway-billing brings that number right under the DSH composer: configure one pricingUrl in your profile and you get a live, per-conversation breakdown of total cost, the models and call counts involved, and the input / output / cache token split. Multi-model conversations expand into separate lines automatically.
The plugin fetches a New API / One API-format price list from the gateway you configure, caches it server-side with a 10-minute refresh cycle, and serves snapshots to the dock via RPC so no conversation triggers a redundant fetch. Both token-based pricing (quota_type=0) and flat-rate pricing (quota_type=1) are supported. Model entries missing from the price list are called out with a visible counter instead of being silently zeroed out. Unconfigured and fetch-failed are treated as two distinct states, each with its own clear message, so nothing is swallowed.
Ideal for developers or teams running a self-hosted LLM gateway that exposes a New API / One API-compatible /pricing endpoint and want cost visibility without coupling to any specific vendor. The plugin hard-codes no gateway address, leaves the pricing source entirely in your hands, and ships under the MIT license.
Use Cases
- Check the total cost and token breakdown of a multi-model conversation in real time
- Auto-fetch the price list from a New API / One API compatible gateway and compute per-conversation cost
- Distinguish unconfigured, fetch-failed, and unpriced-model states with clear messaging
Best For
- Developers or teams running a self-hosted LLM gateway who want per-conversation cost visibility
- LLM platform operators using a New API / One API compatible pricing endpoint
- Engineers who need to track model call costs directly in the DSH composer without digging through logs
Related Plugins
A service-oriented sidebar framework for DSH, offering a full workbench with file explorer, embedded browser, real terminal, Git panel, and extensible plugin services.
A beautiful, practical Claude Code-style TUI plugin with pixel whale top bar, flowing glow title, real-time status line, streaming thought expansion, time rewind, context progress bar and TPS gauge — zero core changes.
The plugin market for DeepSeek Harness: browse/search/one-click install community plugins and themes, with updates, backup/restore, hot disable, diagnostics, and AI fix.
A persistent whale widget on the DSH web UI that shows DeepSeek balance, today's usage, and per-turn cost, with drag-and-snap and sound effects.