dsh-deepseek-usage
开发工具 活跃维护

dsh-deepseek-usage

ben7am1n/dsh-deepseek-usage

轻量级DeepSeek用量查询工具,支持实时查看账户余额、Token消耗明细,无需复杂配置,部署后即可快速获取DeepSeek API相关服务的资源使用数据,操作简单高效,方便用户实时把控使用成本。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
12 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:ben7am1n/dsh-deepseek-usage
git clone https://github.com/ben7am1n/dsh-deepseek-usage.git
git clone git@github.com:ben7am1n/dsh-deepseek-usage.git
README.md main

dsh-deepseek-usage

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