dsh-cost-meter
Append an estimated token cost (cache hit / cache miss / output, per 1M tokens, ¥ or $) to the chat stats line in the DeepSeek Harness Web GUI
AI Analysis
核心用途是根据自定义价格表,实时估算并展示每轮对话的实际花费。适合需要精细化控制 API 预算和评估成本的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Creakono/dsh-cost-meterREADME
Read the full README ↗使用
安装并重启服务端后:
- 打开 设置 → 预估花费价格表,修改币种、默认价格或按模型价格;
- 点击 保存;当前及之后打开的会话会按新价格估算花费;
- 点击 恢复默认 可清空用户配置,回到上表的出厂价格。
无可用用量、或价格表尚未加载时,花费行自动隐藏,不占用布局。
配置结构
$DSH_HOME/settings.yaml 中的用户配置结构:
dsh-cost-meter:
currency: CNY # CNY 或 USD
default: # 未匹配模型的兜底价格
cacheHitPrice: 0.025
cacheMissPrice: 3
outputPrice: 6
models: # 按模型覆盖
deepseek-v4-flash:
cacheHitPrice: 0.02
cacheMissPrice: 1
outputPrice: 2
schema 默认值只在用户未写入 models 时生效,因此把 models 清空后保存即可真正移除全部模型条目。