dsh-cost-meter 1.9.41 → 1.9.44
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 +10 -8
- package/README.zh-CN.md +10 -8
- package/docs/baidu-token-plan.md +24 -0
- package/docs/billing-statistics.md +14 -2
- package/docs/billion-context-peer-discovery.md +20 -0
- package/docs/catalog-2026-10-28.md +60 -0
- package/docs/custom-balance-sources.md +6 -0
- package/docs/display-settings.md +9 -1
- package/docs/official-price-sync-safety.md +25 -0
- package/docs/plugin-compatibility-watch.md +34 -0
- package/docs/provider-pricing-2026-10.md +10 -6
- package/docs/provider-pricing.json +304 -13
- package/docs/subscription-catalog.json +82 -0
- package/docs/update-notes-1.9.42.md +21 -0
- package/docs/update-notes-1.9.43.md +21 -0
- package/docs/update-notes-1.9.44.md +21 -0
- package/lib/baidu-token-plan.js +82 -0
- package/lib/billion-context-billing.js +9 -8
- package/lib/billion-context-peer.js +164 -0
- package/lib/client.display.js +2 -2
- package/lib/client.js +6 -6
- package/lib/client.notices.js +1 -0
- package/lib/client.peak.js +3 -3
- package/lib/client.plan-settings.js +1 -1
- package/lib/client.pricing.js +3 -3
- package/lib/coding-plans.js +49 -31
- package/lib/index.js +79 -31
- package/lib/ledger-writer-worker.js +1 -1
- package/lib/official-price-sync.js +45 -0
- package/lib/plan-billing.js +10 -6
- package/lib/plan-provider-match.js +2 -2
- package/lib/pricing.js +11 -2
- package/lib/provider-prices-2026-10-28.js +364 -0
- package/lib/provider-prices.js +6 -0
- package/lib/query-accounts.js +39 -0
- package/lib/session-tree.js +26 -12
- package/lib/store.js +28 -2
- package/lib/subscription-catalog.js +34 -0
- package/lib/typert.host.js +5 -0
- package/package.json +12 -3
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**Session cost tracking plugin for the DeepSeek Harness web GUI (bilingual UI)**
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.44** fixes peak/off-peak markers and updates 32 model-catalog records, including Kimi K3.1 Pro / Highspeed and MiniMax M3.1 Flash, plus current Kimi memberships and MiniMax M Plan.
|
|
20
20
|
|
|
21
21
|
**Host floor: DSH 0.2.0** · Adaptation target: **0.2.1-rc.2** (npm `next`). Expand the compatibility notes below for exact declarations, host records and troubleshooting.
|
|
22
22
|
|
|
23
|
-
Release notes: [v1.9.
|
|
23
|
+
Release notes: [v1.9.44](docs/update-notes-1.9.44.md#english). Fully restart DSH after updating.
|
|
24
24
|
|
|
25
25
|

|
|
26
26
|
|
|
@@ -121,6 +121,8 @@ Qwen Token Plan can use the [official CLI subscription quota](docs/qwen-cli-quot
|
|
|
121
121
|
|
|
122
122
|
Local Qwen Token Plan credits include Plan calls assigned to Qwen. Existing subscription aliases such as `qwen` and `qwen-tokenplan` remain supported; custom providers can select Qwen under Model statistics → Billing class, or use an explicit vendor name and plan marker for auto detection. Explicit API calls are excluded. The pay-as-you-go `qianwen` provider is not assigned merely because its model ID is identical. Models outside the credits table need all three rates configured.
|
|
123
123
|
|
|
124
|
+
Baidu Qianfan Token Plan Personal now supports [quota queries via console Cookie](docs/baidu-token-plan.md), including credits and Token modes. Store the Cookie in the Baidu quota card or set `BAIDU_QIANFAN_COOKIE` on the DSH host.
|
|
125
|
+
|
|
124
126
|
Xiaomi MiMo Token Plan quotas are queried with the **MiMo console cookie**, not an API key: log in at `platform.xiaomimimo.com`, press F12 → Network → find the `balanceAlertConfig` request and paste the full `cookie` request header into the MiMo card in Settings → Cost → Quotas (it must include `serviceToken` and `userId`; the DSH credential store keeps it as `MIMO_COOKIE`). The card shows the plan/compensation credit windows with the period-end reset (Beijing time) plus a balance row. Copy a fresh console cookie when the card reports an expired login. Token Plan inference keys (`tp-*` / `ttp-*`) are not accepted by this console adapter. Local plan statistics use the calendar month; compensation and balance are displayed without estimates because local calls cannot be attributed to those pools.
|
|
125
127
|
|
|
126
128
|
Each CLIProxyAPI source has a **Gemini quota only** option for its Antigravity groups. It defaults to off. Intentional filtering to no visible quota shows an empty list; malformed quota data still reports an error.
|
|
@@ -354,22 +356,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
|
|
|
354
356
|
dsh plugin --profile web add dsh-cost-meter
|
|
355
357
|
```
|
|
356
358
|
|
|
357
|
-
**PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.
|
|
359
|
+
**PowerShell one-click script** (copy the whole line, paste, press Enter; pnpm is provisioned automatically, git is auto-detected — no clone needed; the install chain is **pinned to the release tag `v1.9.44`** — review the script before running):
|
|
358
360
|
|
|
359
361
|
```powershell
|
|
360
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
362
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.44/install.ps1 | iex
|
|
361
363
|
```
|
|
362
364
|
|
|
363
365
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
364
366
|
|
|
365
367
|
```sh
|
|
366
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
368
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.44
|
|
367
369
|
```
|
|
368
370
|
|
|
369
371
|
Without git, use the GitHub tag archive:
|
|
370
372
|
|
|
371
373
|
```sh
|
|
372
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
374
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.44.tar.gz
|
|
373
375
|
```
|
|
374
376
|
|
|
375
377
|
After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
|
|
@@ -434,7 +436,7 @@ Workarounds:
|
|
|
434
436
|
|
|
435
437
|
```yaml
|
|
436
438
|
minimumReleaseAgeExclude:
|
|
437
|
-
- dsh-cost-meter@1.9.
|
|
439
|
+
- dsh-cost-meter@1.9.44
|
|
438
440
|
```
|
|
439
441
|
|
|
440
442
|
3. For a one-off CLI operation, forward the pnpm flag: `dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0` (or add `--trust-lockfile` when only lockfile verification fails). Both flags were verified against pnpm 11.28.5 in a temporary profile.
|
package/README.zh-CN.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
**DeepSeek Harness 会话费用统计插件(界面中英双语)**
|
|
8
8
|
|
|
9
|
-
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
10
|
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
11
|
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
12
|
[](LICENSE)
|
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
|
|
17
17
|
</div>
|
|
18
18
|
|
|
19
|
-
**v1.9.
|
|
19
|
+
**v1.9.44** 修复峰谷游标,更新 32 条模型目录记录,补入 Kimi K3.1 Pro / 高速版、MiniMax M3.1 Flash,并更新 Kimi 新套餐与 MiniMax M Plan。
|
|
20
20
|
|
|
21
21
|
**宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
|
|
22
22
|
|
|
23
|
-
更新说明:[v1.9.
|
|
23
|
+
更新说明:[v1.9.44](docs/update-notes-1.9.44.md#中文)。更新后完全重启 DSH。
|
|
24
24
|
|
|
25
25
|

|
|
26
26
|
|
|
@@ -120,6 +120,8 @@
|
|
|
120
120
|
|
|
121
121
|
千问 Token Plan 的本地 Credits 统计归属千问套餐的 Plan 调用。保留 `qwen`、`qwen-tokenplan` 等订阅别名,自定义渠道也可在「按模型统计 → 计费方式」选择千问套餐,或使用明确的厂商名与套餐特征自动识别。显式 API 调用不计;`qianwen` 按量渠道不会仅因同名模型自动归入。模型不在抵扣表中时需补充三项费率。
|
|
122
122
|
|
|
123
|
+
百度千帆 Token Plan 个人版现已支持[通过控制台 Cookie 查询额度](docs/baidu-token-plan.md),分别显示积分制和 Token 制用量。在百度额度卡片保存 Cookie,或在 DSH 主机配置 `BAIDU_QIANFAN_COOKIE`。
|
|
124
|
+
|
|
123
125
|
小米 MiMo Token Plan 的额度查询使用**控制台 Cookie**(而非 API Key):登录 `platform.xiaomimimo.com` 后按 F12 →「网络」→ 找到 `balanceAlertConfig` 请求,把请求头 `cookie` 整段粘贴进「设置 → 费用 → 额度」的 MiMo 卡片(需含 `serviceToken` 与 `userId`,DSH 凭据库以 `MIMO_COOKIE` 托管)。卡片显示套餐/补偿积分窗口与周期截止重置(北京时间)及余额行。控制台 Cookie 过期后,按卡片提示重新复制。此控制台查询不接受 Token Plan 推理专用 Key(`tp-*` / `ttp-*`)。本地套餐统计按自然月汇总;补偿积分和余额只展示查询结果,不用无法区分归属的本地调用估算。
|
|
124
126
|
|
|
125
127
|
CLIProxyAPI 网关来源卡片可勾选「只显示 Gemini 额度」,仅影响该来源的 Antigravity 分组。默认显示全部分组;过滤后无可见额度时显示空列表,解析错误仍单独报告。
|
|
@@ -354,22 +356,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
|
|
|
354
356
|
dsh plugin --profile web add dsh-cost-meter
|
|
355
357
|
```
|
|
356
358
|
|
|
357
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.
|
|
359
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.44`**,建议先下载审阅再运行):
|
|
358
360
|
|
|
359
361
|
```powershell
|
|
360
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
362
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.44/install.ps1 | iex
|
|
361
363
|
```
|
|
362
364
|
|
|
363
365
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
364
366
|
|
|
365
367
|
```sh
|
|
366
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
368
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.44
|
|
367
369
|
```
|
|
368
370
|
|
|
369
371
|
没有 git 时可用 GitHub tag 打包直链:
|
|
370
372
|
|
|
371
373
|
```sh
|
|
372
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
374
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.44.tar.gz
|
|
373
375
|
```
|
|
374
376
|
|
|
375
377
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|
|
@@ -434,7 +436,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
|
|
|
434
436
|
|
|
435
437
|
```yaml
|
|
436
438
|
minimumReleaseAgeExclude:
|
|
437
|
-
- dsh-cost-meter@1.9.
|
|
439
|
+
- dsh-cost-meter@1.9.44
|
|
438
440
|
```
|
|
439
441
|
|
|
440
442
|
3. 仅本次操作用 CLI 透传 pnpm 参数:`dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0`;若只是 lockfile 校验阶段失败,可改用 `--trust-lockfile`。这两个参数已在本机 pnpm 11.28.5 临时 Profile 上实测可用。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# 百度千帆 Token Plan 额度
|
|
2
|
+
|
|
3
|
+
支持千帆 Token Plan 个人版的积分制和 Token 制,显示月度已用百分比、已用量 / 总额度及套餐到期时间。数值由百度控制台读取,不按模型调用费用换算。
|
|
4
|
+
|
|
5
|
+
## 配置
|
|
6
|
+
|
|
7
|
+
1. 登录 [百度智能云千帆控制台](https://console.bce.baidu.com/qianfan/resource/token-plan),确认个人版套餐有效。
|
|
8
|
+
2. 打开浏览器开发者工具的「网络」,刷新页面,找到 `tokenPlanPersonal/resource` 请求,复制请求头中的完整 `Cookie`。
|
|
9
|
+
3. 在费用插件的「订阅额度」中启用「百度千帆 Token Plan」,展开卡片,将 Cookie 粘贴到凭据框并保存,点击刷新。也可在 DSH 主机配置 `BAIDU_QIANFAN_COOKIE` 环境变量。
|
|
10
|
+
|
|
11
|
+
Cookie 由 DSH 凭据库保管,不写入账本、配置备份或公开状态。登录过期后重新复制 Cookie。推理用的 API Key 不能代替控制台 Cookie;不要将 Cookie 发到 issue 或评论。
|
|
12
|
+
|
|
13
|
+
本次接入个人版套餐本身的额度;加油包、企业版和旧 Coding Plan 的独立窗口不在此卡片中。到期时间独立显示,不当作月度重置时间。既有 `baidu-coding` 计费分类保持兼容,并识别 `baidu-token-plan`、`qianfan-token-plan` 等别名。
|
|
14
|
+
|
|
15
|
+
## 接口依据与验证
|
|
16
|
+
|
|
17
|
+
2026-10-26 核对 [官方个人版文档](https://cloud.baidu.com/doc/qianfan/s/Dmrabu8b6)及控制台公开前端:
|
|
18
|
+
|
|
19
|
+
- [订阅查询代码](https://aip-static.cdn.bcebos.com/mb-static/resource/assets/useRedeemCodeActivation-74e52f9e.js):`GET /api/qianfan/charge/tokenPlanPersonal/resource`,成功信封为 `success: true`,套餐在 `result.items` 中。
|
|
20
|
+
- `billingMode: "credit"` 使用 `usedCredits`、`totalCredits`;`"token"` 使用 `usedTokens`、`totalTokens`。`expiresAt` 是套餐到期时间,`resourceStatus: "Released"` 为已释放资源。
|
|
21
|
+
- [请求封装](https://aip-static.cdn.bcebos.com/mb-static/resource/assets/caller-368e0844.js):GET 使用同源 Cookie 和 `X-Requested-With: XMLHttpRequest`,没有修改套餐的操作。
|
|
22
|
+
- 未登录访问该只读端点实测返回 HTTP 302。插件拒绝跟随重定向,Cookie 只发送到固定官方端点。
|
|
23
|
+
|
|
24
|
+
回归测试使用上述官方结构构造的数据,覆盖两种计量模式、过期套餐、无订阅、缺字段、认证失败、取消、凭据保管和状态编码。尚未使用真实付费账号核对数值。
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
## English
|
|
4
4
|
|
|
5
|
+
### Channel billing
|
|
6
|
+
|
|
7
|
+
In **Cost → Overview → Channel billing**, select a channel and choose Automatic, Plan subscription or Metered API. The choice applies to its models; individual model overrides take priority. Saving updates historical API/Plan classification without changing tokens, API-equivalent amounts or recorded exchange rates. Quota-query switches remain independent.
|
|
8
|
+
|
|
9
|
+
Automatic classification recognizes `dsh-opencode-go`, `opencode-go` and `opencode-go-plus` (including the `llm-` prefix) as Go subscriptions even when `planBilling.autoProviders` is empty. Explicit model/channel/family choices still take priority. Existing records receive a one-time classification correction. Other ambiguous channels continue using their saved automatic membership; `opencode-zen` remains metered API.
|
|
10
|
+
|
|
5
11
|
### Conversation cost views
|
|
6
12
|
|
|
7
13
|
The conversation **Cost details** view defaults to the treemap and offers four layouts over the same complete cost totals:
|
|
@@ -41,7 +47,7 @@ From 1.8.10, the ledger retains every conversation instead of pruning details af
|
|
|
41
47
|
|
|
42
48
|
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
49
|
|
|
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.
|
|
50
|
+
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. The session-list cost uses the same scope for both today and total. The durable `agentTeam` snapshot identifies the lead by its top-level `id` and contains only teammates in `members`; the client wire view adds `lead` / `teammate` roles. Both shapes are supported (verified against `@deepseek-ai/dsh-experimental-agent-team` 0.2.0-rc.2 and 0.2.1-rc.2, `lib/types/projection.js`, issue #420).
|
|
45
51
|
|
|
46
52
|
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
53
|
|
|
@@ -53,6 +59,12 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
|
|
|
53
59
|
|
|
54
60
|
## 简体中文
|
|
55
61
|
|
|
62
|
+
### 渠道计费方式
|
|
63
|
+
|
|
64
|
+
在 **费用 → 概览 → 渠道计费方式** 中选择渠道,再选择“自动”“Plan 订阅”或“API 按量”。设置适用于该渠道所有模型,模型单独设置优先。保存后更新历史 API/Plan 归属,保留 Token、API 等值金额和记录时的汇率金额。额度查询开关独立控制。
|
|
65
|
+
|
|
66
|
+
自动归类按明确的订阅渠道识别 `dsh-opencode-go`、`opencode-go`、`opencode-go-plus`,支持 `llm-` 前缀,不再受空 `planBilling.autoProviders` 列表影响。用户显式设置的模型、原始渠道或套餐家族分类优先。已有账本启动后进行一次分类修正;其他无法仅凭渠道名判断的来源继续使用已保存的自动归属,`opencode-zen` 仍为 API 按量。
|
|
67
|
+
|
|
56
68
|
### 对话费用视图
|
|
57
69
|
|
|
58
70
|
对话中的「费用明细」提供四种视图,使用同一份完整费用:
|
|
@@ -88,7 +100,7 @@ The statistics screen uses DSH's package-local asynchronous module loader. Since
|
|
|
88
100
|
|
|
89
101
|
汇总读取 DSH 账本,打开页面会同步其他进程已写入的记录,不重新定价或修改历史金额。全局日、周及全部统计中,跨天对话合并成一行,开启子代理费用合计时,排行把子代理及其后代归入所属主会话,点击后的明细与排行金额一致;关闭时各会话分别列出。每笔费用只计一次。历史中未归属模型或对话的金额会单独提示。从 1.8.10 起,账本保留全部对话记录,不再按每日 200 个裁剪。若已记录的全部 Token 与调用次数完整覆盖一个日期,旧日总额会按这些对话已记录的金额修复;匿名调用和旧版裁剪留下的金额保留。此修复不重新定价。
|
|
90
102
|
|
|
91
|
-
开启设置中的“本会话费用包含子代理”后,会话费用徽章、单对话汇总和费用明细均包含该会话的子代理及全部子代理后代。明细单列主会话与各子代理的账本费用,逐次调用、轮次和步骤标注所属会话,展开子代理轮次可查看它自己的输入与工具调用。普通分叉会话不归入父会话,子代理继承的历史消息不重复收费。关闭开关时,普通对话只显示自身费用。从 1.9.23
|
|
103
|
+
开启设置中的“本会话费用包含子代理”后,会话费用徽章、单对话汇总和费用明细均包含该会话的子代理及全部子代理后代。明细单列主会话与各子代理的账本费用,逐次调用、轮次和步骤标注所属会话,展开子代理轮次可查看它自己的输入与工具调用。普通分叉会话不归入父会话,子代理继承的历史消息不重复收费。关闭开关时,普通对话只显示自身费用。从 1.9.23 起,正在运行的智能体团队主代理会根据宿主公开的团队名册自动包含成员及其后代,不受此开关影响;各代理继续分别入账。会话列表的今日与累计费用采用同一范围。宿主 `agentTeam` 快照的顶层 `id` 标识主代理,`members` 只包含队友;客户端视图才添加 `lead` / `teammate` 角色。两种格式均已支持,依据 `@deepseek-ai/dsh-experimental-agent-team` 0.2.0-rc.2 和 0.2.1-rc.2 发布包中的 `lib/types/projection.js` 核对([#420](https://github.com/Han-1413141/dsh-cost-meter/issues/420))。
|
|
92
104
|
|
|
93
105
|
API 费用是按上报用量和配置单价计算的估算,不是厂商账单;Plan 费用是订阅用量的 API 等值,不代表额外扣款。外部用量快照仍在原概览中单列,这个页面统计 DSH 自身账本。
|
|
94
106
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# billion-context 目标识别与空闲回归(1.9.43)
|
|
2
|
+
|
|
3
|
+
## 原因与边界
|
|
4
|
+
|
|
5
|
+
[#432](https://github.com/Han-1413141/dsh-cost-meter/issues/432) 的报告者 [@ZiYuan258](https://github.com/ZiYuan258) 提供了 Windows 事件循环探针、I/O 测量和根因定位。旧代码每 3 秒触发计费维护,识别函数设 10 秒间隔,因此约每 12 秒调用一次宿主 `listBundles()`。已发布的 DSH PluginManager 在返回 Promise 前同步读取完整插件清单、包元数据与展示资料。
|
|
6
|
+
|
|
7
|
+
新实现不调用该 API,也不在失败时回退到全量扫描。不直接把 profile 中的包名视为“运行中”:真实 Loader 的祖先禁用状态和 ACTIVE 实例决定是否存在原生代理,单独运行的 compaction gate 不算代理。版本来自目标包身份校验;别名、pnpm 目录链接与 file URL 使用目标路径,文件入口先解析真实路径。新宿主的纯数据运行时解析表用于补充模块路径,避免读取全量展示元数据。
|
|
8
|
+
|
|
9
|
+
文件读取异步、单路执行,单个 manifest 限制为 256 KiB,路径与候选数都有上限。非普通文件、损坏或过大的 manifest 不会被视为有效包。成功结果按已加载模块 callback 缓存;只换 fiber 而复用 Node 缓存模块时仍保留原版本。读取失败可重试,卸载或销毁期间完成的旧请求不会重新激活状态。符号链接 profile 的实际路径也参与解析;外部 linked parent 的复杂 peer-dependency 拦截若无法确定,则保留未知状态,不猜版本、不清除已收到的自动适配诊断,仍由实际请求回执决定计费覆盖。
|
|
10
|
+
|
|
11
|
+
这些信息用于兼容提示,不替代逐次请求回执。日志导入、失败重试、宿主补记与去重算法未改变;无 Loader 的嵌入场景保留已有自动适配与回执路径。
|
|
12
|
+
|
|
13
|
+
## 自动回归
|
|
14
|
+
|
|
15
|
+
- `test/billion-context-peer.mjs`:328 个无关包;冷识别仅打开 1 个目标 manifest;1,000 次缓存读取和 24 次实际计费定时器回调(模拟 72 秒)都产生 **0 次 `listBundles()` 调用、0 次空闲目标文件读取**。暂停异步文件读取期间心跳仍能运行,最大并发打开数为 1。
|
|
16
|
+
- 同一测试覆盖未安装、启用、有效禁用状态、加载失败、卸载、重载、版本变化、别名、文件链接、畸形/超大/FIFO 文件、发现请求合并与销毁,以及无代理时仍允许宿主计费补记。
|
|
17
|
+
- `test/billion-context-peer-host.mjs`:用真实 Cordis Loader 和发布版 PluginManager 在 DSH `0.2.0-rc.1` 与 `0.2.1-rc.3` 上验证生命周期。测试明确区分“同模块重新启用”和“实际新 callback 加载”,不能只改磁盘版本号就宣称升级完成。
|
|
18
|
+
- `test/billion-context-billing.mjs`、`test/billion-context-auto.mjs`:保留真实 billion-context 发布包矩阵;另有 null usage、回执、归档、恢复与增量目录扫描测试。
|
|
19
|
+
|
|
20
|
+
本地 Linux 的一次冷全量清单读取约 9 ms,1,000 次真实宿主缓存识别合计约 90 ms。数字随机器而变;关键可复验断言是空闲全量扫描和文件读取均为零。**这不是报告者 Windows 1.5–6 秒停顿已消失的实机验证。** Windows 需要升级、完全重启宿主,再运行原探针比较。
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# 2026-10-28 模型与套餐目录更新
|
|
2
|
+
|
|
3
|
+
本次新增或修正 32 条渠道价格记录。完整内置目录现有 20 个厂商 / 渠道键、358 条记录、223 个不同模型 ID;353 条已核价,5 条为 `unpriced`。DeepSeek 主表独立保存。机器可读文件为 [模型价格](provider-pricing.json)和[套餐目录](subscription-catalog.json)。
|
|
4
|
+
|
|
5
|
+
## 新模型与价格
|
|
6
|
+
|
|
7
|
+
以下为每百万 token 的美元价。缓存写入按默认 5 分钟 TTL;“—”表示该条目未提供独立写入价。
|
|
8
|
+
|
|
9
|
+
| 渠道 | 模型 ID | 输入 | 缓存读取 | 缓存写入 | 输出 |
|
|
10
|
+
|---|---|---:|---:|---:|---:|
|
|
11
|
+
| Kimi API | `kimi-k3.1-pro` | 2 | 0.2 | 2 | 10 |
|
|
12
|
+
| Kimi API | `kimi-k3.1-pro-highspeed` | 4 | 0.2 | 4 | 20 |
|
|
13
|
+
| MiniMax API | `MiniMax-M3.1-Flash` | 0.15 | 0.015 | — | 0.6 |
|
|
14
|
+
| 百炼国际站,新加坡 International | `qwen3.8-flash` | 0.15 | 0.016 | 0.2 | 0.47 |
|
|
15
|
+
| TokenHub,新加坡 | `hy4-preview` | 0.834 | 0.042 | — | 2.501 |
|
|
16
|
+
| OpenCode Go | `kimi-k3.1-pro` | 2 | 0.2 | 2 | 10 |
|
|
17
|
+
| OpenCode Go | `minimax-m3.1-flash` | 0.15 | 0.015 | — | 0.6 |
|
|
18
|
+
| OpenCode Go | `step-5-preview` | 1 | 0.1 | — | 2.7 |
|
|
19
|
+
| OpenCode Go | `gemini-4-argon` | 2 | 0.1 | — | 10 |
|
|
20
|
+
| OpenCode Zen | `muse-wonder-1.0` | 4 | 0.2 | — | 20 |
|
|
21
|
+
|
|
22
|
+
Kimi Pro / Highspeed 的人民币输入、读取、写入、输出分别为 13 / 1.3 / 13 / 68 和 26 / 1.3 / 26 / 136;MiniMax M3.1 Flash 为 1 / 0.1 / — / 4。它们按官方报价独立保存。Kimi 1 小时缓存写入费在条目说明中列出,当前默认价仍使用 5 分钟写入费。
|
|
23
|
+
|
|
24
|
+
Kimi Code 的 `k3.1-pro`、`k3.1-pro-highspeed`、`k3` 使用对应 API 价格展示 token 等值费用;`k3-256k`、`kimi-for-coding`(K2.8 Preview)及 `kimi-for-coding-highspeed` 保持未核价,额度仍由订阅查询显示。MiniMax 的 `MiniMax-M3.1-Flash-Preview` 兼容名称按官方现行 M3.1 Flash 价格记录。
|
|
25
|
+
|
|
26
|
+
OpenCode Zen 新增 `glm-5.3-flash-free`、`beam-free`、`flint-40b-free`、`nemotron-3.5-super-vl-free`;Go 新增 `beam-free`、`iceman-contributor-free`。免费价只属于列明的渠道。Gemini 4 Argon 的当前促销价截至 2026-11-30。
|
|
27
|
+
|
|
28
|
+
同时补齐 Zen / Go 的 Kimi K3 缓存写入价,并将 Zen GPT-6.1 Sol 缓存读取更新为 0.1,超过 272K 输入为 0.2。OpenRouter 增加 Kimi K3.1 Pro、MiniMax M3.1 Flash、Nemotron 3.5 Super VL(付费 / 免费)和 Muse Wonder 的启动快照,在线目录仍按原有机制刷新。
|
|
29
|
+
|
|
30
|
+
## 套餐与额度
|
|
31
|
+
|
|
32
|
+
| 产品 | 当前档位 | 本次适配 |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| Kimi | Go / Plus / Pro / Max / Ultra | Plus 起有 Kimi Code;Pro 起有高速版及 1M 上下文。新套餐显示 5 小时和月总额度;旧套餐保留周窗口 |
|
|
35
|
+
| MiniMax M Plan | Go / Explore / Build | 三档均含 M3.1 Flash,Explore / Build 另含 H3 视频;沿用现有额度接口 |
|
|
36
|
+
| MiniMax Token Plan | Plus / Max / Ultra | 保留原套餐与查询 |
|
|
37
|
+
| OpenCode | Go / Go Plus | 补入新模型;月费为 $10 / $40,各模型额度不同 |
|
|
38
|
+
| 腾讯 Token Plan | 通用 / Hy,均有 Lite / Standard / Pro / Max | 补充 Hy 名称与 provider 别名,使用现有套餐归属统计 |
|
|
39
|
+
|
|
40
|
+
Kimi 解析器同时接受当前嵌套响应、camelCase / snake_case 用量字段和旧版计数。旧计数存在时优先使用计数,避免把同一响应中的零比例当成真实剩余额度;没有周字段的新套餐不会生成周窗口。`TIME_UNIT_MINUTE: 300` 正确归为 5 小时。
|
|
41
|
+
|
|
42
|
+
新增的 Kimi Coding Plan、MiniMax M Plan provider 按订阅分类,查询开关不改变计费分类;用户指定的 API 分类仍优先。现有 `kimi-code` 沿用订阅插件识别规则,通用 `kimi` / `minimax` provider 保留原有配置。
|
|
43
|
+
|
|
44
|
+
## 游标修复与升级
|
|
45
|
+
|
|
46
|
+
[#434](https://github.com/Han-1413141/dsh-cost-meter/issues/434) 由 [@shutongX](https://github.com/shutongX) 报告:紧凑、经典及收起侧栏的峰谷游标固定在各段中间。修复后,工作日游标在当前峰 / 谷半段内按时间移动,周末和节假日在整条轨道上移动;页面恢复可见时立即刷新。
|
|
47
|
+
|
|
48
|
+
目录迁移只添加新 ID、更新未被修改的旧默认价。手动价格、主动取消挂载和既有账本金额保留。价格目录用于费用匹配,推理模型配置仍由 DSH 管理。
|
|
49
|
+
|
|
50
|
+
## 官方来源
|
|
51
|
+
|
|
52
|
+
- [Kimi API 定价](https://platform.kimi.ai/docs/pricing/chat)、[国内报价](https://www.kimi.com/resources/kimi-k3-1-pro-pricing)、[国际报价](https://www.kimi.ai/zh-hans/resources/kimi-k3-1-pro-pricing)
|
|
53
|
+
- [Kimi Code 模型](https://www.kimi.com/code/docs/kimi-code/models.html)、[会员权益](https://www.kimi.com/code/docs/kimi-code/membership.html)
|
|
54
|
+
- [MiniMax API 定价](https://platform.minimax.io/docs/pricing/overview)、[国内定价](https://platform.minimax.cn/docs/pricing/overview)、[M Plan](https://platform.minimax.io/docs/m-plan/intro)
|
|
55
|
+
- [Qwen3.8 Flash](https://www.alibabacloud.com/help/en/model-studio/qwen3-8-flash)、[TokenHub 模型价格](https://intl.cloud.tencent.com/document/product/1300/78937)、[腾讯套餐](https://cloud.tencent.com/document/product/1823/130060)
|
|
56
|
+
- [OpenCode 按量价格](https://opencode.ai/v2/docs/console/models/)、[Go 价格与额度](https://opencode.ai/v2/docs/console/go/)、[OpenRouter 模型接口](https://openrouter.ai/api/v1/models)
|
|
57
|
+
|
|
58
|
+
## English
|
|
59
|
+
|
|
60
|
+
This update adds or corrects 32 provider-scoped records, including Kimi K3.1 Pro / Highspeed, MiniMax M3.1 Flash, direct Qwen3.8 Flash and Hy4 preview, current OpenCode Go / Zen additions and five OpenRouter snapshots. It also updates Kimi and MiniMax plan names, supports current and legacy Kimi quota payloads, and fixes stationary peak-period markers in all four legacy sidebar layouts. Migration preserves customized prices, deliberate unmounts and recorded charges. Public sources are linked above; the complete checked data is shipped in the two JSON catalogs.
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# 自定义余额:随机端口、局域网与 WorkBuddy2API
|
|
2
2
|
|
|
3
|
+
## 侧栏跳转链接
|
|
4
|
+
|
|
5
|
+
在“费用 → 额度”展开任一自定义余额条目,填写“跳转链接(可选)”(`dashboardUrl`)。链接可指向中转站账户、充值或控制台页面,使用完整 HTTP(S) 地址,不能包含用户名或密码。保存后,侧栏余额行或进度卡的名称旁显示跳转箭头;点击箭头打开新标签页,不触发余额刷新。各条目独立设置,留空时不显示链接。余额接口 URL、请求头和凭据不会被用作跳转链接。
|
|
6
|
+
|
|
3
7
|
## 跟随 DSH 随机端口
|
|
4
8
|
|
|
5
9
|
在 **设置 → 费用 → 额度 → 自定义 Provider 余额** 中,请求 URL 可以填写以单个 `/` 开头的路径:
|
|
@@ -63,6 +67,8 @@ HTTPS 和本机回环 HTTP 继续可用。访问 `http://192.168.1.20:8790` 等
|
|
|
63
67
|
|
|
64
68
|
## English setup
|
|
65
69
|
|
|
70
|
+
Each custom balance entry has an optional **Dashboard link** (`dashboardUrl`) under **Cost → Quotas**. Use a complete HTTP(S) account or billing URL without embedded credentials. The sidebar row and progress card show an arrow next to that entry's name; it opens a new tab without refreshing the balance. Leave it blank to omit the link. Query URLs, headers and credentials are never used to construct navigation links.
|
|
71
|
+
|
|
66
72
|
Root-relative URLs such as `/plugins/dsh-workbuddy-connect/status` follow the running DSH web server's actual port. Independent WorkBuddy2API deployments use an absolute URL. Non-loopback HTTP requires both `allowInsecureHttp: true` and an exact `host:port` in `allowedHosts`; this explicitly permits plaintext transport. Redirects remain blocked.
|
|
67
73
|
|
|
68
74
|
The **+ WorkBuddy2API credits** preset reads `GET /api/credits/expiry?package_limit=1` with an admin `X-Admin-Token` stored as `WORKBUDDY2API_ADMIN_TOKEN` in DSH credentials. Set the real server address and matching allowlist, update expired admin tokens, then enable the card. The displayed `summary.available_remaining` is the active account pool's available credits, not currency, a single model API key's allowance, or the incomplete expiry snapshot total. No model request or upstream credit-refresh task is triggered. Authentication was tested with synthetic responses, not a live account.
|
package/docs/display-settings.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# 显示设置预览
|
|
2
2
|
|
|
3
|
+
在“费用 → 显示 → 侧栏”打开“隐藏进度条,仅显示紧凑文本”,可去掉峰谷时段、套餐额度、余额、预算和模型占比的图形条。额度保留窗口名与百分比,峰谷保留当前时段、倒计时和切换时间;悬停详情、点击刷新与超额警告仍可使用。偏好会保存,重启后保留。此选项只影响侧栏和侧栏预览,不改变用量查询、账本、计价、输入区额度条或原有布局/条形方向;关闭后恢复原样式。在峰谷组件里仍可选择只显示倒计时或切换时间。
|
|
4
|
+
|
|
5
|
+
**Compact text:** In **Cost → Display → Sidebar**, enable **Hide progress bars, show compact text** to hide sidebar pricing-period, quota, balance, budget and model-share bars. Window labels, percentages, period times, hover details, refresh actions and warnings remain available. The preference survives restart, applies to the sidebar preview, and never changes billing, account queries, composer bars or the saved graphical style. Disable it to restore the existing bars.
|
|
6
|
+
|
|
7
|
+
在“费用 → 额度”展开自定义余额条目,可设置“跳转链接(可选)”。填写账户、充值或控制台的 HTTP(S) 地址后,侧栏该条余额名称旁显示跳转箭头;余额行、进度卡和查询失败提示均可使用。点击箭头在新标签页打开,不触发余额刷新。每条链接独立保存,留空时不显示箭头;不从余额查询接口或请求头推导链接。
|
|
8
|
+
|
|
9
|
+
选择“侧栏 → 调整组件 → 余额”,可开启“仅官方渠道显示”(`balance.officialChannelOnly`,默认关闭)。开启后,侧栏官方余额只在当前会话使用 `deepseek`、`deepseek-official` 或 `deepseek-account` 渠道时显示;带 `llm-` 前缀的名称按相同渠道识别。无活跃会话或宿主未提供渠道投影时,按今日账本是否有官方渠道调用判断,包括零费用调用。当前会话明确使用其他渠道时,即使今天调用过官方渠道也隐藏;切换渠道后下一次调用更新显示。设置页官方余额面板和显示预览不受渠道限制,“隐藏官方余额”、显示位置与来源标注继续独立生效。
|
|
10
|
+
|
|
3
11
|
会话列表行末金额默认关闭。在“侧栏 → 调整组件 → 会话列表金额”打开“显示此组件”,选择累计或今日。金额沿用显示币种、精度与汇率设置;没有记录显示“—”,悬停查看输入、缓存和输出 Token。仅合并查询当前可见行,结果缓存五秒,显示期间每十秒刷新;关闭功能或隐藏页面时停止定时查询,收起为图标侧栏时不显示。
|
|
4
12
|
|
|
5
13
|
关闭输入框上方的 Codex 额度条:选择“输入区 → 调整组件 → Codex 额度”,取消“在输入区显示 Codex 额度”。该开关与侧栏额度独立,不影响预算、Go 或其他套餐的额度条;两个 Codex 显示位置都隐藏时停止查询。
|
|
@@ -34,7 +42,7 @@ Codex 额度的真实数据来自已启用并登录的 `dsh-codex-subscription`
|
|
|
34
42
|
|
|
35
43
|
选中峰谷时段后,右侧以三张紧凑的实际效果卡片展示进度条、细条和分段样式,复用侧栏呈现函数,包含当前时段文字、橙蓝轨道和倒计时。蓝色边框和“已选”标明当前选择,样式说明放在悬停提示中,点击后立即更新左侧预览。右侧收窄并减少内边距和重复说明;桌面设置保持左侧预览、右侧调整,与其他组件使用相同的窄屏换行条件。显示时间的完整选项放在右侧卡片下方。预览中超长的时段文字以省略号收起,保留可见轨道,悬停或键盘聚焦可读取完整说明。样式示例只渲染峰谷组件,不挂载余额、额度和模型卡片,也不会把示例开关写入配置。
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
1.9.43 起,五个显示介绍合并为一个可关闭的首次提示,统一指向「设置 → 费用 → 显示」。已有任一介绍的已读记录会抑制新提示;关闭不会修改显示、查询或计费偏好。峰谷三种布局及预览仍可随时在显示设置中选择,原细条和分段样式保留。预览只读取配置和本机时间,不查询余额、不发送模型请求、不改变计价或历史记录。界面按需加载,页面隐藏时停止刷新,关闭组件时清理定时器和监听器。
|
|
38
46
|
|
|
39
47
|
“费用 → 显示”提供“跟随皮肤透明度”,默认关闭。开启后,费用页共用设置窗口的背景,统计正文不再另铺实心底色;费用明细、引导、提醒与下拉浮层使用皮肤层色,保留至少 90% 不透明度。关闭后立即恢复不透明遮挡效果。该开关只修改插件自己的界面,保存后重启仍生效。
|
|
40
48
|
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# 官方价格币种保护与历史核对
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
官方页面可能只解析出部分模型。此前,从人民币价格切换到美元价格时,部分同步会保留未返回模型的旧数值,却把整张价目表的币种改为美元;展示为人民币时又乘一次汇率。v1.9.42 在这种情况下拒绝整个同步,保留原配置及价格历史。完整同步和不改变币种的部分同步仍可正常工作。
|
|
6
|
+
|
|
7
|
+
这项保护防止新的错误计价,**不会把已有账本改成推测金额**。仅凭导出的费用报表,不能确认原价格配置、所有历史版本或另一个插件的统计范围。另一插件显示的总额也不等于供应商结算凭证。
|
|
8
|
+
|
|
9
|
+
### 安全核对顺序
|
|
10
|
+
|
|
11
|
+
1. 保留原始导出、完整账本和会话日志的只读备份,不删除迁移标记,不清空账本。费用导出是核对报表,不是可以覆盖 `ledger.json` 的备份。
|
|
12
|
+
2. 在“费用 → 价格”核对受影响**渠道+模型**的币种、缓存命中/未命中及输出单价、倍率、峰谷和上下文档位。另一个插件必须使用同一时间范围、渠道、子代理范围和计费口径才能对比。
|
|
13
|
+
3. 正确保存未来调用的价格;若同步提示模型不完整,保留原值并检查官方页面,不能仅修改币种标签来强行同步。
|
|
14
|
+
4. 仅在确认当前单价适用于所选渠道模型的全部保留历史后,使用[按模型重算历史费用](model-history-repricing.md)的明确确认流程。系统先备份账本,再记录重算范围、前后金额和价格版本;调用 Token、原汇率及其他模型不变,日志不完整的记录跳过。
|
|
15
|
+
5. 若只有某一时段的价格异常,而其他时段有真实价格变化,**不要用当前价格覆盖整个模型历史**。应先依据原始配置/价格历史与日志核对分段范围,确认修复方案后再操作。当前模型重算入口不是按时间段修复工具。
|
|
16
|
+
|
|
17
|
+
升级与价格同步本身均不执行第 4 步。未得到可靠来源确认前,保留“金额待核对”的结论比强行凑成某个总额更安全。
|
|
18
|
+
|
|
19
|
+
## English
|
|
20
|
+
|
|
21
|
+
A partially parsed official page previously could keep omitted models' CNY numbers while changing the whole table's currency to USD. Converting those charges to CNY then multiplied them by the exchange rate again. Version 1.9.42 rejects that entire cross-currency synchronization, preserving configuration and pricing history. Complete synchronization and same-currency partial updates remain supported.
|
|
22
|
+
|
|
23
|
+
This protection does not rewrite recorded charges. Keep read-only copies of the original export, complete ledger and session logs. An export is a report, not a replacement ledger. Compare the same time range, channel, model, subagent scope, cache rates, multipliers and pricing tiers; another plugin's total is not an authoritative invoice.
|
|
24
|
+
|
|
25
|
+
Correct future pricing first. Use the explicitly confirmed [channel/model history recalculation](model-history-repricing.md) only when those current rates are appropriate for all retained calls in the selected scope. That path creates a full backup, records before/after totals and retains original exchange rates; incomplete logs are skipped. It is not an interval-specific repair tool. If only one historical interval is wrong, verify the original pricing versions and affected interval before authorizing a scoped repair. Updating the plugin or synchronizing prices never starts historical recalculation automatically.
|
|
@@ -23,3 +23,37 @@ GitHub Actions 工作流 `plugin-compatibility-watch` 每日北京时间 08:23
|
|
|
23
23
|
| dsh-codex-connect | 0.2.0-alpha.10 | 宿主依赖与状态路由变化,状态读取使用同一账号快照。新增实际发布包检查,执行原版额度解析器、公开状态类与 GET 路由,覆盖读取期间切换账号、下一次刷新、登录失效、额度失败、401/403 拒绝、405 方法限制与卸载清理。 |
|
|
24
24
|
|
|
25
25
|
基线更新为 `0.1.206 / 3.1.6 / 0.2.0-alpha.10`,保存对应发布包的 SHA-512 完整性。Connect 的账号、认证和额度服务使用本地模拟对象;原版插件初始化、OAuth 登录与外部模型请求没有执行。检查入口为 `test/codex-connect-published.mjs`,通过 `DSH_TEST_CONNECT_PACKAGE` 指定已下载的 npm 压缩包。
|
|
26
|
+
|
|
27
|
+
2026-10-26 已验证 `billion-context@0.1.208` 与 `dsh-codex-subscription@3.1.7`,处理 `github-actions[bot]` 的 [#416](https://github.com/Han-1413141/dsh-cost-meter/issues/416)、[#417](https://github.com/Han-1413141/dsh-cost-meter/issues/417)。前者接口指纹未变,实际发布包的四协议计费、压缩、重试、父子会话、历史回放与原版 CLI 自动接入检查通过。后者 RPC 分发变化涉及语音取消、错误分类及切换账号后的模型目录初始化,`usage/read` 分支未变;实际发布包的单周、双窗口、强制刷新与失败回退检查通过。两版加入 CI,保留旧版本及 Connect 基线。
|
|
28
|
+
|
|
29
|
+
## 2026-10-28:Codex Subscription 实际发布包复核
|
|
30
|
+
|
|
31
|
+
复核 `github-actions[bot]` 在 [#430](https://github.com/Han-1413141/dsh-cost-meter/issues/430) 报告的接入指纹变化。Issue 最后报告 `3.1.9`,处理时 [npm 官方 latest 元数据](https://registry.npmjs.org/dsh-codex-subscription/latest) 已是 `3.2.0`。下载并逐包核对官方 SHA-512,保留 `3.1.7` 对照,同时验证 `3.1.8`、`3.1.9` 和 `3.2.0`;通过运行回归后才把 Subscription 基线提升为 `3.2.0`,不改其他插件基线。
|
|
32
|
+
|
|
33
|
+
| 版本 | 与前版的接入差异 | 运行结论 |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| [3.1.8](https://registry.npmjs.org/dsh-codex-subscription/3.1.8) | 宿主依赖范围变化;四个被监控函数的语法指纹不变。新增默认推理强度等功能不改变 `usage` → `usageReader.read`。 | 额度接入兼容。 |
|
|
36
|
+
| [3.1.9](https://registry.npmjs.org/dsh-codex-subscription/3.1.9) | 传输和 RPC 分发新增 native-voice 路由及本机 Origin 限制;额度路径仍为同源 `/api/codex-subscription/usage`。 | 额度解析、读取和失败回退兼容;无需修改费用插件运行时代码。 |
|
|
37
|
+
| [3.2.0](https://registry.npmjs.org/dsh-codex-subscription/3.2.0) | RPC 新增输入预测;额度解析器及 `usage` 分发分支不变,但实际 reader 改成按调用方管理共享请求的取消。 | 两个调用方中一个取消不会影响另一个;全部取消或清缓存会中止旧请求,后续读取不接收旧缓存。 |
|
|
38
|
+
|
|
39
|
+
监控额外纳入 `createCodexUsageReader` 指纹,并用合成回归确认:即使额度字段、解析器和 RPC 均未改变,reader 单独变化也会报告。它仍是变更提示,不能替代运行测试。
|
|
40
|
+
|
|
41
|
+
原测试把发布包的所有函数声明放进 VM;`3.1.9` 新增的、与额度无关的 remote-history 函数包含 `import.meta`,导致测试脚本先报语法错误。现仅运行审阅过的额度相关原版声明,不改写上游函数,不执行插件初始化、登录、模型、语音或远程控制功能。
|
|
42
|
+
|
|
43
|
+
`test/codex-subscription-published.mjs` 现在覆盖:
|
|
44
|
+
|
|
45
|
+
- 原版解析器的默认时间、单周、5h/周双窗口、0%/100%、缺失和非法字段、未知窗口,以及敏感字段不进入浏览器投影。
|
|
46
|
+
- 原版 `createCodexUsageReader`、RPC 分发和传输直至本插件解析:默认缓存、强制刷新、缓存过期、结果克隆、并发共享、切换账号清缓存,以及认证与凭据快照不一致时重读。
|
|
47
|
+
- 缺失登录、过期登录、401/403、429 `Retry-After`、错误正文脱敏;强制刷新不会绕过上游失败冷却。凭据仅为测试字符串,费用插件调用载荷只有 `{ force }`,不转发 Bearer 或账号 ID。
|
|
48
|
+
- 真实宿主 `HostConnectionService` 的认证/Origin 拒绝、POST 路由、非法 JSON/信封/批量请求、卸载与部分注册失败清理;支持独立 Peer 的宿主另验非 owner 拒绝。
|
|
49
|
+
- `subscription` 数据源从配置保存、宿主 schema 到浏览器解析的往返,以及默认 `auto` / 关闭状态。另跑现有客户端回归确认失败后的自动回退与旧来源竞态隔离。
|
|
50
|
+
|
|
51
|
+
本地矩阵:`3.1.2 / 3.1.4 / 3.1.6 / 3.1.7 / 3.1.8 / 3.1.9 / 3.2.0` × 真实 `dsh-client-connection@0.2.0-rc.1 / 0.2.1-rc.3`,共 14 次通过。CI 两个既有宿主任务均保留旧版本并加入三个新版本。测试在 Linux 执行,验证的是跨平台的原版 JavaScript 额度接入,不宣称实际 Windows 桌面/OAuth 已端到端验证。实际账户及付费模型请求均为 0;这不是对上游插件其他功能的完整认证。
|
|
52
|
+
|
|
53
|
+
复现(`DSH_TEST_NODE_MODULES` 指向已安装的测试宿主,`DSH_TEST_CODEX_PACKAGE` 指向核对完整性的官方 npm 压缩包):
|
|
54
|
+
|
|
55
|
+
```sh
|
|
56
|
+
DSH_TEST_NODE_MODULES=/path/to/host/node_modules \
|
|
57
|
+
DSH_TEST_CODEX_PACKAGE=/path/to/dsh-codex-subscription-3.2.0.tgz \
|
|
58
|
+
node test/codex-subscription-published.mjs
|
|
59
|
+
```
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
# 2026-10 模型价格目录与渠道选择 / Model pricing and routes
|
|
2
2
|
|
|
3
|
-
核对日期 / Checked: 2026-10-
|
|
3
|
+
核对日期 / Checked: 2026-10-28
|
|
4
4
|
|
|
5
5
|
## 中文
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
### 10 月 28 日更新
|
|
8
|
+
|
|
9
|
+
最新补充、套餐变更和来源见 [更新明细](catalog-2026-10-28.md)。当前 OpenCode 端点已按 10 月 28 日页面核对:Zen 83 个、Go 30 个;下文的 10 月 15 日数量和价格差异保留为当日记录。当前 Zen GPT-6.1 Sol 缓存读已为 $0.10,超过 272K 输入为 $0.20。
|
|
10
|
+
|
|
11
|
+
此前针对 #224 补齐 GPT-6 Sol/Luna、GPT-6.1 Sol、Gemini 3.8 Flash、Claude Fable 5.1、Opus 5.5 等模型,并按公开价格页面扩充其他模型。内置第三方目录包含 358 个「厂商 / 模型」条目、223 个不同模型 ID(含官方别名和历史快照 ID);其中 353 条有可执行价格,5 条明确未核价。DeepSeek 主表单独保留。OpenRouter 在启动及小时级定时检查时按跨重启的一小时冷却补充本渠道模型,失败或中断也保留冷却;手动同步仍可立即执行。静态目录的数量不是在线目录的上限。
|
|
8
12
|
|
|
9
13
|
### 10 月 15 日更新
|
|
10
14
|
|
|
@@ -15,8 +19,8 @@ Haiku 5.5 按 100,000 输入 Token 分档,缓存读取和写入也计入阈值
|
|
|
15
19
|
### 先选渠道,再选模型
|
|
16
20
|
|
|
17
21
|
- `openai`、`anthropic`、`google`、`xai`、`mistral`、`z-ai` 使用各自直接 API 的价格。已知厂商不会自动套用另一厂商的模型价
|
|
18
|
-
- `opencode-zen` 是本次明确区分的 **Zen
|
|
19
|
-
- `opencode-go` 使用 **Go 订阅参考价**,覆盖全部
|
|
22
|
+
- `opencode-zen` 是本次明确区分的 **Zen 按量渠道**,覆盖当前端点表全部 83 个模型(另外保留 13 个历史 ID)
|
|
23
|
+
- `opencode-go` 使用 **Go 订阅参考价**,覆盖全部 30 个模型(另外保留 11 个历史 ID);这些价格用于额度和等值费用估算,不代表每次请求额外扣款
|
|
20
24
|
- 为兼容本项目历史宿主配置,`zen` / `opencode` 仍按 Go 别名处理;用户在原渠道手写的价格条目及显式映射优先。按量 Zen 请选择 `opencode-zen` 的价格条目,不要依靠历史别名猜测。这是价格渠道键,不会创建宿主推理 Provider;宿主仍使用历史名字时,可显式映射到 `opencode-zen:<模型 ID>`,并把该宿主模型的 Plan/API 分类指定为 API。模型级 Plan/API 覆盖仍优先于自动分类
|
|
21
25
|
- 缺失渠道的旧宿主兼容推断只保留旧 Go 模型集合,并且要求该模型仍在 Go 渠道表中。新增目录条目不会仅因同名就把 API 消费变成订阅
|
|
22
26
|
- `openrouter` 使用完整模型 ID 精确匹配。`:free` / `:online` 等变体、其他路由及本地模型不会借用其价格
|
|
@@ -44,9 +48,9 @@ Haiku 5.5 按 100,000 输入 Token 分档,缓存读取和写入也计入阈值
|
|
|
44
48
|
|
|
45
49
|
## English
|
|
46
50
|
|
|
47
|
-
The third-party catalog now contains
|
|
51
|
+
The third-party catalog now contains 358 provider/model entries and 223 distinct model IDs, including official aliases and dated snapshots: 353 executable prices and 5 explicitly unpriced entries. The separate DeepSeek table remains intact. OpenRouter startup and hourly checks share a persistent one-hour cooldown, including after failures or interrupted downloads. Manual synchronization can refresh immediately.
|
|
48
52
|
|
|
49
|
-
Use direct vendor IDs for their own API prices, `opencode-zen` for all
|
|
53
|
+
Use direct vendor IDs for their own API prices, `opencode-zen` for all 83 currently published Zen PAYG endpoints, and `opencode-go` for all 30 currently published Go subscription-reference endpoints. Historical host IDs `zen` / `opencode` retain their Go meaning; manually entered prices and explicit mappings win. These are pricing keys, not newly registered inference providers. If a PAYG host uses a historical name, explicitly map its model to `opencode-zen:<model ID>` and set that host model’s Plan/API class to API. A model-level Plan/API override remains authoritative. Catalog growth does not infer new subscription usage from a bare model name.
|
|
50
54
|
|
|
51
55
|
Prices are USD per million tokens. Cache reads/writes and per-request context tiers are separate. OpenAI thresholds count complete input, including cached tokens; xAI's direct 200K boundary is inclusive while Zen's is exclusive. Claude generic cache writes use the published 5-minute tier; 1-hour TTL, Gemini cache storage charged per token-hour, modality-specific prices, tool fees and special processing tiers need separate accounting. Go's DeepSeek tiers use its UTC weekday schedule, not direct DeepSeek's Beijing holiday calendar.
|
|
52
56
|
|