dsh-token-rush
DSH Web GUI 会话悬浮仪表插件,实时估算 token 消耗、费用和 API 余额,并在 DeepSeek 高峰时段自动变色提示。
AI 分析
核心用途是实时监控会话开销与高峰时段。适合需要紧密监控 API 余额、避免在高峰期高价时段无意消耗大量 token 的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:mikijiyun/dsh-token-rush说明文档
阅读完整 README ↗从本目录安装(开发 / 本地使用)
dsh plugin --profile web add link:E:\万物暂存\AI缓存工作区\dsh-token-rush
重启 dsh web 进程(仅刷新页面不生效),左侧上方即出现悬浮窗。验证挂载:
dsh --profile web --dump-config | Select-String token-rush # 应看到 - id: token-rush
配置(环境变量,读取于 dsh web 启动环境)
| 变量 | 说明 | 默认 |
|---|---|---|
DSH_HUD_PEAK_WINDOWS | 高峰时间段,如 "9-12,14-18"、"8-10 20-23"(半开区间 [start, end)) | 9-12,14-18 |
DSH_HUD_PEAK_TZ | 高峰判断时区(IANA 名称) | Asia/Shanghai |
DEEPSEEK_BASE_URL | DeepSeek API 地址覆盖(同官方 llm-deepseek 约定) | https://api.deepseek.com |
余额查询复用「设置 → 模型」中 DeepSeek 提供商的 apiKeyEnv(默认 DEEPSEEK_API_KEY)/baseURL 配置;未配置 Key 时余额行显示「未配置 Key」。