moesnow/dsh-session-billing ↗★ 0
dsh-session-billing
Per-session LLM cost meter for the DeepSeek Harness Web UI: folds provider usage into uncached input / cache read / cache write / output per model and prices it against DeepSeek and Xiaomi MiMo pay-as-you-go rates (DeepSeek peak-idle tiering included). 适合需要精确监控和审计大模型API消耗成本的用户。支持DeepSeek和小米米摩计费标准。
インストール
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:moesnow/dsh-session-billingドキュメント
README 全文を読む ↗🗂 配置与维护
价目表与模型说明集中在 models.config.js,每条模型长这样:
{
id: 'deepseek-v4-pro',
label: 'DeepSeek V4 Pro',
match: { route: ['deepseek', 'v4-pro'], model: ['pro'], exclude: ['flash'] },
tiered: true,
peak: { hit: 0.30, miss: 9.0, write: 9.0, out: 27.0 },
idle: { hit: 0.15, miss: 4.5, write: 4.5, out: 13.5 },
note: { en: '…', zh: '…' },
}
| 想做什么 | 改哪里 | 生效方式 |
|---|---|---|
| 新增模型 / 调价 / 改模型说明 | models.config.js 的 MODELS | 重启 Harness |
| 更新节假日日历 | models.config.js 的 HOLIDAYS(或插件配置 config.holidays 追加) | 重启 Harness |
| 改界面文案 | client.js 的 DICT.en / DICT.zh(两份字典键需同步) | 刷新页面 |
- 匹配规则
match全部为小写包含匹配,按MODELS顺序首命中即用:route(provider 或 model 命中其一)、model(必须全部包含)、exclude(不得包含)。 - 计价回归验证:
node docs/verify-host.mjs。架构与折叠语义细节见index.js/client.js头部注释。