dsh-bili-scroll
c1overzz
DSH 插件:每天替你刷一轮 B站,读字幕挑出值得的、写一份日报,值得的 @ 你
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:huilin66/dsh-token-cost
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 中文
Token cost tracking plugin for DeepSeek Harness.
💰 ¥1.48 (hover tooltip notes it is an estimate and the official bill wins)npx dsh-token-cost setup
This installs the plugin into your web profile (enabling pnpm through corepack when missing), appends the cordis.patch.yml row, and creates the prices directory. Re-running is safe (idempotent).
For another profile (e.g. tui):
npx dsh-token-cost setup --profile tui
# in your dsh profile directory (e.g. ~/.dsh/profiles/web)
cd ~/.dsh/profiles/web
dsh plugin --profile web add dsh-token-cost
Then add to your profile's cordis.patch.yml:
- insert:
- id: token-cost
name: 'dsh-token-cost'
config:
currency: CNY
Restart dsh web and hard-refresh the browser.
Only two price sources, both plain JSON files under ~/.dsh/prices/ (or $DSH_HOME/prices/):
| File | Who maintains it | Priority |
|---|---|---|
official-prices.json |
The daily script — do not hand-edit | lower |
local-prices.json |
You — optional overrides | higher |
Effective price per model: local-prices.json > official-prices.json > built-in defaults. Restart dsh web after a change (the projection replays the log with the new prices).
The dsh-token-cost-update script fetches DeepSeek's official pricing page, parses the current prices, and rewrites official-prices.json:
# one-time run
npx dsh-token-cost-update
# or via the installed binary
dsh-token-cost-update
Run it once a day via Windows Task Scheduler:
$action = New-ScheduledTaskAction -Execute (Get-Command node).Source -Argument "`"$(npm root -g)/dsh-token-cost/update-prices.mjs`""
$trigger = New-ScheduledTaskTrigger -Daily -At '09:30'
Register-ScheduledTask -TaskName 'DSH-TokenCost-UpdatePrices' -Action $action -Trigger $trigger -Force
The script is safe to run at any time: on any fetch/parse failure it exits non-zero without touching the existing file, so a transient network problem never destroys the last good price table. It prints prices changed: true/false so you can detect official price movements in a log.
Create ~/.dsh/prices/local-prices.json:
{
"prices": {
"deepseek-v4-flash": { "inputPerM": 1.5, "outputPerM": 3, "cacheReadPerM": 0.03 }
}
}
The shape is { "prices": { "<modelId>": { "inputPerM", "outputPerM", "cacheReadPerM?", "cacheWritePerM?" } } }. Unknown models price at zero and still accumulate token counts.
tokenCost) folds the durable session log: request/header events track the route (provider/model), assistant/message usage is priced per model, and per-message costs are recorded keyed by message id.session.list baselines), so the browser renders everything with zero extra RPCs.MIT
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 无有效分类标签。