rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:zhiciyishuyicheng-dev/dsh-deepseek-cny-cost
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
See what the chat you are reading has cost today, in CNY, inside the DeepSeek Harness Web GUI.
A small badge sits under the composer next to the session statistics:
今日 ≈¥0.0123
It reads two projections the session already exposes and issues no requests of its own:
| Data | Source |
|---|---|
| Token usage | tokenUsage (uncachedInputTokens, cacheReadTokens, cacheWriteTokens, outputTokens) |
| Current model | modelSelection |
Prices come from the official Models & Pricing page (checked 2026-10), in CNY per million tokens:
| Model | Cache hit | Cache miss | Output |
|---|---|---|---|
deepseek-flash |
0.04 | 2 | 8 |
deepseek-v4-pro |
0.30 | 9 | 27 |
Those are peak rates. Off-peak is half of peak; peak is Beijing time Monday–Friday (excluding Chinese statutory holidays) 09:00–12:00 and 14:00–18:00, and every other hour — weekends and holidays included — is off-peak.
deepseek-v4-flash and deepseek-v4-flash-vision-exp are priced as Flash, per the official note;tokenUsage is a whole-chat total with no timestamps and no per-day split, so "today" is derived from a daily baseline:
spent today = cumulative usage − today's baseline
The baseline is stored per session id in the browser's localStorage (key dsh-deepseek-cny-cost.day.v1), so switching chats, refreshing the page, or restarting DSH keeps the part of today that is already spent. Once Beijing midnight passes, the baseline is replaced and the badge drops to zero.
tokenUsage is a whole-chat total with no per-model split.deepseek-official, deepseek-account, or any new provider id starting with deepseek).Desktop: Plugins → Add plugin, enter the absolute path of this directory (the installer records a link: dependency), then install and enable. Restart DSH completely if it asks, then refresh the page.
Command line, for a non-desktop profile:
dsh plugin --profile web add /absolute/path/to/dsh-deepseek-cny-cost
Everything lives at the top of client.js:
PEAK_PRICES — the rate table (peak rates; off-peak is half);MODEL_ALIASES — legacy model-name folding;PEAK_WINDOWS — peak ranges in minutes of the day;BUILTIN_HOLIDAYS — the offline holiday fallback;TICK_MS — refresh period, 30 s by default (also how late the midnight reset can be);STORE_KEY / WRITE_THROTTLE_MS — the baseline store key and its write throttle;name / order in apply() (defaults: conversation.input.right, order: 1).node --check client.js
node tools/test-cny-cost.mjs # pricing, peak windows, daily reset, formatting, slot registration, component behavior
client.js is the whole browser half: a lazy factory registered through window.__ModuleLoader__.load({ id, factory }), with React supplied by the host module table. Refresh the page to pick up an edit; if the page keeps running the old code, remove the bundle and install it again from the same source (ambiguous-install otherwise).
MIT.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、deepseek-harness。