NeutronStar714/dsh-budget-watcher ↗★ 0
dsh-budget-watcher
DeepSeek Harness plugin: a small floating window over the conversation showing the balance left on your API account, and what recent turns actually cost. 适合需要实时监控DeepSeek API账户余额和对话Token成本的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NeutronStar714/dsh-budget-watcherConfiguration
Edit your profile's cordis.patch.yml, keeping the comments and replacing [] if the file is still empty:
- id: budget-watcher
config:
provider: deepseek
apiKeyEnv: DEEPSEEK_API_KEY
refreshIntervalMs: 60000
currency: auto
A patch replaces the row's whole config object, so keep every override together. All fields are optional.
| Option | Default | Purpose |
|---|---|---|
provider | deepseek | Which API account to read. Only deepseek is implemented; see Known limitations. |
apiKey | (empty) | An explicit key. Prefer apiKeyEnv: a key written here lives in your profile file. |
apiKeyEnv | DEEPSEEK_API_KEY | Credential reference resolved through ctx.credentials. |
endpoint | (the provider's) | Override the balance endpoint. Intended for testing against a stand-in server. |
refreshIntervalMs | 60000 | How long the host reuses one balance answer before calling DeepSeek again. Minimum 15000. This paces the upstream API call, not the panel — see Known limitations. |
requestTimeoutMs | 10000 | Deadline for one balance request. |
currency | auto | Which currency the cost figures and both thresholds are shown in. auto follows the featured balance wallet; CNY or USD force it. A closed set, because DeepSeek publishes rates in exactly those two currencies. |
allowNonLoopback | false | Allow the widget to read balance when the GUI is served on a non-loopback address. |
costEnabled | true | Estimate what recent turns cost from the usage the provider already reports. Spends nothing. |
graphEnabled | true | Draw the live-burn chart in the panel. Turning it off leaves every figure in place. |
burnWindowMs | 15000 | Window for the live burn rate, in milliseconds (minimum 5000). Short on purpose: this is the figure that catches a sudden loss. |
burnWarnPerHour | 2 | Per-hour spend above which the panel turns amber, in the balance's currency. 0 disables the warning. |
terminateAbovePerHour | 0 | Per-hour spend above which the running turn is interrupted, in the balance's currency. 0 — the default — disables it. |
There is no exchange-rate setting, because there is no exchange rate: costs are priced from DeepSeek's published CNY or USD rate card, matching whichever currency the featured balance is held in. See Where the numbers come from.
To disable the plugin without uninstalling it:
- id: budget-watcher
disabled: true