dsh-token-price — DSH 实时 Token 花费 + 账户余额显示插件 #1878
Replies: 4 comments 6 replies
|
Nice plugin — putting per-turn cost next to token/latency stats is much more useful than a separate billing page. One implementation detail I would add before relying on the number for long-running sessions: version the pricing rule by effective timestamp and model alias instead of keeping one timeless price table. For an auditable cost record, I would persist at least:
That keeps historical sessions explainable when DeepSeek updates pricing or moves an alias to a newer backend. I would also keep the More broadly, this is one reason I think the useful unit for coding agents is becoming model × harness × workflow, not the model alone: the harness is where accounting, tool execution, permissions, retries, workspace state, and observability become operational behavior. I put my current V4-Pro-0813 + DeepSeek Harness developer notes (official API surface, pricing/limits, compatibility, and adoption boundaries) here: |
|
感谢提醒。我刚重新检查了之前那篇页面,现在公网访问已经正常,返回 HTTP 200: https://www.xbstack.com/en/ai/tools-lab/deepseek-v4-pro-0813-harness/ 前面那次更像是当时的部署或边缘访问异常,不是链接已经下线。如果你那边现在仍然打不开,可以把具体报错或地区告诉我,我再继续查路由/缓存问题。 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
给 DeepSeek Harness(DSH)Web 聊天界面加一个实时显示 Token 花费和账户余额的小插件
功能:
每轮花费:每条 AI 回复的统计行(时间 · 用时 · 首 token · tok/s)末尾显示本轮花费,跟随悬停出现
总花费:输入框下方统计条区域显示当前会话累计花费
账户余额:实时显示 DeepSeek 账户余额(CNY,来自官方 GET /user/balance)
计费贴近官方:按官方峰谷定价(北京时间 9:00-12:00、14:00-18:00 为高峰,其余半价)计算,并区分缓存命中
实时汇率:价格表按官方美元价维护,USD→CNY 汇率由浏览器实时抓取(免费 API 双源 + 缓存),不需要手动维护汇率
仓库
https://github.com/spoon-man569/dsh-token-price
欢迎 Star
All reactions