rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:likaileave/dsh-model-billing
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
为 DeepSeek Harness Web GUI 调整模型顺序,并按轮次估算模型费用。
AI 生成声明:本项目的代码、文档和图标由 AI 辅助生成,并经人工审核、修改和测试;发布者对最终发布内容负责。
AI-generated notice: The code, documentation, and icon in this project were generated with AI assistance, then reviewed, modified, and tested by a human; the publisher is responsible for the released content.
dsh-model-billing 是一个 DSH Web 客户端插件。它可以接管输入框右下角的模型选择器,让你按自己的顺序排列模型,并为每个模型维护三档 token 价格;会话过程中按实际 usage 估算每一轮和整个会话的费用。
0 是有效价格,留空表示未设置。deepseek-flash(含 deepseek-v4-flash、deepseek-v4-flash-vision-exp 等同价别名)和 deepseek-v4-pro 默认使用 DeepSeek 官网的峰谷价,并在设置页标明“官方价”;填入完整的三档自定义价即可覆盖官方价,标为“自定义”。deepseek-official 的模型内联网工具),按官方 ¥5 / 1,000 次成功请求计入合计,并在费用明细里单独列出搜索、抓取的计费次数;模型内联网搜索按每次成功的工具调用记 1 次,标注为下限。缓存命中输入 × 命中价
+(未缓存输入 + 缓存写入)× 未命中价
+ 输出 × 输出价
+ DeepSeek Search/Fetch 成功请求次数 × 单次价(含模型内联网搜索,每次成功工具调用记 1 次)
价格单位是“元 / 百万 tokens”;Search/Fetch 按次计费,单次价为 ¥0.005(¥5 / 1,000 次成功请求)。缓存写入按缓存未命中价计算,这是三档价格模型下的近似处理。金额来自会话日志中的 provider usage 与工具结果,实际账单以 provider 为准。
以下价格内置在 host.js 的 DEEPSEEK_PRICES 中,单位“元 / 百万 tokens”。来源:DeepSeek 模型 & 价格(查询于 2026-10-19)。
| 模型 | 时段 | 缓存命中 | 缓存未命中 | 输出 |
|---|---|---|---|---|
| deepseek-flash | 高峰 | 0.04 | 2 | 8 |
| deepseek-flash | 空闲 | 0.02 | 1 | 4 |
| deepseek-v4-pro | 高峰 | 0.30 | 9 | 27 |
| deepseek-v4-pro | 空闲 | 0.15 | 4.5 | 13.5 |
deepseek-v4-flash 和 deepseek-v4-flash-vision-exp 与 deepseek-flash 同价,表里不再重复列出。
高峰时段为北京时间周一至周五 9:00–12:00、14:00–18:00(中国法定节假日除外);其余时间、周末和法定节假日全天为空闲时段。空闲价是高峰价的一半。
DeepSeek 价格默认只读展示;如需按其他渠道或折扣价计费,可在设置页点“自定义价格”填入完整三档价格,保存后以自定义价为准并标为“自定义”;三项清空后保存即可恢复官方价。官网调价或节假日安排变化后,需要更新 host.js 中的 DEEPSEEK_PRICES 和 DEEPSEEK_HOLIDAYS;目前内置的是 2026 年节假日。
插件不预置第三方模型价格。首次使用时,在“设置 → 模型与费用”中按 provider 的官方价填写三档价格即可;未填完整价格的模型不会产生金额,界面会标记“未定价”或“部分未定价”。
不同平台的缓存折扣、上下文阶梯价和活动价差异较大,建议直接使用你的实际结算价。插件不做自动抓取,也不猜测默认价。
需要 DSH ^0.2.1-rc.3。
npm
dsh plugin --profile desktop add dsh-model-billing
从 dsh-market 安装
在 dsh-market 中搜索 dsh-model-billing 安装。
从 GitHub Release 手动安装
dsh-model-billing.tgz。dsh plugin --profile desktop add ./dsh-model-billing.tgz
把 desktop 换成你实际使用的 profile。
从源码安装
git clone https://github.com/likaileave/dsh-model-billing.git
dsh plugin --profile desktop add ./dsh-model-billing
安装或更新后重启 DSH(桌面版没有刷新或重载命令,插件代码只在页面启动时从磁盘读取)。设置页位于“模型与费用”。
npm 包和 GitHub Release 使用相同版本号,两个渠道分别发布:
两个渠道是并列的发布渠道,不承诺自动同步。
模型顺序和价格保存在:
~/.dsh/model-billing.json
若设置了 DSH_HOME,则为 $DSH_HOME/model-billing.json。保存时先写临时文件再原子替换;文件损坏时回退为空配置,不会在未保存的情况下覆盖原文件。
deepseek 开头的官方 provider(如 deepseek-account)且模型名在官方价表内时生效;openrouter、my-deepseek-relay 这类第三方即使模型名含 deepseek 也按普通规则计费,可自行填价。model-billing.json 里,不再镜像到浏览器 localStorage,因此换设备或换浏览器不会不同步;旧版本写入的 localStorage 键会被自动清除。127.0.0.1 / localhost / [::1])外,Host 头与该连接实际监听的地址(socket.localAddress + localPort)一致时也会放行,因此 --host 0.0.0.0 后用局域网 IP 访问可用;反向代理若改写了 Host,需要让它保留原 Host 或与实际监听地址一致,否则四个路由返回 403,此时模型选择器回退为 DSH 内置版本(费用与排序功能不可用),不会影响正常聊天。ctx.modelDirectories。该服务不可用或 catalog 尚未加载完成时,插件不会强行覆盖内置选择器,价格和费用统计不受影响。/model 命令仍由 DSH 自带实现,顺序不保证与右下角选择器一致。totalTokens 与三档明细不一致时,保留三档明细并把该轮标为“部分未定价/不完整”,不再整条丢弃,避免大幅少报。deepseek-search-api / deepseek-fetch-api,或 deepseek-official 模型内联网工具),按 DeepSeek 官方价把 Search/Fetch 按次费(¥5 / 1,000 次成功请求,2026-11-01 00:00 北京时间起)计入合计;Messages 搜索(deepseek-official)由宿主按每次成功的搜索工具调用记 1 次,费用栏标为下限(≥ ¥0.005)。官方按查询词条数计费,而 usage.server_tool_use 被宿主丢弃、辅助请求的 token 也不可见,因此实际费用可能高出 2–3 倍。DuckDuckGo、Tavily、普通 HTTP 抓取等不收费的 provider 不会被计费。一次 web_search 含多个 query 时按一次成功工具调用计。DEEPSEEK_HOLIDAYS。node --check host.js
node --check client.js
node --test test/*.test.mjs
插件没有运行时 npm 依赖。
MIT © 2026 likaileave
dsh-model-billing is a DSH Web GUI plugin that can take over the composer's model picker, lets you order configured models yourself, stores three per-million-token prices per model, and estimates per-turn and session cost from provider usage.
0 is a valid price; blank means unset.deepseek-flash (and the same-rate aliases deepseek-v4-flash and deepseek-v4-flash-vision-exp) and deepseek-v4-pro, selected per usage event between peak and off-peak Beijing time. A complete set of custom prices overrides the table and is labelled "Custom".deepseek-official's in-turn web tool), the official fee of ¥5 per 1,000 successful requests is included, with search and fetch billed counts shown separately in the detail panel; in-turn searches are counted per successful tool call and shown as a floor.cache-hit input × hit price
+ (uncached input + cache write) × miss price
+ output × output price
+ DeepSeek Search/Fetch successful requests × per-request price (in-turn web search counts one per successful tool call)
Prices are CNY per million tokens; Search/Fetch is billed per request at ¥0.005 (¥5 per 1,000 successful requests). Cache writes are approximated at the cache-miss price. Figures come from provider usage and tool results in the session log; the provider's invoice is authoritative.
The built-in table lives in host.js as DEEPSEEK_PRICES, in CNY per million tokens. Source: DeepSeek models & pricing (checked 2026-10-19).
| Model | Window | Cache hit | Cache miss | Output |
|---|---|---|---|---|
| deepseek-flash | peak | 0.04 | 2 | 8 |
| deepseek-flash | off-peak | 0.02 | 1 | 4 |
| deepseek-v4-pro | peak | 0.30 | 9 | 27 |
| deepseek-v4-pro | off-peak | 0.15 | 4.5 | 13.5 |
deepseek-v4-flash and deepseek-v4-flash-vision-exp share the deepseek-flash rate and are not repeated in the table.
Peak windows are Beijing time Monday–Friday 9:00–12:00 and 14:00–18:00, excluding Chinese public holidays; weekends, holidays, and every other hour are off-peak at half the peak rate.
The plugin ships no third-party price defaults. Enter your provider's actual rates in Settings → Models & Cost. Models without a complete three-price set are marked as unpriced and contribute no amount. DeepSeek prices come from the built-in official table; enter a complete custom set to override it, or clear all three fields to restore the official rates.
Requires DSH ^0.2.1-rc.3.
npm
dsh plugin --profile desktop add dsh-model-billing
From dsh-market
Search for dsh-model-billing in dsh-market.
From a GitHub Release
Download dsh-model-billing.tgz from Releases, then:
dsh plugin --profile desktop add ./dsh-model-billing.tgz
From a checkout
git clone https://github.com/likaileave/dsh-model-billing.git
dsh plugin --profile desktop add ./dsh-model-billing
Restart DSH after installing or updating; the desktop build has no reload command and plugin code is read from disk only when the page starts.
The npm package and the GitHub Release use the same version number and are published separately:
They are parallel distribution channels, not an automatic mirror.
Order and prices live in ~/.dsh/model-billing.json (or $DSH_HOME/model-billing.json). Writes use a temporary file plus atomic replace.
deepseek (such as deepseek-account) and to models present in the official table. A third-party route such as openrouter or my-deepseek-relay is billed by the normal rules even when the model name contains deepseek, and you can price it yourself.model-billing.json; they are no longer mirrored into browser localStorage, so they do not sync across devices or browsers. Any key written by older builds is cleared automatically.127.0.0.1, localhost, [::1]), a request is accepted when its Host header matches the address this socket actually listens on (socket.localAddress + localPort), so a LAN IP works with --host 0.0.0.0. A reverse proxy that rewrites Host must preserve it or match the listening address, otherwise the four routes return 403 and the picker falls back to the DSH built-in one; chat itself keeps working.ctx.modelDirectories; when that service is unavailable or the catalog has not loaded yet, the plugin leaves the built-in picker alone./model command is still implemented by DSH and may not follow the custom order.totalTokens disagrees with its three buckets, the buckets are kept and the turn is marked partial instead of being dropped, which avoids large under-reporting.deepseek-search-api / deepseek-fetch-api providers, or deepseek-official's in-turn web tool), the DeepSeek Search/Fetch per-request fee (¥5 per 1,000 successful requests, from 2026-11-01 00:00 Beijing time) is included. Messages search (deepseek-official) is billed as one successful search tool call and shown as a floor (≥ ¥0.005): the official fee is per query term, the host discards usage.server_tool_use, and auxiliary request tokens are invisible, so the real cost can be 2–3 times higher. Free providers such as DuckDuckGo, Tavily, and plain HTTP fetch are never charged. A web_search call containing several queries is counted as one successful tool call.DEEPSEEK_HOLIDAYS for 2027 onward.node --check host.js
node --check client.js
node --test test/*.test.mjs
The plugin has no runtime npm dependencies.
MIT © 2026 likaileave
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。