Ronniealgo/dsh-route-balance ↗★ 2

dsh-route-balance

在侧边栏展示API路由余额与ChatGPT/Codex额度。 适合需要通过本地认证路由统一监控多渠道API余额和使用额度的用户。

包名
dsh-route-balance
兼容性
待验证
Cordis 依赖范围
~4.0.4
版本
0.6.2
许可证
MIT
最近更新
2026年10月10日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Ronniealgo/dsh-route-balance

配置

- insert:
    - id: route-balance
      name: "dsh-route-balance"
      config:
        slot: sidebar.footer.action
        refreshMs: 300000
        requestTimeoutMs: 15000
        cacheMs: 10000
        codex:
          strategy: auto
          warmMs: 240000
          timeoutMs: 20000
          snapshotPath: null
配置含义
slot默认侧边栏底部;也可选 DSH 已声明的其它槽位
refreshMs页面轮询间隔,默认 5 分钟,最小 1 分钟
requestTimeoutMs每条供应商读取总时限,默认 15 秒
cacheMshost 余额短缓存,默认 10 秒;并发请求共用一次读取
codex.strategyauto 后台读取;snapshot 只读手工快照;off 隐藏且不读
codex.warmMs额度后台读取间隔,默认 4 分钟,最小 30 秒
codex.timeoutMs一次额度读取的总候选时限,默认 20 秒
codex.snapshotPath可指定快照;默认按 CODEX_HOME 或用户 Codex home 查找

网页接口固定为 /api/dsh-route-balance/balances,不再支持自定义 path。点击刷新只重新请求页面数据,可能仍使用短缓存;额度不会因为点击额外启动进程。