dsh-cost-meter 1.9.21 → 1.9.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +586 -586
- package/README.zh-CN.md +590 -590
- package/docs/billing-statistics.md +2 -2
- package/docs/context-costs-design.md +1 -1
- package/docs/update-notes-1.9.22.md +23 -0
- package/docs/update-notes-1.9.23.md +21 -0
- package/lib/client.js +1 -1
- package/lib/client.pricing.js +3 -3
- package/lib/client.statistics.js +8 -8
- package/lib/index.js +10 -1
- package/lib/model-labels.js +18 -7
- package/lib/plan-billing.js +9 -6
- package/lib/session-cost-source.js +1 -1
- package/lib/session-tree.js +21 -7
- package/lib/store.js +8 -3
- package/lib/typert.host.js +1 -0
- package/package.json +217 -215
|
@@ -41,7 +41,7 @@ From 1.8.10, the ledger retains every conversation instead of pruning details af
|
|
|
41
41
|
|
|
42
42
|
API costs are **estimates from reported usage and configured rates**, not provider invoices. Plan costs are the API-equivalent value of subscription usage, not an extra charge. External usage snapshots remain separately visible in Overview; this page analyzes DSH's own ledger.
|
|
43
43
|
|
|
44
|
-
With **Include subagents in session cost** enabled, the conversation badge, selected-conversation statistics and details include all continuous subagent descendants. The detail view lists each agent's recorded costs and identifies the owning conversation for every call, turn and step. Expanding a child turn reads that child's input and tools. Ordinary forks are excluded and inherited history is not billed twice. Disabling the setting limits
|
|
44
|
+
With **Include subagents in session cost** enabled, the conversation badge, selected-conversation statistics and details include all continuous subagent descendants. The detail view lists each agent's recorded costs and identifies the owning conversation for every call, turn and step. Expanding a child turn reads that child's input and tools. Ordinary forks are excluded and inherited history is not billed twice. Disabling the setting limits ordinary conversations to their own costs. From 1.9.23, a live agent-team lead automatically includes its team members and their descendants even with this setting disabled. The host's public team roster identifies membership; agents retain separate ledger entries.
|
|
45
45
|
|
|
46
46
|
Call details use the price version recorded for the call time, including peak/off-peak and long-context tiers. Editing rates, mappings or price currency affects subsequent calls. Older installations keep their existing ledger amounts and use the pre-upgrade price configuration as the baseline for available call logs; prices that were never recorded cannot be recovered. Missing logs and missing prices do not mean zero cost.
|
|
47
47
|
|
|
@@ -88,7 +88,7 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
|
|
|
88
88
|
|
|
89
89
|
汇总读取 DSH 账本,打开页面会同步其他进程已写入的记录,不重新定价或修改历史金额。全局日、周及全部统计中,跨天对话合并成一行,开启子代理费用合计时,排行把子代理及其后代归入所属主会话,点击后的明细与排行金额一致;关闭时各会话分别列出。每笔费用只计一次。历史中未归属模型或对话的金额会单独提示。从 1.8.10 起,账本保留全部对话记录,不再按每日 200 个裁剪。若已记录的全部 Token 与调用次数完整覆盖一个日期,旧日总额会按这些对话已记录的金额修复;匿名调用和旧版裁剪留下的金额保留。此修复不重新定价。
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
开启设置中的“本会话费用包含子代理”后,会话费用徽章、单对话汇总和费用明细均包含该会话的子代理及全部子代理后代。明细单列主会话与各子代理的账本费用,逐次调用、轮次和步骤标注所属会话,展开子代理轮次可查看它自己的输入与工具调用。普通分叉会话不归入父会话,子代理继承的历史消息不重复收费。关闭开关时,普通对话只显示自身费用。从 1.9.23 起,正在运行的智能体团队主代理会根据宿主公开的团队名册自动包含成员及其后代,不受此开关影响;各代理继续分别入账。
|
|
92
92
|
|
|
93
93
|
API 费用是按上报用量和配置单价计算的估算,不是厂商账单;Plan 费用是订阅用量的 API 等值,不代表额外扣款。外部用量快照仍在原概览中单列,这个页面统计 DSH 自身账本。
|
|
94
94
|
|
|
@@ -51,7 +51,7 @@ dsh-context 主要展示上下文占用、组成、变化和注入事件。0.66.
|
|
|
51
51
|
|
|
52
52
|
总量与 dsh-context 标题及宿主输入区占用环使用同一份 `contextPressure`,依次读取 `projectedTokens`、`pressureTokens`。旧宿主缺少该投影时,优先用 `contextTimeline` 中最近请求的 prompt 用量加后续上下文变化,最后回退 `tokenMeter.measure()`。DSH 0.2.0-rc.2 和 0.2.1-alpha.4 的本地测量会拒绝低于文本估算的用量锚点;代理压缩后的真实输入可能更小,因此不能用这个本地估算下限覆盖已有的用量校准值。[#293](https://github.com/Han-1413141/dsh-cost-meter/issues/293)
|
|
53
53
|
|
|
54
|
-
组成分类按校准总量等比例分配,页面明确标记为估算,不把原始文本比例当作代理压缩后逐段实测的 Token
|
|
54
|
+
组成分类按校准总量等比例分配,页面明确标记为估算,不把原始文本比例当作代理压缩后逐段实测的 Token 或账单。长上下文费率也使用同一个校准总量;已发生调用和会话累计费用不受此展示修正影响。联动区与独立统计视图均跟随费用显示币种;当前上下文的非缓存输入参考价按当前显示汇率折算,不使用历史账单汇率,也不修改历史实付金额。
|
|
55
55
|
|
|
56
56
|
最近一次调用使用该次调用的输入长度、发生时段与提供商用量单独计价,输入、缓存、输出之间不重复计数。历史回复留在当前上下文时属于输入。两组金额不相加;Plan 显示 API 等值,未知价格与零单价分别显示。
|
|
57
57
|
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# v1.9.22
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
- **修复 WorkBuddy 国际版计费分类。** `workbuddy-ai` 现在沿用 WorkBuddy 套餐设置。启用 WorkBuddy 积分查询或显式选择 Plan 后,国际版调用的等值金额不再计入 API 支出,侧栏、每日统计和会话明细使用一致的分类。
|
|
6
|
+
- **自动修正历史 API 金额。** 升级后的启动阶段执行一次修正,覆盖每日、单会话和模型明细。原金额、各币种记录、历史价格、Token 与调用数保持不变;已有 provider/model 明细的账本无需会话日志也能修正。
|
|
7
|
+
- **显式渠道配置可正常生效。** 自定义渠道可按原始 provider 名指定 plan/api,不再因缺少内置套餐别名而被忽略。模型级覆盖仍优先,手动指定 API 的调用继续计入 API 支出,DeepSeek 官方搜索和抓取请求费也继续归 API。
|
|
8
|
+
- **减少费用明细首次打开的等待。** 优先计算并显示包含子代理的完整金额和调用数,再加载步骤图表;收起的逐次调用列表在展开时渲染。
|
|
9
|
+
|
|
10
|
+
更新后完全退出并重启 DSH。历史修正按现有分类设置执行,无需逐个模型重新配置。Plan 等值金额仍可显示,它用于比较模型用量,不代表 WorkBuddy 实际扣除的积分,免费模型也可以有非零等值金额。
|
|
11
|
+
|
|
12
|
+
感谢 [@pcs801](https://github.com/pcs801) 在 [issue #364](https://github.com/Han-1413141/dsh-cost-meter/issues/364) 提供复现数据、原因定位和修复建议。代码见 [PR #366](https://github.com/Han-1413141/dsh-cost-meter/pull/366)。
|
|
13
|
+
|
|
14
|
+
## English
|
|
15
|
+
|
|
16
|
+
- **Fix WorkBuddy international billing classification.** `workbuddy-ai` now follows the WorkBuddy Plan settings. When WorkBuddy credits querying is enabled or its classification is explicitly Plan, international calls no longer count toward API spend. Sidebar, daily and session statistics use the same classification.
|
|
17
|
+
- **Correct historical API totals automatically.** A one-time startup correction updates daily, session and model attribution while preserving recorded amounts in each currency, prices, tokens and call counts. Existing provider/model ledger details are sufficient even when session logs are unavailable.
|
|
18
|
+
- **Honor explicit provider classifications.** Custom routes can use their exact request provider name to select plan/api without a built-in Plan alias. Model overrides still take priority. Explicit API choices and official DeepSeek search/fetch request fees remain API charges.
|
|
19
|
+
- **Reduce the wait when opening session costs.** Calculate and display complete totals, including subagents, before loading step charts. Render the individual-call list when expanded.
|
|
20
|
+
|
|
21
|
+
Fully quit and restart DSH after updating. The historical correction follows existing classification settings; individual model overrides are not required. Plan equivalents compare model usage rather than credits actually charged by WorkBuddy, so a free model can still have a nonzero equivalent amount.
|
|
22
|
+
|
|
23
|
+
Thanks to [@pcs801](https://github.com/pcs801) for the reproduction data, root-cause analysis and proposed fixes in [issue #364](https://github.com/Han-1413141/dsh-cost-meter/issues/364). Implemented in [PR #366](https://github.com/Han-1413141/dsh-cost-meter/pull/366).
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# v1.9.23
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
- **团队费用显示在主代理窗口。** 启用智能体团队后,主代理的会话费用和明细自动包含团队成员及其子代理的费用、Token 与调用数,仍可查看每个代理的记录。各代理继续分别入账,汇总不会重复增加每日费用,普通分叉会话不计入团队。
|
|
6
|
+
- **价格列表移除已删除的渠道和模型。** 当前价格配置按 DSH 的供应商、模型目录显示,已删除的项目不再留在待定价列表。历史费用、保存的价格和统计设置保留;恢复渠道后,可继续使用已有设置。目录查询失败时不会把现有模型全部隐藏。
|
|
7
|
+
- **上下文洞察联动跟随显示币种。** 切换 USD、CNY 或 EUR 后,联动标题和金额即时更新。当前上下文的非缓存参考价使用当前显示汇率换算,实际账单沿用既有记录;参考价说明继续显示。
|
|
8
|
+
|
|
9
|
+
更新后完全退出并重启 DSH。团队汇总自动生效;普通子代理的汇总仍可通过现有设置控制。
|
|
10
|
+
|
|
11
|
+
感谢 [@Theicecold](https://github.com/Theicecold) 在 [issue #367](https://github.com/Han-1413141/dsh-cost-meter/issues/367) 提供币种不一致的问题报告和统一显示建议。
|
|
12
|
+
|
|
13
|
+
## English
|
|
14
|
+
|
|
15
|
+
- **Show team costs in the lead's window.** Session costs and details automatically include team members and their subagents, with per-agent records available. Agents retain separate ledger entries, so daily spending is not counted twice. Ordinary conversation forks stay separate.
|
|
16
|
+
- **Remove deleted routes and models from the pricing list.** Filter active pricing configuration against DSH's provider/model directory while retaining historical costs, saved prices and statistics preferences. Restored routes can reuse their settings. Unavailable directory metadata does not hide all existing models.
|
|
17
|
+
- **Follow display currency in the dsh-context integration.** Switching USD, CNY or EUR updates both labels and amounts immediately. The uncached current-context reference uses the current display exchange rate; recorded actual bills retain their existing amounts. Keep the reference-price explanation visible.
|
|
18
|
+
|
|
19
|
+
Fully quit and restart DSH after updating. Team aggregation is automatic; the existing option still controls ordinary subagent aggregation.
|
|
20
|
+
|
|
21
|
+
Thanks to [@Theicecold](https://github.com/Theicecold) for reporting the currency inconsistency and suggesting consistent display in [issue #367](https://github.com/Han-1413141/dsh-cost-meter/issues/367).
|