dsh-web-search-ddg
aooyoo
Zero-token DuckDuckGo search provider for the DeepSeek Harness (DSH) web seam — local headless browser, no API key, no m…
PROJECT TOPICS
PROJECT README
English | 中文
DeepSeek Harness(dsh)Web 界面的会话花费插件:把当前会话的 DeepSeek API 累计花费显示为输入框旁的一个小徽标。
conversation.input.right 槽位(模型选择器左侧)显示当前会话的 DeepSeek API 花费(¥),每 5 秒刷新。DEEPSEEK_API_KEY,经 DeepSeek 官方 user/balance 接口获取。assistant/message 消息按其发生时刻逐条计价,自动应用 2026-08-17 起的高峰/空闲定价(北京时间 09:00–12:00 / 14:00–18:00 为高峰,其余时段半价),并包含插件安装之前的历史。# 从 npm 或本仓库安装后:
dsh plugin --profile web add dsh-session-cost
或从本仓库安装(GitHub / Gitee 二选一):
dsh plugin --profile web add github:Lzh3070/dsh-session-cost
dsh plugin --profile web add https://gitee.com/lzh10602042_gitee/dsh-session-cost/repository/archive/main.zip
装完重启 dsh web 服务,浏览器硬刷新(Ctrl+Shift+R)。
首次使用:设置 → 模型 中需配置 DEEPSEEK_API_KEY(余额与今日统计读取该凭证;未配置时余额显示 --,会话花费不受影响)。
输入框右侧的小徽标(¥0.12),悬停弹出浮窗:

浮窗内容示例:
当前会话花费 ¥6.55
项目 数量 单价 金额
输入(未命中) 3.5M ¥1.000/M ¥3.49
缓存命中 111.8M ¥0.020/M ¥2.24
输出 410.5K ¥2.00/M ¥0.821
──────────────────────────────
今日(DSH) ¥0.356
账户余额 ¥197.66
内置 DeepSeek 官方政策时间表(元 / 百万 tokens):
| 模型 | 阶段 | 输入(未命中) | 缓存命中 | 输出 |
|---|---|---|---|---|
| deepseek-v4-flash | 当前价(2026-05-22 起) | 1 | 0.02 | 2 |
| deepseek-v4-flash | 2026-08-17 起·高峰 | 3 | 0.1 | 9 |
| deepseek-v4-flash | 2026-08-17 起·空闲 | 1.5 | 0.05 | 4.5 |
| deepseek-v4-pro | 当前价(2026-05-22 起) | 3 | 0.025 | 6 |
| deepseek-v4-pro | 2026-08-17 起·高峰 | 9 | 0.3 | 27 |
| deepseek-v4-pro | 2026-08-17 起·空闲 | 4.5 | 0.15 | 13.5 |
价格表位于 lib/index.js 的 OFFICIAL_PRICING_POLICIES,官方调价时按 since 时间轴追加条目即可。
cordis.patch.yml inserts the plugin row into the host composition
dsh.plugin.json plugin metadata (entry id + client platform)
lib/index.js host entry: SessionCostRuntime (TypertRemoteService) +
official pricing engine + strict Typert manifest
lib/client.js single-file client bundle (ModuleLoader handshake):
composer cost chip + hover popover (class component)
lib/invariant.js invariants companion entry
sessionCost(sessionId):经 sessionPersistence.readRaw 回放会话日志,逐条计价,按日志 revision 缓存。accountSummary():回放全部会话统计今日(北京时间)DeepSeek 用量;凭证 DEEPSEEK_API_KEY → 官方 user/balance 取余额。conversation.input.right 槽位注册,5s 轮询 + 60s 账户节奏 + 悬停浮窗。MIT。计价引擎移植自 dsh-deepseek-quota(MIT,其本身移植自 bpc-oss/dsh-web-billing MIT)。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。