dsh plugins中文
← Back to popular plugin directory

RMB/USD Token Billing Plugin

bpc-oss/dsh-web-billing · skills

RMB/USD token billing plugin for DeepSeek Harness (dsh web): Official policy automatic pricing, including peak/off-peak hours, per-message ledger, account balance, region-driven currency display.

★ 6GitHub stars
0Forks
2026-08-15Last updated
JavaScriptLanguage
MITLicense

Project overview

lib/pricing.js 内置官方价格时间表(OFFICIALPRICINGPOLICIES),每条政策有 生效时刻(since)与单价表: 生效时刻(北京) · 政策 · 模型单价(¥/1M,缓存命中 / 未命中 / 输出) 生效时刻(北京): 2025-02-09 · 政策: deepseek-chat / deepseek-reasoner 标准价 · 模型单价(¥/1M,缓存命中 / 未命中 / 输出): 0.5/2/8 · 1/4/16 生效时刻(北京): 2026-05-22 · 政策: V4 系列 75% 降价转永久 · 模型单价(¥/1M,缓存命中 / 未命中 / 输出): v4-flash 0.02/1/2 · v4-pro 0.025/3/6 生效时刻(北京): 2026-08-17 · 政策: 峰谷定价(高峰 09:00-12:00 / 14:00-18:00 北京时间,空闲半价) · 模型单价(¥/1M,缓存命中 / 未命中 / 输出): 见下表

峰谷价格(¥/1M): 模型 · 空闲(缓存命中 / 未命中 / 输出) · 高峰(缓存命中 / 未命中 / 输出) 模型: deepseek-v4-flash · 空闲(缓存命中 / 未命中 / 输出): 0.05 / 1.5 / 4.5 · 高峰(缓存命中 / 未命中 / 输出): 0.10 / 3.0 / 9.0 模型: deepseek-v4-pro · 空闲(缓存命中 / 未命中 / 输出): 0.15 / 4.5 / 13.5 · 高峰(缓存命中 / 未命中 / 输出): 0.30 / 9.0 / 27.0

单价字段语义:input=缓存未命中输入,cacheRead=缓存命中输入,output=输出 (¥ / 百万 tokens)。 记账正确性 幂等:以 (sessionId, messageId) 为主键,重复/重放事件只覆盖明细,绝不 重复累计(多进程、多次重启实测验证)。 按本地时区统计「今日 / 本月」。 落盘:1s 防抖 + 临时文件原子替换;加载失败从空账本开始并告警;进程退出 时补一次 flush。 审计字段:每条消息明细记录应用的单价(unitPrice)与计价模式(mode: flat / peak / offPeak)。 余额只读:余额查询只调用官方只读接口,不写任何数据;key 只存在于服务端 解析链路,不下发浏览器。 开发

Install command

dsh plugin --profile web add github:bpc-oss/dsh-web-billing
View GitHub repository ↗Back to popular plugin directory