DeepSeek Harness plugin

dsh-gateway-billing

Per-conversation LLM billing display for the DSH web composer, for anyone self-hosting a New API / One API-compatible gateway.

Jump to install

Source facts

Repository
LeslieWylie/dsh-gateway-billing
Latest update
Aug 17, 2026
Category
Tools & Capabilities
GitHub stars
0
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/LeslieWylie/dsh-gateway-billing
Plugin: dsh-gateway-billing
Author: LeslieWylie

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer4 files
README.en.mdSource · read only
README language

dsh-gateway-billing · Per-Conversation Model Billing Display

简体中文

What is this

A per-conversation model billing display skill. Generalized from an internal gateway-billing dashboard, it shows the running cost of the current conversation's model calls right below the DSH Web composer — for anyone self-hosting an LLM gateway that exposes a New API / One API-compatible /pricing endpoint.

Core Capabilities

ModuleContent
Pricing fetchFetches a New API / One API-format price table from your configured gateway URL, auto-refreshing every 10 minutes
Dual billing modesSupports both token-based pricing (quota_type=0) and fixed per-call pricing (quota_type=1)
Per-conversation foldingWalks every model-call node in the current conversation and folds usage (input/output/cache tokens) against the price table
Composer dock displayOne-line entry: 💰 total cost · most recent model×calls · input/output/cache tokens; multi-model conversations expand to per-model rows
Distinct not-configured / failed statesAn unconfigured pricing URL and a failed fetch (network error, etc.) render different messages; the former has no "click to retry" — retrying can't fix a missing config
Unpriced-model surfacingA model call with no matching price-table entry is counted and highlighted separately, never silently treated as $0

Install

Via profile (recommended)

# 1. Clone the repo
git clone https://github.com/LeslieWylie/dsh-gateway-billing.git ~/Desktop/01-Projects/dsh-gateway-billing

# 2. Add to your profile
cd ~/.dsh/profiles/<your-profile>

# Edit package.json: add to dependencies:
# "dsh-gateway-billing": "link:~/Desktop/01-Projects/dsh-gateway-billing"

# 3. Edit cordis.patch.yml, add an entry pointing at your own gateway's pricing endpoint:
# - id: gateway-billing
#   name: 'dsh-gateway-billing'
#   config:
#     pricingUrl: 'https://your-gateway.example.com/api/pricing'

# 4. Install
pnpm install

# 5. Restart dsh

Via dsh plugin add (once published to npm)

dsh plugin add dsh-gateway-billing

Required Configuration

This skill requires a config block on its own gateway-billing entry in your profile's cordis.patch.yml:

ConfigDescriptionExample
pricingUrlYour gateway's pricing endpoint. Must return New API / One API-format {data: [{model_name, quota_type, model_ratio, completion_ratio, model_price}, ...]}https://your-gateway.example.com/api/pricing

Without pricingUrl set, the composer dock clearly shows "not configured" — it never errors out or displays a misleading cost figure.

Design Principles

  • Gateway-agnostic: no gateway URL is baked in; the price table source is entirely user-configured
  • Failure is visible: a failed fetch and a missing config are distinct states with distinct messages — neither is swallowed silently
  • Fetch once, read many: the price table refreshes and caches server-side every 10 minutes; the composer dock reads a snapshot over RPC rather than re-fetching per conversation

Sanitization Notice

This plugin was generalized from an internal gateway-billing dashboard. The original implementation hardcoded its pricing endpoint in source and had no "not configured" state — sanitization turned the endpoint into a required config.pricingUrl and added the distinct not-configured/failed rendering. All internal institution names and internal gateway domains have been removed.

Changelog

See [CHANGELOG.md](CHANGELOG.md).

License

MIT