Ta9y/dsh-token-monitor ↗★ 1

dsh-token-monitor

悬浮监控账户余额、Token消耗与估算成本 适合按DeepSeek官方API峰谷费率估算会话成本,并定期查询余额的用户。

套件
dsh-token-monitor
相容性
待驗證
版本
1.0.0
授權
MIT
最近更新
2026年10月17日

同名套件的其他儲存庫

安裝

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Ta9y/dsh-token-monitor

配置

config.json(插件目录下,改完刷新页面生效,不用重启):

{
  "pollSeconds": 10,        // 页面轮询间隔(秒)
  "balanceSeconds": 60,     // 余额查询间隔(秒)
  "autoPrices": true,       // true = 每月从官网抓价;false = 只用手写的 prices
  "searchPer1000": 5,       // Search 单价(元/千次)
  "fetchPer1000": 5,        // Fetch 单价(元/千次)
  "searchBillingFrom": "2026-11-01",
  "prices": {               // 元 / 百万 token,按模型 + 时段
    "deepseek-flash": {
      "offpeak": { "cacheHit": 0.02, "cacheMiss": 1, "output": 4 },
      "peak":    { "cacheHit": 0.04, "cacheMiss": 2, "output": 8 }
    },
    "deepseek-v4-pro": {
      "offpeak": { "cacheHit": 0.15, "cacheMiss": 4.5, "output": 13.5 },
      "peak":    { "cacheHit": 0.3,  "cacheMiss": 9,   "output": 27 }
    }
  }
}