
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
dsh-elegent-balance-tracker
Advanced tools
DeepSeek Harness (dsh) 计费插件:当前会话成本 + 官方账户余额,两个数字都按 DeepSeek 官方计价/接口展示。
| 位置 | 内容 | 说明 |
|---|---|---|
| 输入框统计行下方 | 费用: x.xx元 | 当前会话累计成本。host 端逐条读取会话日志的 usage(未命中输入 / 缓存命中 / 输出 token),按每条消息的发生时刻(北京时间)选择官方高峰/空闲价计算,与官方账单口径一致;模型回复完毕即刷新,15s 轮询兜底 |
| 侧边栏底部(设置按钮同行、右对齐) | 余额: x.xx元 | 启动时获取官方准确余额,之后每分钟自动对齐官方 GET /user/balance;两次对齐之间按本机所有会话新增成本实时扣减生成预估余额。点击立即同步;悬停显示余额与上次对齐时间 |
usage(缓存命中拆分、失败重试计入),单价内置官方价格,2026-08-17 起自动按北京时间峰谷价(周一至周五高峰 9-12 / 14-18 点,周末全天闲时、空闲半价)。deepseek-v4-flash-vision-exp 等新模型无需升级插件即可按官方价计费。优先级:用户显式配置 > 官方自动同步 > 内置默认价。/user/balance 只有当前余额构成),因此不展示。# npm 渠道(推荐,适用于所有设备)
dsh plugin --profile web add dsh-elegent-balance-tracker
# 方式一:直接指定 tgz 离线包
dsh plugin --profile web add /path/to/dsh-elegent-balance-tracker-0.1.0.tgz
# 方式二:本地目录
dsh plugin --profile web add /absolute/path/to/dsh-elegent-balance-tracker
安装后重启 dsh web(插件行与客户端 bundle 在启动时扫描),再刷新浏览器页面(F5)。
宿主侧 API Key 使用 DEEPSEEK_API_KEY 凭据引用(在 Web 模型设置页保存即可),也可回退到同名环境变量。
在 web profile 的 cordis.patch.yml 覆盖($DSH_HOME/profiles/web/cordis.patch.yml):
- patch:
- id: dsh-elegent-balance-tracker
config:
apiKeyRef: DEEPSEEK_API_KEY # 余额查询用的凭据引用
baseURL: "" # 余额接口地址;留空用 $DEEPSEEK_BASE_URL,再回退 https://api.deepseek.com
balanceCacheMs: 60000 # 余额缓存毫秒数
costCacheMs: 2000 # 会话费用缓存毫秒数
# 官方计价自动同步(默认开启;关闭后仅用内置价 + 下方手动覆盖)
priceSync:
enabled: true
url: "https://api-docs.deepseek.com/zh-cn/quick_start/pricing/"
intervalMs: 43200000 # 12 小时
timeoutMs: 10000
# 单价覆盖(元 / 百万 tokens)——优先级高于官方同步价
prices:
deepseek-v4-flash: { input: 1, cacheRead: 0.02, output: 2 }
# 日期生效的峰谷价表——优先级高于官方同步价
priceSchedule:
- from: "2026-08-17"
peak:
deepseek-v4-flash: { input: 3, cacheRead: 0.1, output: 9 }
idle:
deepseek-v4-flash: { input: 1.5, cacheRead: 0.05, output: 4.5 }
内置默认价(官方现行价,2026-08-17 起):
| 模型 | 时段 | 未命中输入 | 缓存命中 | 输出 |
|---|---|---|---|---|
deepseek-v4-flash | 高峰 | ¥3.0/M | ¥0.10/M | ¥9.0/M |
deepseek-v4-flash | 空闲 | ¥1.5/M | ¥0.05/M | ¥4.5/M |
deepseek-v4-flash-vision-exp | 高峰 | ¥3.0/M | ¥0.10/M | ¥9.0/M |
deepseek-v4-flash-vision-exp | 空闲 | ¥1.5/M | ¥0.05/M | ¥4.5/M |
deepseek-v4-pro | 高峰 | ¥9.0/M | ¥0.30/M | ¥27.0/M |
deepseek-v4-pro | 空闲 | ¥4.5/M | ¥0.15/M | ¥13.5/M |
表格仅为内置兜底价;
priceSync开启时(默认)以官方页面实时同步价为准,新模型与调价自动生效。
dsh plugin --profile web remove dsh-elegent-balance-tracker
MIT
FAQs
DeepSeek Harness 计费插件:当前会话成本 + 官方余额,追加在输入框统计行下方与侧边栏设置按钮同行显示
The npm package dsh-elegent-balance-tracker receives a total of 14 weekly downloads. As such, dsh-elegent-balance-tracker popularity was classified as not popular.
We found that dsh-elegent-balance-tracker demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.