AI Agent Hub
Back to plugins
🖥️

dsh-gateway-billing

Client Updated 2026.08.25

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