echo804/dsh-billing-balance
Adds an API balance readout and a per-session cost estimate to the composer stats line — the row under the input box that already shows cache-hit rate and tokens. The balance comes from GET {baseURL}/user/balance and is shown in the account's currency with click-to-refresh; the session figure sums the tokenUsage projection (uncached, cache-read, cache-write, output) against DeepSeek's official V4-Flash peak and off-peak CNY pricing and is explicitly labelled an estimate rather than billing authority. During DeepSeek's peak windows it appends a bold peak-window badge and prices at the peak rate, and off-peak it shows no badge and prices at the off-peak rate.
Install
cp -R plugin "$HOME/.dsh/profiles/node_modules/dsh-billing-balance"
# then append to ~/.dsh/profiles/web/cordis.patch.yml:
# - insert:
# - id: billing-balance
# name: 'dsh-billing-balance'
# and restart the dsh web processREADME Installation steps quoted verbatim: step 1 copies the repo's plugin/ directory into the profile's hoisted node_modules (the README gives the PowerShell equivalent and a pnpm --dir "$HOME/.dsh/profiles" add ./path/to/plugin link form), step 2 appends the loader entry to the profile's cordis.patch.yml, and the README warns to restart the dsh web process because profile configuration is read at startup. Optional baseURL and CNY-per-1M-token price overrides are documented in the same block. Registry check 2026-09-17: no dsh-billing-balance npm package was claimed by the README and none resolved.
Compatibility
README: requires a DeepSeek Harness web profile (the browser GUI); the plugin is static, so it must be resolvable as a package from the profile and appear as a loader entry, and the web process must be restarted after installation. It reads DEEPSEEK_API_KEY at request time through the harness credentials seam and calls GET {baseURL}/user/balance.
Details
- Repo: echo804/dsh-billing-balance
- Category: Other
- Stars: 0
- Version: Manual profile install (no registry version asserted; repo 0★, MIT, last push 2026-08-16)
- Last push: 2026-08-16
- First seen: 2026-08-14
Recent updates
The README documents the two halves, the pricing behaviour and the installation steps rather than a release-by-release table.
FAQ
- How do I install it?
- The README's steps are to copy the repo's plugin/ directory into the profile's node_modules (or link it with pnpm), append the insert row for dsh-billing-balance to the profile's cordis.patch.yml, and restart the dsh web process.
- Is the session cost exact?
- No — the README labels it an estimate: it sums the tokenUsage projection against DeepSeek's official V4-Flash peak/off-peak pricing, and calls itself an estimate rather than billing authority.
- Does it work with a gateway?
- Yes — the README documents a custom baseURL config option for gateway or proxy deployments, plus optional price overrides in CNY per 1M tokens.