FengHuoLinShan/dsh-plugin-llm-balance
FengHuoLinShan★ 2JavaScriptLast synced: 2026-08-15
DSH 插件:可拖动的 API 余额/配额悬浮卡片(DeepSeek / Moonshot / Kimi For Coding 自动发现、分档变色、实时刷新)| Draggable API balance/quota card for DeepSeek Harness
README excerpt
dsh-plugin-llm-balance 🏷️ DSH 官方插件生态 收录项目(git tag: dsh-official-plugin ;GitHub topics: dsh-plugin · deepseek-harness )。 English 中文 DSH(DeepSeek Harness)通用插件:在 Web GUI 页面右上角显示一个 可拖动的极简圆角卡片 (DeepSeek 网页端风格), 常态化显示最近使用的 ≤3 个 provider 的余额/配额——最近用过的 deepseek 与 kimi-coding 会同时显示,不足 3 个不硬凑: - 最近 3 个常态化显示 :仅统计插件启用后成功完成的模型调用,从 sessions.list 的持久化投影聚合最近 3 个不同 provider;不扫描旧历史、不调用 session.models 、不恢复冷会话。 - 余额型 (DeepSeek / Moonshot 平台)按金额分档变色: 颜色 余额 含义 🟢 绿 = 100 余额充足 🟡 黄 20 99 余额一般 🔴 红 1 19 余额偏低 ⚪ 灰 = 50%,黄 20 50%,红 5 20%,灰 个性化配置(如轮询间隔)在 /.dsh/profiles/web/cordis.patch.yml 中按行 id 覆盖: 覆盖时需完整重述该行需要的全部 config 键(patch 按行整体替换 config,不做深合并)。 配置(cordis.patch.yml 中该行的 config) 字段 默认值 说明 refreshMs 60000 前端轮询间隔(毫秒) timeoutMs 15000 服务端查询超时(毫秒) provider deepseek (兼容层)单 provider 模式;多 provider 模式无需设置,自动发现 apiKeyEnv DEEPSEEK API KEY (兼容层)单 provider 模式的凭证引用名 baseURL 按 provider 默认 (兼容层)单 provider 模式的可选 base URL 覆盖 多 provider 模式开箱即用:provider 清单自动来自内置表 + llm-pi-ai settings,key 从 DSH credentials 解析( llm-pi-ai 路由的 apiKeyEnv ,或内置默认 DEEPSEEK API KEY / MOONSHOT API KEY / KIMI CODING API KEY )。 旧的单 provider 写法( provider + apiKeyEnv )完全兼容:顶层响应字段仍按 config.provider 条目返回。 所有字段均为宽松校验: refreshMs / timeoutMs 非数字或非正数、 provid…
View full README on GitHub →