dsh-cost-meter 1.9.15 → 1.9.16
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 +33 -22
- package/README.zh-CN.md +33 -22
- package/docs/display-settings.md +8 -2
- package/docs/qwen-cli-quota.md +2 -0
- package/docs/update-notes-1.9.16.md +67 -0
- package/docs/web-request-fees.md +3 -3
- package/lib/backfill.js +1 -1
- package/lib/client.display.js +3 -3
- package/lib/client.js +6 -5
- package/lib/client.peak.js +3 -3
- package/lib/client.pricing.js +3 -3
- package/lib/client.sidebar-order.js +12 -0
- package/lib/client.statistics.js +8 -8
- package/lib/index.js +3 -0
- package/lib/native-search-billing.js +23 -10
- package/lib/native-search-events.js +4 -2
- package/lib/native-search-history.js +2 -1
- package/lib/our-free-model.js +18 -0
- package/lib/plan-billing.js +2 -1
- package/lib/pricing.js +1 -0
- package/lib/qwen-cli.js +11 -7
- package/lib/store.js +19 -9
- package/lib/turn-cost.js +3 -0
- package/lib/typert.host.js +8 -3
- package/lib/web-request-pricing.js +24 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -1,46 +1,57 @@
|
|
|
1
1
|
# dsh-cost-meter
|
|
2
2
|
|
|
3
|
-
**English** | [简体中文](README.zh-CN.md)
|
|
4
|
-
|
|
5
|
-
Community and feedback: [Join the WeChat group →](#community). The WeChat group is open. You're welcome to join.
|
|
3
|
+
**English** | [简体中文](README.zh-CN.md) · [Install](#installation) · [Features](#feature-overview) · [Screenshots](#screenshots--walkthrough) · [Community](#community)
|
|
6
4
|
|
|
7
5
|
<div align="center">
|
|
8
6
|
|
|
9
7
|
**Session cost tracking plugin for the DeepSeek Harness web GUI (bilingual UI)**
|
|
10
8
|
|
|
9
|
+
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
|
+
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
|
+
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
14
|
+
[](https://awesome-dsh-plugin.com)
|
|
15
|
+
[](https://whaleharness.com/audit-report.md)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
**v1.9.16** distinguishes legacy and new DeepSeek search, adds a combined sidebar card and free-model billing options, and fixes quota settings, quota details and peak-alert visibility.
|
|
20
|
+
|
|
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
|
+
|
|
23
|
+
Release notes: [v1.9.16](docs/update-notes-1.9.16.md#english). Fully restart DSH after updating.
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>Full feature summary and preview</summary>
|
|
27
|
+
|
|
11
28
|
Per-conversation cost · daily totals · OpenCode Go subscription quota display · budget with usage percentage · official account balance · custom provider balance · balance progress bar · history · peak/off-peak pricing hours display (peak hours UTC 01:00–04:00, 06:00–10:00; weekends and Chinese public holidays are off-peak all day, with separate labels) · pre-switch popup & system-notification alerts for peak/off-peak changes (position / lead time / alert type configurable) · one-click price sync from the official docs · Codex-style token usage heat grid · multi-vendor model pricing (built-in 170+ model-ID catalog with auto-matching) · mainstream Coding Plan quota queries & display (Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / Cline Pass / SCNet / Volcano Ark / Qwen / Xiaomi MiMo / Factory Droid) plan/API dual-track billing (subscription quota vs pay-as-you-go money separated, per-1% & full-window token/equivalent-cost estimates with daily/weekly/monthly curves) · subscription plugin compatibility (Codex / ChatGPT subscription plans) · mobile layout (dsh-pocket) · quota strip above the input box (budget / Go / coding-plan usage in one row, toggleable)
|
|
12
29
|
|
|
13
|
-
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
</details>
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary>Compatibility, configuration and troubleshooting</summary>
|
|
14
36
|
|
|
15
37
|
**Minimum supported host: DSH 0.2.0.** The plugin declares the floor in `engines.dsh`, the host's admission gate for plugins, and no longer supports any DSH 0.1.x release; the adaptation target is the npm `next` release **0.2.1-rc.2**. Exact ranges and how the host reads them: [compatibility declaration](docs/dsh-0.2.1-compatibility.md#english).
|
|
16
38
|
|
|
17
39
|
Supports [official Search/Fetch request fees](docs/web-request-fees.md#english), separately from model tokens.
|
|
18
40
|
|
|
19
|
-
**v1.9.15** adds an optional “Follow skin transparency” switch under Cost → Display, and supports Cline Pass quota in a single card with 5-hour, weekly and monthly windows.
|
|
20
|
-
|
|
21
41
|
Configuration and verification: [OpenDesign queries](docs/opendesign-billing.md), [dynamic ports / LAN / WorkBuddy2API setup](docs/custom-balance-sources.md), and [opacity fixes with performance measurements](docs/performance-2026-10-18.md).
|
|
22
42
|
|
|
23
|
-
|
|
24
43
|
Desktop users: follow the [Desktop installation instructions](docs/install-troubleshooting.md#desktop-安装与更新) for the application's own CLI and `desktop` Profile.
|
|
25
44
|
|
|
26
|
-
Release notes: [v1.9.15](docs/update-notes-1.9.15.md#english). Fully restart DSH after updating.
|
|
27
|
-
|
|
28
45
|
Host records inside the declared range, and the earlier 0.1.x history, are in the [compatibility record](docs/host-compatibility.md); the per-release list lives in `package.json` (`dsh.compatibility.dshReleases`).
|
|
29
46
|
|
|
30
47
|
If startup reports **Ledger is busy** and the cost widgets are missing, see [ledger lock recovery](docs/ledger-lock-recovery.md#english).
|
|
31
48
|
|
|
32
|
-
[
|
|
33
|
-
[](LICENSE)
|
|
34
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
35
|
-
[](https://awesome-dsh-plugin.com)
|
|
36
|
-
[](https://whaleharness.com/audit-report.md)
|
|
49
|
+
Community and feedback: [Join the WeChat group →](#community). The WeChat group is open. You're welcome to join.
|
|
37
50
|
|
|
38
|
-
</
|
|
51
|
+
</details>
|
|
39
52
|
|
|
40
53
|
---
|
|
41
54
|
|
|
42
|
-

|
|
43
|
-
|
|
44
55
|
## Feature overview
|
|
45
56
|
|
|
46
57
|
| Feature | Location | Description |
|
|
@@ -341,22 +352,22 @@ On Node.js 20, use `npm install -g pnpm@10` instead. See [pnpm installation and
|
|
|
341
352
|
dsh plugin --profile web add dsh-cost-meter
|
|
342
353
|
```
|
|
343
354
|
|
|
344
|
-
**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.
|
|
355
|
+
**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.16`** — review the script before running):
|
|
345
356
|
|
|
346
357
|
```powershell
|
|
347
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.16/install.ps1 | iex
|
|
348
359
|
```
|
|
349
360
|
|
|
350
361
|
**Or a plain command line** (the machine must already have pnpm and git; also pinned to the tag):
|
|
351
362
|
|
|
352
363
|
```sh
|
|
353
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.16
|
|
354
365
|
```
|
|
355
366
|
|
|
356
367
|
Without git, use the GitHub tag archive:
|
|
357
368
|
|
|
358
369
|
```sh
|
|
359
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.16.tar.gz
|
|
360
371
|
```
|
|
361
372
|
|
|
362
373
|
After installing, **restart** `dsh web` (plugin rows, the Typert manifest and the client bundle are all scanned at startup):
|
|
@@ -421,7 +432,7 @@ Workarounds:
|
|
|
421
432
|
|
|
422
433
|
```yaml
|
|
423
434
|
minimumReleaseAgeExclude:
|
|
424
|
-
- dsh-cost-meter@1.9.
|
|
435
|
+
- dsh-cost-meter@1.9.16
|
|
425
436
|
```
|
|
426
437
|
|
|
427
438
|
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
|
@@ -1,46 +1,57 @@
|
|
|
1
1
|
# dsh-cost-meter
|
|
2
2
|
|
|
3
|
-
[English](README.md) | **简体中文**
|
|
4
|
-
|
|
5
|
-
交流与反馈:[加入微信交流群 →](#交流与反馈) · 微信交流群已开放,欢迎您加入。
|
|
3
|
+
[English](README.md) | **简体中文** · [安装](#安装) · [功能](#功能总览) · [图文演示](#图文演示) · [交流群](#交流与反馈)
|
|
6
4
|
|
|
7
5
|
<div align="center">
|
|
8
6
|
|
|
9
7
|
**DeepSeek Harness 会话费用统计插件(界面中英双语)**
|
|
10
8
|
|
|
9
|
+
[](https://github.com/Han-1413141/dsh-cost-meter)
|
|
10
|
+
[](https://www.npmjs.com/package/dsh-cost-meter)
|
|
11
|
+
[](https://dshfind.com/zh/plugins/Han-1413141/dsh-cost-meter?ref=badge)
|
|
12
|
+
[](LICENSE)
|
|
13
|
+
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
14
|
+
[](https://awesome-dsh-plugin.com)
|
|
15
|
+
[](https://whaleharness.com/audit-report.md)
|
|
16
|
+
|
|
17
|
+
</div>
|
|
18
|
+
|
|
19
|
+
**v1.9.16** 区分新旧 DeepSeek 搜索,增加合并侧栏卡片和免费模型计费选项,并修复额度设置、额度详情与峰价提醒遮挡。
|
|
20
|
+
|
|
21
|
+
**宿主要求:DSH 0.2.0 起支持** · 适配目标 **0.2.1-rc.2**(npm `next`)。完整声明、历史记录与安装排障见下方展开项。
|
|
22
|
+
|
|
23
|
+
更新说明:[v1.9.16](docs/update-notes-1.9.16.md#中文)。更新后完全重启 DSH。
|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>完整功能介绍与宣传图</summary>
|
|
27
|
+
|
|
11
28
|
本会话费用 · 当日费用 · OpenCode Go 订阅额度显示 · 预算与已用百分比 · 官方账户余额 · 自定义 Provider 余额查询(可配任意 HTTP 端点) · 余额三段进度条 · 历史记录 · 峰谷计价时段显示(UTC 01:00–04:00、06:00–10:00 为峰时段;周末与中国法定假日全天按谷价,分别标注) · 峰/谷切换前弹窗与系统通知提醒(位置/提前量/提醒类型可配) · 官方价格一键同步 · 类 Codex Token 用量热图 · 多厂商多模型价格计费(内置 170+ 模型 ID 价格目录与自动匹配) · 主流 Coding Plan 额度查询与显示(Anthropic / Z.ai / MiniMax / Kimi / OpenRouter / SiliconFlow / CommandCode / Cline Pass / SCNet / 火山方舟 / 千问 / 小米 MiMo 十二家,含 Volcano Ark AK/SK 签名与 MiMo 控制台 Cookie 查询) · Plan/API 双轨计费(订阅额度与按量金额分离统计,每 1% 额度与满窗的 token/等值金额估算及日/周/月曲线) · 订阅插件兼容(Codex / ChatGPT 订阅) · 手机端适配(dsh-pocket) · 输入框上方额度横条(预算/Go/Coding Plan 用量一条横排显示,可开关)
|
|
12
29
|
|
|
13
|
-
|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
</details>
|
|
33
|
+
|
|
34
|
+
<details>
|
|
35
|
+
<summary>兼容、配置与排障说明</summary>
|
|
14
36
|
|
|
15
37
|
**最低支持宿主:DSH 0.2.0。** 插件把下限声明在 `engines.dsh`(宿主准入插件的闸门),不再支持任何 DSH 0.1.x 版本;本轮适配目标为 npm `next` 标签的 **0.2.1-rc.2**。具体范围与宿主的读取方式见[兼容声明](docs/dsh-0.2.1-compatibility.md#中文)。
|
|
16
38
|
|
|
17
39
|
新增 [DeepSeek Search/Fetch API 次数费](docs/web-request-fees.md#中文),只计有结果的成功请求,并将网页抓取独立分类。
|
|
18
40
|
|
|
19
|
-
**v1.9.15** 在“费用 → 显示”增加默认关闭的“跟随皮肤透明度”开关,并支持 Cline Pass 单卡片展示 5 小时、周与月额度。
|
|
20
|
-
|
|
21
41
|
配置与验证:[OpenDesign 查询说明](docs/opendesign-billing.md)、[随机端口 / 局域网 / WorkBuddy2API 配置](docs/custom-balance-sources.md)、[透明度修复与性能测量](docs/performance-2026-10-18.md)。
|
|
22
42
|
|
|
23
|
-
|
|
24
43
|
桌面端用户请按 [Desktop 安装说明](docs/install-troubleshooting.md#desktop-安装与更新),使用应用自带的 CLI 和 `desktop` Profile。
|
|
25
44
|
|
|
26
|
-
更新说明:[v1.9.15](docs/update-notes-1.9.15.md#中文)。更新后完全重启 DSH。
|
|
27
|
-
|
|
28
45
|
声明范围内的宿主记录与此前的 0.1.x 历史见[兼容记录](docs/host-compatibility.md);逐版本清单在 `package.json` 的 `dsh.compatibility.dshReleases`。
|
|
29
46
|
|
|
30
47
|
启动报 **Ledger is busy** 且费用卡片消失时,参见[账本锁恢复说明](docs/ledger-lock-recovery.md#简体中文)。
|
|
31
48
|
|
|
32
|
-
[
|
|
33
|
-
[](LICENSE)
|
|
34
|
-
[](https://github.com/deepseek-ai/deepseek-harness)
|
|
35
|
-
[](https://awesome-dsh-plugin.com)
|
|
36
|
-
[](https://whaleharness.com/audit-report.md)
|
|
49
|
+
交流与反馈:[加入微信交流群 →](#交流与反馈) · 微信交流群已开放,欢迎您加入。
|
|
37
50
|
|
|
38
|
-
</
|
|
51
|
+
</details>
|
|
39
52
|
|
|
40
53
|
---
|
|
41
54
|
|
|
42
|
-

|
|
43
|
-
|
|
44
55
|
## 功能总览
|
|
45
56
|
|
|
46
57
|
| 功能 | 位置 | 说明 |
|
|
@@ -341,22 +352,22 @@ Node.js 20 请改用 `npm install -g pnpm@10`。版本要求见 [pnpm 官方安
|
|
|
341
352
|
dsh plugin --profile web add dsh-cost-meter
|
|
342
353
|
```
|
|
343
354
|
|
|
344
|
-
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.
|
|
355
|
+
**PowerShell 一键脚本**(复制整行粘贴回车;自动补齐 pnpm、自动探测 git,无需克隆仓库;安装链**固定到发布 tag `v1.9.16`**,建议先下载审阅再运行):
|
|
345
356
|
|
|
346
357
|
```powershell
|
|
347
|
-
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.
|
|
358
|
+
irm https://raw.githubusercontent.com/Han-1413141/dsh-cost-meter/v1.9.16/install.ps1 | iex
|
|
348
359
|
```
|
|
349
360
|
|
|
350
361
|
**或直接命令行**(机器上需已有 pnpm 与 git;同样固定到 tag):
|
|
351
362
|
|
|
352
363
|
```sh
|
|
353
|
-
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.
|
|
364
|
+
dsh plugin --profile web add github:Han-1413141/dsh-cost-meter#v1.9.16
|
|
354
365
|
```
|
|
355
366
|
|
|
356
367
|
没有 git 时可用 GitHub tag 打包直链:
|
|
357
368
|
|
|
358
369
|
```sh
|
|
359
|
-
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.
|
|
370
|
+
dsh plugin --profile web add https://github.com/Han-1413141/dsh-cost-meter/archive/refs/tags/v1.9.16.tar.gz
|
|
360
371
|
```
|
|
361
372
|
|
|
362
373
|
安装后**重启** `dsh web`(插件行、Typert 清单与客户端 bundle 均在启动时扫描):
|
|
@@ -421,7 +432,7 @@ DSH **0.2.1-rc.1 / 0.2.1-rc.2** 宿主自带 pnpm **11.28.5**,默认启用内
|
|
|
421
432
|
|
|
422
433
|
```yaml
|
|
423
434
|
minimumReleaseAgeExclude:
|
|
424
|
-
- dsh-cost-meter@1.9.
|
|
435
|
+
- dsh-cost-meter@1.9.16
|
|
425
436
|
```
|
|
426
437
|
|
|
427
438
|
3. 仅本次操作用 CLI 透传 pnpm 参数:`dsh plugin --profile desktop remove dsh-cost-meter --config.minimum-release-age=0`;若只是 lockfile 校验阶段失败,可改用 `--trust-lockfile`。这两个参数已在本机 pnpm 11.28.5 临时 Profile 上实测可用。
|
package/docs/display-settings.md
CHANGED
|
@@ -10,9 +10,9 @@ Codex 额度的真实数据来自已启用并登录的 `dsh-codex-subscription`
|
|
|
10
10
|
|
|
11
11
|
预览分为侧栏、输入区和会话内容三个区域,使用正常字号,只渲染当前区域。点击虚线框,在右侧调整对应组件。示例模式下隐藏的组件保留淡化效果,方便再次选中;当前数据模式下未显示的组件保留淡色标签。组件菜单只列出可调整的组件,操作提示不再作为菜单选项。显示设置的更改自动保存。
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
右侧直接展示合并卡片、简洁、标准和紧凑四种样式的小预览,复用实际预算与多时段额度的进度卡片。小预览标记为样式示例,未配置的额度使用本地示例数值。紧凑样式将多时段额度排成两列,预算卡片保持完整。点击峰谷条可切换细条或分段样式;点击“今日金额 · 模型数”可调整模型卡片的展开、周期、摘要、位置、行数、Token 和费用占比条。预算、余额、会话费用和额度条的选项各自放在对应组件旁。金额格式、换算和语言集中在下方。宽窗口将样式缩略图横向排列,窄窗口再改为竖向;右侧面板在空间不足时排到预览下方。放大预览中按 Escape 返回。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
侧栏预览和真实侧栏共用完整的呈现函数与当前缓存数据,包含余额错误状态、独立的 Go 与预算卡片、预算摘要、今日用量和峰谷条、模型花费卡片。选择框使用独立覆盖层,不改变组件 DOM 层级和紧凑布局。打开时最多读取三个宿主表面的背景、圆角、字体等六项外观属性;主题属性变化时更新。共用插件组件、DSH 图标和主题变量,跟随这些外观的皮肤修改;其他插件的独立控件不重复挂载。
|
|
16
16
|
|
|
17
17
|
两种数据来源共用实际展示组件。示例状态只传给预览,不写入配置、余额、额度或账本,也不会启用账户查询或 Codex 探测。预览不复制会话内容,不遍历整页 DOM,不创建 iframe,不解码图片,不订阅会话投影。选择框只测量当前预览内最多 32 个标记节点,使用一个局部尺寸监听器;关闭时清理尺寸与主题监听器。异常组件由预览内部的错误边界隔离,仍可使用详细显示选项。
|
|
18
18
|
|
|
@@ -35,3 +35,9 @@ Codex 额度的真实数据来自已启用并登录的 `dsh-codex-subscription`
|
|
|
35
35
|
已开启峰谷计价且未隐藏峰谷显示的用户,更新后首次进入会看到一次介绍和三种布局预览。可以使用新进度条,也可以保留原样;关闭或选择后不再重复提示。原细条和分段样式保留。介绍中的预览只读取配置和本机时间,不查询余额、不发送模型请求、不改变计价或历史记录。新界面按需加载,页面隐藏时停止刷新,关闭组件时清理定时器和监听器。
|
|
36
36
|
|
|
37
37
|
“费用 → 显示”提供“跟随皮肤透明度”,默认关闭。开启后,费用页共用设置窗口的背景,统计正文不再另铺实心底色;费用明细、引导、提醒与下拉浮层使用皮肤层色,保留至少 90% 不透明度。关闭后立即恢复不透明遮挡效果。该开关只修改插件自己的界面,保存后重启仍生效。
|
|
38
|
+
|
|
39
|
+
“今日用量”右侧提供“费用”和“Token 用量”两个开关,至少保留一项;两项开启时金额与 Token 右对齐并列,空间不足时换行。选中“今日用量”后,两个子项各有虚线,点击对应虚线会定位到该项开关。
|
|
40
|
+
|
|
41
|
+
显示设置的侧栏预览与主界面侧栏都可使用左侧手柄拖动组件,拖到目标卡片的上半部或下半部决定放在前面或后面。手柄聚焦后也可用上下方向键移动。顺序保存到 `sidebarOrder`,重启、切换样式和暂时隐藏组件后保留;不同 Coding Plan 与网关卡片分别排序。Go 与预算使用独立卡片。原模型花费位置选项用于旧配置;手动使用该选项会清除拖动顺序并恢复原位置规则。
|
|
42
|
+
|
|
43
|
+
“合并卡片”将今日 Token 与费用、余额和峰谷进度放入同一外框。选择时默认开启今日双项显示,之后仍可分别关闭。Codex 组件提供额度查询总开关;显式开启其显示时会启用查询。页面中的“兼容提醒”开关控制 billion-context 自动弹窗,确认记录保存在账本,不依赖浏览器地址和端口。
|
package/docs/qwen-cli-quota.md
CHANGED
|
@@ -94,3 +94,5 @@ Bailian source verification (2026-09-23): [Token Plan output](https://github.com
|
|
|
94
94
|
Login source verification (2026-10-05): [auth status](https://github.com/modelstudioai/cli/blob/8bbbbc722d70fb200641ef22b6f6d033aeae9f74/packages/commands/src/commands/auth/status.ts), [console login](https://github.com/modelstudioai/cli/blob/8bbbbc722d70fb200641ef22b6f6d033aeae9f74/packages/commands/src/commands/auth/login-console.ts), [exit codes](https://github.com/modelstudioai/cli/blob/8bbbbc722d70fb200641ef22b6f6d033aeae9f74/packages/core/src/errors/codes.ts).
|
|
95
95
|
|
|
96
96
|
#260 源码核验:[个人订阅额度映射](https://github.com/QianWen-AI/qianwen-cli/blob/054b874c985021ab4424dcf2d7e01c28aa99ad23/src/services/tokenplan-service.ts)、[订阅 JSON 输出](https://github.com/QianWen-AI/qianwen-cli/blob/054b874c985021ab4424dcf2d7e01c28aa99ad23/src/view-models/subscription/shared.ts)。新增回归覆盖 issue 中的 `0.00169%`、月/周窗口、到期与格式错误、补查失败/超时/脱敏及缓存并发;未查询真实付费订阅账号。
|
|
97
|
+
|
|
98
|
+
订阅兜底查询的默认超时为 60 秒(普通 usage summary 仍为 15 秒),用于兼容 qianwen-cli 1.10 的 30–36 秒响应。显式传入 timeoutMs 时仍覆盖两条命令。超时提示说明 CLI 响应耗时,不再直接归因于网络。
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# v1.9.16
|
|
2
|
+
|
|
3
|
+
## 中文
|
|
4
|
+
|
|
5
|
+
### 按所选版本统计 DeepSeek 搜索
|
|
6
|
+
|
|
7
|
+
插件读取“插件 → 内置插件设置 → 网页搜索”对应的 `web.searchProvider` 与 `web.fetchProvider`。新版开关开启时为 `deepseek-search-api`/`deepseek-fetch-api`;关闭时为 `deepseek-official` 的 Messages 搜索和本地 HTTP 抓取。每次调用开始时保存选择,并依据实际请求接口确认版本。修改开关只影响后续调用。
|
|
8
|
+
|
|
9
|
+
根据 [DeepSeek 官方指南](https://api-docs.deepseek.com/zh-cn/guides/search/)(2026-10-19 核对),新版独立 Search/Fetch API 均为每 1,000 次成功请求 ¥5,仅 HTTP 200 且有搜索结果/正文时计费,结果条数不乘价。失败、空结果和超时不收费。
|
|
10
|
+
|
|
11
|
+
旧版 Messages 搜索保留真实模型 Token 费用。可确认的服务端成功搜索调用另列请求项目:北京时间 2026 年 11 月 1 日 00:00 前请求费为 0,此后每次 ¥0.005;未确认成功的调用不估补次数费。模型 Token 和搜索请求分别统计,不重复计入 Token。本地 HTTP 抓取保持无官方 API 次数费。统计详情标明旧版 Messages/新版 Search API/新版 Fetch API。
|
|
12
|
+
|
|
13
|
+
历史记录保留调用时的版本、请求单价和汇率,不因切换搜索设置改价。生产记录不保存搜索词、URL、正文或凭据。适配依据见 [DSH 官方设置控制器](https://github.com/deepseek-ai/deepseek-harness/blob/687f282e8625c6b8d11ff58211a90524be2e4317/packages/client/ui-settings-web-search/src/client/web-search-card-controller.ts)。
|
|
14
|
+
|
|
15
|
+
### 今日同时显示费用和 Token
|
|
16
|
+
|
|
17
|
+
在“费用 → 显示”选中“今日用量”,分别开启费用与 Token 用量,支持仅一项或同时显示。两项右对齐并列,窄侧栏自动换行;预览中两个子项各有虚线,点击可定位相应开关。
|
|
18
|
+
|
|
19
|
+
### 直接拖动侧栏组件
|
|
20
|
+
|
|
21
|
+
在显示设置预览或主界面侧栏,将组件左侧手柄拖到目标卡片上方或下方即可调整顺序;手柄聚焦后也可使用上下方向键。不同套餐和网关卡片可分别排序,Go 与预算分开显示。顺序自动保存,隐藏再显示、切换布局和重启后保留。保存失败时主侧栏保留原顺序并显示提示。
|
|
22
|
+
|
|
23
|
+
验证覆盖官方新版提供方固定源码、实际 DSH 服务注册与本地 HTTP 传输,旧版 Messages 真实用量、搜索开关快照、11 月 1 日时间边界、重启与历史回放,以及浏览器中的双项布局、子项虚线、两处拖放和失败处理。所有接口验证使用合成数据及本机服务器。
|
|
24
|
+
|
|
25
|
+
### 合并卡片、免费模型与提醒修复
|
|
26
|
+
|
|
27
|
+
在“费用 → 显示 → 侧栏布局”选择“合并卡片”,可以将今日 Token 放在标签旁、费用放在右侧,下方显示余额与一行峰谷信息、细进度条。原有简洁、标准和紧凑布局保留;隐藏组件、拖动排序和单项显示继续生效。首次更新提供一次介绍,关闭或选用后会保存记录。
|
|
28
|
+
|
|
29
|
+
检测到当前宿主启用了 `dsh-our-free-model` 后,“价格 → 按模型设置”提供“从此插件调用的所有模型按免费计算”开关,默认保持原计价。开启后,只对 `our-free-model` 和 `our-free-model-region` 两个实际渠道后续调用使用零单价,包括该插件的账号渠道;Token 照常记录,其他提供方与保存过的历史价格不变。关闭可恢复普通匹配与自定义计价。
|
|
30
|
+
|
|
31
|
+
Codex 的侧栏和输入区显示开关可以同时开启必要的额度查询,查询总开关也可直接修改;保存和重载保持一致。订阅插件已启用但查询关闭时,侧栏提供启用入口。设置页 Codex 与其他页签使用一致的内边距、高度和中线。
|
|
32
|
+
|
|
33
|
+
Go 的悬浮详情列出 5 小时、周、月三个窗口的用量和重置时间;未知额度显示“—”,0% 保留为真实数值。峰价提醒继续使用浏览器顶层,增加页面级后备挂载和低高度窗口滚动,确保“知道了”按钮可操作。
|
|
34
|
+
|
|
35
|
+
`billion-context` 提醒点击“知道了”后,将对应状态与版本的确认记录保存到账本。新增“不再弹出此提醒”,也可在“费用 → 显示 → 兼容提醒”关闭或恢复弹窗。关闭不影响兼容检测和页面中的状态说明;记录保留最近 32 个不同提醒。保存失败会显示错误并允许重试。
|
|
36
|
+
|
|
37
|
+
千问 CLI 普通查询保留 15 秒超时,订阅兜底查询单独使用 60 秒;仍支持调用方显式指定超时。新提示说明 CLI 的订阅查询可能超过 30 秒,并给出终端检查命令。感谢 @forkhala 在 [#349](https://github.com/Han-1413141/dsh-cost-meter/issues/349)、[#350](https://github.com/Han-1413141/dsh-cost-meter/issues/350) 提供计时、重启与账本对照复现,感谢 @orshih6 在 [PR #351](https://github.com/Han-1413141/dsh-cost-meter/pull/351) 提供千问分命令超时实现和测试。
|
|
38
|
+
|
|
39
|
+
更新后完全退出 DSH(包括托盘)再打开。
|
|
40
|
+
|
|
41
|
+
## English
|
|
42
|
+
|
|
43
|
+
### Distinguish legacy and new DeepSeek search
|
|
44
|
+
|
|
45
|
+
The plugin reads DSH’s `web.searchProvider` and `web.fetchProvider`, snapshots the selection at call start, and confirms the version from the actual endpoint. Legacy Messages search retains its real model-token charges. New standalone Search/Fetch calls cost CNY 5 per 1,000 successful requests: HTTP 200 with nonempty results or page content. Result count does not multiply the fee.
|
|
46
|
+
|
|
47
|
+
Observed successful server-side searches are free of request fees until November 1, 2026 at 00:00 Beijing time, then cost CNY 0.005 per request. Missing or failed calls do not receive invented fees. Local HTTP fetching has no official API request charge. Historical versions, rates and exchange rates remain attached to the original calls. See the [official rules](https://api-docs.deepseek.com/guides/search/).
|
|
48
|
+
|
|
49
|
+
### Today: cost, tokens or both
|
|
50
|
+
|
|
51
|
+
Select Today’s usage under Cost → Display and use its separate cost and token switches. Both values align to the right and wrap in narrow sidebars. Each preview sub-item has its own outline and focuses the matching control.
|
|
52
|
+
|
|
53
|
+
### Drag sidebar components
|
|
54
|
+
|
|
55
|
+
Drag the left handle in Display’s preview or the main sidebar, or focus a handle and use arrow keys. Each plan and gateway card can move independently; Go and Budget use separate cards. Order saves automatically and survives layout changes, hiding and restart. A failed save retains the main sidebar’s previous order.
|
|
56
|
+
|
|
57
|
+
### Combined sidebar, free-model billing and persistent reminders
|
|
58
|
+
|
|
59
|
+
Choose Combined card under Cost → Display → Sidebar layout. Today’s tokens and cost share a row, followed by balance and a thin pricing-period progress bar. Existing layouts, visibility controls and drag ordering remain available; the introductory dialog is shown once.
|
|
60
|
+
|
|
61
|
+
When the active host enables `dsh-our-free-model`, Pricing’s per-model settings offer an optional zero-price mode for future calls through `our-free-model` and `our-free-model-region`, including account channels. Tokens remain recorded. Other providers and stored historical prices keep their billing rules.
|
|
62
|
+
|
|
63
|
+
Codex visibility can enable quota queries, and its explicit query switch persists correctly. Disabled queries have a sidebar entry when the subscription plugin is active. Tabs share the same alignment and padding. Go tooltips show 5-hour, weekly and monthly usage and reset times. Peak reminders use the browser top layer, a body-level fallback and viewport-limited scrolling.
|
|
64
|
+
|
|
65
|
+
Billion-context acknowledgements now persist in the ledger, with a Do not show this reminder again action and a Display preference. Detection and status remain available when popups are muted. Qianwen keeps a 15-second summary timeout and uses 60 seconds for subscription fallback; errors identify slow CLI responses. Credits: @forkhala for [#349](https://github.com/Han-1413141/dsh-cost-meter/issues/349) and [#350](https://github.com/Han-1413141/dsh-cost-meter/issues/350), and @orshih6 for the timeout implementation and tests in [#351](https://github.com/Han-1413141/dsh-cost-meter/pull/351).
|
|
66
|
+
|
|
67
|
+
Validation uses pinned official provider sources, real DSH services and local synthetic HTTP responses, plus browser drag, layout, persistence and failure checks. Fully exit DSH, including its tray process, and reopen after updating.
|
package/docs/web-request-fees.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## 中文
|
|
4
4
|
|
|
5
|
-
v1.
|
|
5
|
+
v1.9.16 读取 DSH `web.searchProvider`/`web.fetchProvider`,按调用开始时的选择与实际接口区分旧版 Messages 搜索、新版 Search/Fetch API。原有官方 `POST /v1/tools/search` 和 `POST /v1/tools/fetch` 的次数费。根据 [官方指南](https://api-docs.deepseek.com/zh-cn/guides/search/)与[价格页](https://api-docs.deepseek.com/zh-cn/quick_start/pricing/),两者均为每 1,000 次成功请求 ¥5,即每次 ¥0.005。
|
|
6
6
|
|
|
7
7
|
- 只计 HTTP 200 且有结果的请求:Search 的 `results` 非空;Fetch 返回非空网页正文。搜索结果条数不影响价格。
|
|
8
8
|
- 失败、空结果、无正文、超时和取消不会凭空生成费用。同一请求同时经过网络诊断与 JSON 观察时只计一次,重试则分别判断是否成功。
|
|
@@ -15,7 +15,7 @@ v1.8.35 支持官方 `POST /v1/tools/search` 和 `POST /v1/tools/fetch` 的次
|
|
|
15
15
|
|---|---|
|
|
16
16
|
| 官方独立 Search/Fetch API | 在 DSH 网页服务或工具执行期间观察真实成功响应,按上面的规则入账。支持直接工具调用及宿主网页服务调用。 |
|
|
17
17
|
| DSH 的本地 HTTP 抓取后端 | 没有官方 Fetch API 请求就不增加次数费。模型随后阅读网页的 Token 仍由正常用量记录计费。 |
|
|
18
|
-
|
|
|
18
|
+
| 旧版 Messages/服务端内置搜索 | 保留模型 Token 费用。观察到成功且有结果的服务端搜索时,按实际调用另记请求:北京时间 2026 年 11 月 1 日 00:00 前免请求费,此后每次 ¥0.005;没有成功证据时不估补。 |
|
|
19
19
|
|
|
20
20
|
只有官方域名和精确端点被纳入上述固定单价,第三方渠道不会被强行套价。没有会话/工具作用域的独立进程请求不在此插件的观察范围。插件不主动发起搜索或抓取,不替换提供方,不自动重试,也不修改宿主网络策略。
|
|
21
21
|
|
|
@@ -29,4 +29,4 @@ v1.8.35 meters the official standalone Search and Fetch endpoints separately fro
|
|
|
29
29
|
|
|
30
30
|
Request fees use their own billing rows, remain API expenses, and retain historical exchange rates. They do not add tokens or inherit model multipliers, peak discounts or subscriptions. Observations are limited to exact official endpoints in DSH web/tool execution scopes; local HTTP fetching and third-party providers are not assigned this price. Journals contain no queries, URLs, page bodies or credentials. The plugin makes no search/fetch requests itself.
|
|
31
31
|
|
|
32
|
-
|
|
32
|
+
Legacy Messages search retains model-token accounting. Observed successful server-side searches have a request-fee waiver until November 1, 2026 at 00:00 Beijing time, then cost CNY 0.005 per request. Selection is read from DSH’s live web settings and snapshotted at call start; historical records retain their source and rate. Presentation items alone do not create charges. See the [official billing rules](https://api-docs.deepseek.com/guides/search/).
|
package/lib/backfill.js
CHANGED
|
@@ -617,7 +617,7 @@ export function replaySessionRecords(records, config, wantDates = null, collectS
|
|
|
617
617
|
const sample = { key, date, providerKey, buckets, cost, apiCost, ...frozenAmounts(cost, apiCost, pricing), seed: isSeed }
|
|
618
618
|
if (samples) {
|
|
619
619
|
if (prev) samples.delete(prev)
|
|
620
|
-
samples.set(sample, { ...sample, ...(requestFee ? { requestFee } : {}), displayFactor, exchangeRate: fxRates.CNY, fxRates, pricedAtMs, atMs, logSeq: !metered && Number.isSafeInteger(event.seq) && event.seq >= 0 ? event.seq : null, provider: effectiveProvider, model: sampleModel, resolved, peak, plan, kind: isCompaction ? 'compaction' : requestFee ? requestFee.kind : isNativeSearch ? 'search' : 'model',
|
|
620
|
+
samples.set(sample, { ...sample, ...(requestFee ? { requestFee } : {}), ...(isNativeSearch && event.data.webSource ? { webSource: event.data.webSource } : {}), ...(isNativeSearch && event.data.webSelection ? { webSelection: event.data.webSelection } : {}), displayFactor, exchangeRate: fxRates.CNY, fxRates, pricedAtMs, atMs, logSeq: !metered && Number.isSafeInteger(event.seq) && event.seq >= 0 ? event.seq : null, provider: effectiveProvider, model: sampleModel, resolved, peak, plan, kind: isCompaction ? 'compaction' : requestFee ? requestFee.kind : isNativeSearch ? 'search' : 'model',
|
|
621
621
|
...(isBillion ? { metering: event.data.metering } : {}),
|
|
622
622
|
turn: Number.isSafeInteger(event.data?.turn) && event.data.turn >= 0 ? event.data.turn : null,
|
|
623
623
|
step: Number.isSafeInteger(event.data?.step) && event.data.step >= 0 ? event.data.step : null })
|