Development & Runtime

dsh-deepseek-usage

ben7am1n/dsh-deepseek-usage · ★ 0

ben7am1n

DeepSeek balance and token usage tools for DeepSeek Harness

License
MIT
Added
2026-08-23
Maintenance
active
Install kind
github
npm
dsh-deepseek-usage

No manifest check is available; listing does not imply compatibility or security review.

安装

dsh plugin --profile web add github:ben7am1n/dsh-deepseek-usage

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

For install and environment setup, plus plugin development tutorials, see DSH community docs ↗

README

Source README · body: en · Read Chinese README

Table of contents
  1. Install
  2. Tools
  3. deepseek_balance
  4. usage_summary
  5. Configuration
  6. License

DeepSeek usage monitor for DeepSeek Harness: account balance query and live token usage summary as model-callable tools.

Install

dsh plugin --profile <name> add dsh-deepseek-usage

Requires a DeepSeek API key available as DEEPSEEK_API_KEY (env or credential).

Tools

deepseek_balance

Queries GET https://api.deepseek.com/user/balance and returns availability and per-currency balances (total / granted / topped-up). When lowBalanceThreshold is configured, appends a warning when the primary currency balance drops below it.

usage_summary

Aggregates per-session token usage from the harness token meter across live sessions, sorted by total tokens descending. Use it to estimate context usage and spot runaway sessions.

Configuration

Field Default Meaning
apiKeyEnv DEEPSEEK_API_KEY Env var or credential reference for the API key
baseURL https://api.deepseek.com DeepSeek API base URL
lowBalanceThreshold — Optional low-balance warning threshold
# profile cordis.patch.yml
- id: deepseek-usage
  config:
    apiKeyEnv: DEEPSEEK_API_KEY
    lowBalanceThreshold: 20

License

MIT