NeutronStar714/dsh-budget-watcher ↗★ 0

dsh-budget-watcher

在对话界面悬浮显示API余额与单次花费 适合需要实时监控DeepSeek API账户余额和对话Token成本的用户。

套件
dsh-budget-watcher
相容性
待驗證
版本
0.6.3
授權
MIT
最近更新
2026年10月4日

安裝

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

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