DSH Wiki DSH Wiki
首页 / DSH 插件 / token-anxiety

token-anxiety

成本焦虑,当场缓解。

实时算钱,Explain 命令解释每一笔 token 去向,价格表可一条 curl 同步。
0 star v0.1 成本 / 计费 GitHub

安装

DeepSeek Harness 的 web profile;Node.js 22+。已知限制(README 自述):只统计根会话任务,subagent 会话不出现在 widget(projection fold 按会话同步折叠);Explain 是 host 直连路由不是 agent 轮次,分析结果不进会话日志、页面刷新即失;内置价格表是“嵌入且会过期的”,需手动同步。
dsh 插件:装进 profile 后重启 dsh web 才生效。
从 npm
dsh plugin --profile web add dsh-token-anxiety
本地检出
dsh plugin --profile web add /path/to/dsh-token-anxiety
直接 npm
npm install dsh-token-anxiety npm install dsh-token-anxiety@0.1.0
手动同步价格表
curl -X POST http://127.0.0.1:3080/token-anxiety/pricing-sync -H "Content-Type: application/json" -d '{}'

完整使用教程

01安装后重启 dsh web 并刷新页面
02在聊天输入区(composer band)找到成本 widget,hover 或点击展开
03看 Overview(峰谷定价状态)、Tasks(可排序的每任务成本表)、Explain(一键归因分析哪些任务在烧钱)
04价格表过期时用 pricing-sync 接口手动同步

config

默认货币 COP/USD/CNY(支持约 40 种,带地区格式化);语言跟随 harness locale;价格数据经 host 侧 pricing-sync 接口刷新(curl 命令见安装区),重启后覆盖值合并进默认表。README 未给出配置文件片段原文。

特色功能

·实时峰谷定价状态(按本地时区显示 peak/valley 窗口),直观看什么时段跑任务便宜
·每任务成本可排序表格 + 一键 Explain 归因(哪些任务烧钱、为什么)
·约 40 种货币、深浅色主题、中英双语,零外部依赖打包

评论墙

Reddit u/Snoo_57113 · 2026-08-15
I made a plugin (Token anxiety) for the deepseek harness 0.1 that shows the cost per task, the peak hours and how much a task would cost after the hike... As tips to reduce your bill I found that open research questions, typos, not being specific in the prompts and bugs in toolcalling make up 50%+ of the tokens.
我给 DeepSeek Harness 0.1 做了个插件(Token anxiety):显示每任务成本、峰值时段、涨价后同任务要花多少钱……省钱心得:开放式研究问题、打错字、prompt 不具体、工具调用 bug,加起来占了 50% 以上的 token。
11 赞同 原文
DSH Wiki · DSH 情报站 · ai798 Lab 出品
DeepSeek Harness 官网 GitHub
数据实抓