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成本的用户。

パッケージ
dsh-budget-watcher
互換性
未検証
バージョン
0.6.3
ライセンス
MIT
最終更新
2026/10/04

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:NeutronStar714/dsh-budget-watcher

ドキュメント

README 全文を読む ↗

Configuration

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.

OptionDefaultPurpose
providerdeepseekWhich 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.
apiKeyEnvDEEPSEEK_API_KEYCredential reference resolved through ctx.credentials.
endpoint(the provider's)Override the balance endpoint. Intended for testing against a stand-in server.
refreshIntervalMs60000How 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.
requestTimeoutMs10000Deadline for one balance request.
currencyautoWhich 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.
allowNonLoopbackfalseAllow the widget to read balance when the GUI is served on a non-loopback address.
costEnabledtrueEstimate what recent turns cost from the usage the provider already reports. Spends nothing.
graphEnabledtrueDraw the live-burn chart in the panel. Turning it off leaves every figure in place.
burnWindowMs15000Window for the live burn rate, in milliseconds (minimum 5000). Short on purpose: this is the figure that catches a sudden loss.
burnWarnPerHour2Per-hour spend above which the panel turns amber, in the balance's currency. 0 disables the warning.
terminateAbovePerHour0Per-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