Skip to content

Releases

1.1.0

Choose a tag to compare

@mike-lee0120 mike-lee0120 released this 25 Sep 03:30

中文

修复:会话计费从 2026-09-12 起全部为 0

  • 会话日志格式已迁移到 session.v3.jsonl.zstd,扫描器却仍只读 session.jsonl.zstd:157 个会话完全漏统计,另有 15 个会话按迁移前的冻结旧日志计费。
  • 现在取每个会话目录里版本号最高的一代(与运行时实际读取的文件一致);解析同时对齐官方 @deepseek-ai/dsh-token-meter 的语义:assistant/attempt 结算、data.stream 的 usage 回退、llm/retry-started 关闭替换槽。
  • 结果:纳入统计的日志从 128 条增至 297 条,9/12 之后不再显示为 0。

价格:改用 DeepSeek 官方人民币价目表

  • deepseek-flash 1 / 0.02 / 4,deepseek-v4-pro 4.5 / 0.15 / 13.5(每百万 tokens,空闲 / 高峰);已下线的 deepseek-v4-flash、deepseek-v4-flash-vision-exp 以及日志中的过期实验模型名按 Flash 价计费,未定价模型清零。
  • 峰谷时段修正为「北京时间周一至周五 09:00-12:00、14:00-18:00」——此前周末也被按峰时(翻倍)计费;新增 peakWeekdays、peakExcludeDates 可配置(法定节假日可按空闲价)。
  • 看板统一人民币显示(美元标价按 fx.cnyPerUsd 折算),移除 USD/CNY 切换,并移除恒为 0 的「缓存写入」卡片、曲线与表格列。

会话表:可排序 + 子代理归并

  • 表头「费用 / 时间」可点击切换排序,再次点击反向;默认按费用降序。
  • 子代理日志按日志头部的 parentSession 折算回发起它的会话(支持多层委派):297 条日志 → 129 个真实会话,总额不变,会话行标注「含 N 个子代理」。
  • 表格截断改为按会话整体进行,不会再出现某个会话只显示一半的情况。

校验

  • node scripts/verify-totals.mjs:用官方 token meter 的折叠语义逐条复核全部日志,并新增价格表与峰谷窗口的回归用例。

English

Fixed: billing read as zero from 2026-09-12 onward

  • Session logs moved to session.v3.jsonl.zstd, but the scanner still read only session.jsonl.zstd: 157 sessions were invisible, and 15 more were billed from their frozen pre-migration log.
  • The scan now selects the highest published generation in each session directory (the file the runtime actually reads) and mirrors @deepseek-ai/dsh-token-meter exactly: assistant/attempt settlements, the data.stream usage fallback, and llm/retry-started closing the replacement slot.
  • Result: 128 -> 297 logs counted, and days after 09-12 are no longer zero.

Pricing: DeepSeek's official CNY list prices

  • deepseek-flash 1 / 0.02 / 4 and deepseek-v4-pro 4.5 / 0.15 / 13.5 per 1M tokens (idle / peak); the retired deepseek-v4-flash, deepseek-v4-flash-vision-exp and the expired experimental id in the logs bill at Flash rates, so no model is left unpriced.
  • The peak window is now Beijing-time weekdays 09:00-12:00 / 14:00-18:00 (weekends were previously charged at peak, doubling them); peakWeekdays and peakExcludeDates are configurable.
  • The dashboard reports CNY only (USD entries convert at fx.cnyPerUsd), the USD/CNY toggle is gone, and the always-zero cache-write card, series and table column were removed.

Session table: sortable, subagents folded in

  • Click the Cost / When header to sort by cost or last-active time, and click again to reverse; the default is cost descending.
  • Subagent logs are folded into the session that spawned them via the header's parentSession (multi-level chains supported): 297 logs -> 129 real sessions with unchanged totals, and each session is badged with how many subagents it absorbed.
  • Truncation now keeps whole sessions, so a listed session never loses part of its rows.

Verification

  • node scripts/verify-totals.mjs folds every log with the token meter's semantics and pins the price list plus the peak window as regression cases.