rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:itsbuyru-bit/dsh-model-price
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Per-model API prices, wallet balance and live session spend for
DeepSeek Harness. The plugin adds a compact line under the chat composer —
Session: $0.0123 · Wallet: $12.34 · Peak — and a Models & prices section in
Settings where you enter what each model costs per million tokens, in USD or CNY,
separately for Peak and Off-Peak hours.
The plugin is a Host + Client bundle. It does not patch Harness, does not modify
session logs, and keeps all of its data in ~/.dsh/api-spend/.
Unofficial. This project is not affiliated with, endorsed by, or sponsored by DeepSeek. “DeepSeek” and “DeepSeek Harness” belong to their respective authors. See Non-affiliation.
| Settings — Display | Settings — Models |
|---|---|
![]() |
![]() |
DeepSeek Harness reports token usage per step but has no per-model price table and no wallet display. This plugin adds both:
| Surface | What it shows | Where it lives |
|---|---|---|
| Composer line | Session spend, wallet balance, Peak / Off-Peak badge, live indicator | conversation.composer.dock, order 2 |
| Popover | Token composition, per-model cost, wallet split, child sessions, all-time total | Click the line |
| Settings section | Price table per model, currency, manual FX rate, Off-Peak window, language | settings.section, order 30 |
| Host API | Prices, wallet and session aggregation | /api-spend/api/* |
The plugin works from the durable session log: it folds
assistant/message usage into a session projection and prices it on read. It
does not estimate tokens, does not rewrite logs, and does not block requests.
web_search / web_fetch calls are
counted and shown separately; they are free until 2026-10-31 16:00 UTC and
billed at $0.75 per 1,000 requests afterwards.| Component | Value |
|---|---|
| DeepSeek Harness | 0.2.x — tested on 0.2.1-rc.2 (Desktop, Windows) |
| Profile | desktop (Web/Desktop); any profile that mounts the Web UI |
| Node.js | bundled with DSH, 22.5+ |
| Plugin version | 1.9.2 |
The plugin is not gated on an exact Harness version. If a future release renames a slot, a projection key or a service, the affected part degrades to “no line”/“no wallet” instead of crashing the page; the Host API keeps working.
| Need | Why |
|---|---|
| DeepSeek Harness 0.2.x | Provides the Web UI, session projections and the account service |
| A Web/Desktop profile | The composer line and the settings section are Web-UI slots |
| DeepSeek account (optional) | Only for the wallet balance; without it use the local-budget fallback |
| No build tools | The bundle ships index.js and client.js as-is |
Works on Windows, macOS and Linux; the UI uses Harness theme tokens and follows the active theme automatically.
Open Settings → Plugins → Add plugin.
Paste one of:
github:itsbuyru-bit/dsh-model-price
https://github.com/itsbuyru-bit/dsh-model-price
/path/to/dsh-model-price
Install, restart DeepSeek Harness and refresh the page.
The plugin is distributed from GitHub; there is no npm registry package.
dsh plugin --profile <your-profile> add github:itsbuyru-bit/dsh-model-price
The desktop profile is owned by the Electron application and the CLI refuses
to write to it; use Add Plugin in the UI for that profile.
git clone https://github.com/itsbuyru-bit/dsh-model-price.git
dsh plugin --profile <your-profile> add link:/absolute/path/to/dsh-model-price
Host changes require reinstalling the bundle; client changes only need a page refresh.
Checked YYYY-MM-DD (UTC) and an Open button.The composer line shows Session: … · Wallet: … · Peak. Click it for the token
composition, per-model cost, wallet breakdown and the all-time total; the eye
button masks the wallet.
| Action | Result |
|---|---|
| Click the line | Opens the spend popover |
| Eye button | Hides or shows the wallet amount (persisted) |
| Load models from Models | Mirrors the models bound in Settings → Models; unbound rows are removed |
| Expand all / Collapse all | Opens or closes every price row |
| Apply (Display) | Saves currency, rate, language and visibility toggles |
| Apply (Discounts & time) | Saves the shared Peak schedule and Search & Fetch billing |
| Apply (Models) | Saves the price table and the per-model schedule overrides |
| Reset total | Resets the all-time counter; session history is kept |
Prices are applied retroactively: editing a rate recalculates the visible
history, which the popover states explicitly. A model without a price shows ?
and is listed as unpriced instead of counting as zero.
index.jsmodelPrice session projection, keyed by
provider/model and split into Peak / Off-Peak token buckets. The tariff of
an event is resolved against that model's own schedule when it has one, and
against the shared schedule otherwise.assistant/message events only; a retried step at the same
turn/step replaces its previous sample instead of double counting.totals.json, updated from session/event.deepseekAccount.getBalance (45-second cache) and
falls back to the local budget./api-spend/api/{state,config,save,wallet,reset,catalog,locales}.client.jsconversation.composer.dock → spend and
settings.section → model-price./api-spend/api/locales, so the UI language is
independent of the Harness language and can be overridden per plugin.| Token bucket | Source | Charged at |
|---|---|---|
| Input (cache miss) | usage.inputTokens |
input price |
| Cache read | usage.cacheReadTokens |
cache-hit price, falls back to input |
| Cache write | usage.cacheWriteTokens |
cache-write price, empty = free |
| Output | usage.outputTokens |
output price |
reasoningTokens is already inside outputTokens and is not charged twice.
Child sessions are included while they are live and are shown separately.
| Rule | Behaviour |
|---|---|
| Empty cache-hit price | Charged at the input price |
| Empty cache-write price | Free |
| Empty Off-Peak column | Uses the Peak price |
| Missing input or output price | Model is unpriced; session total shows ? |
| Price currency ≠ display currency | Converted with the manual rate |
| Peak schedule | Editable UTC windows and weekdays; DeepSeek default 01:00–04:00 and 06:00–10:00, Monday–Friday, excluding holidays |
| Price edits | Recalculate the visible history (retroactive) |
| Budget | A display fallback only; no limits and no blocking |
Bundled locales are BCP 47 files with a region or script subtag:
| File | Language |
|---|---|
locale/en-US.json |
English (US) |
locale/ru-RU.json |
Русский |
locale/zh-CN.json |
简体中文 |
locale/ja-JP.json |
日本語 |
locale/ko-KR.json |
한국어 |
locale/es-ES.json |
Español |
locale/pt-BR.json |
Português (Brasil) |
locale/de-DE.json |
Deutsch |
locale/fr-FR.json |
Français |
locale/en-US.json to locale/<tag>.json, where <tag> includes a
region or script subtag (it-IT, nl-NL, tr-TR, zh-TW). A file without
a subtag (en.json) is ignored.strings and meta.description.{n} / {rate} placeholders; keep Peak, Off-Peak,
USD, CNY, DSH, DeepSeek, API, cache miss/hit/write and
Model Price (inventory name) in English.settingsTitle / settingsNav — they are the page title and the
nav label."locale" to the file tag and "name" to the language name written in
that language.The Host rescans locale/ on every request: drop the file in, open
Settings → Models & prices (the section forces a re-scan) or refresh the
page. Missing keys fall back to en-US, then to the key name.
Full guide: docs/TRANSLATION.md.
| Data | Location | Notes |
|---|---|---|
| Prices, currency, rate, window, language | ~/.dsh/api-spend/config.json |
Plain JSON |
| All-time token counters | ~/.dsh/api-spend/totals.json |
Token buckets only |
| Wallet balance | DeepSeek account API | Cached 45 s in memory, never written to disk |
| Session usage | Harness session log | Read through the projection, never modified |
| Update check | api.github.com Releases API |
Optional; one request per 6 h, no payload |
There are no analytics and no telemetry. The only outbound requests are the account balance call made by the Harness itself and the optional update check; disable it in Settings → Models & prices → About → Check for updates. The FX rate is manual by design.
Landing page with screenshots, features and the install command:
https://itsbuyru-bit.github.io/dsh-model-price/
dsh-model-price/
├── index.js # Host half: projection, wallet, pricing API
├── client.js # Client half: composer line, popover, settings
├── lib/pricing.js # Pure pricing helpers (tested, shipped)
├── cordis.patch.yml # Inserts the plugin row
├── icon.svg # Plugin icon
├── locale/ # 9 BCP 47 locale files (111 keys each)
├── test/pricing.test.mjs # node:test unit suite
├── docs/ # Architecture, translation guide, images
├── site/ # Static landing page (GitHub Pages)
├── scripts/check.mjs # Manifest, syntax and locale-parity checks
├── .github/workflows/ # ci.yml, pages.yml, release.yml
├── README.md # English
├── README.ru.md # Russian
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── SECURITY.md
├── SUPPORT.md
├── LICENSE
└── package.json
Further reading: architecture and the translation guide.
node scripts/check.mjs
node --test test/pricing.test.mjs
The check validates the manifest, runs node --check on the Host, Client and
lib/pricing.js, and verifies every locale against en-US.json: file tag,
locale field, key set, empty values and {placeholder} preservation.
The unit suite covers the pure pricing layer: per-million costs, cache-hit and cache-write fallbacks, Peak-window and weekday maths, holiday exclusion, currency conversion, release comparison, and extraction of the model list the user bound in Settings → Models. CI runs both commands on every push and pull request.
github:itsbuyru-bit/dsh-model-price picks up the default branch.git pull --ff-only in the working copy and prints what changed. A local
directory that is not a git repository is never touched. New host code loads
after a DSH restart, the client after a page refresh. The toggle controls only
the automatic 6-hour check.
The toggle controls only the automatic 6-hour check.package.json and CHANGELOG.md; releases are tagged
vX.Y.Z.vX.Y.Z tag runs .github/workflows/release.yml and publishes a
GitHub Release with generated notes.?de-DE, not de.strings object.••••Issues and pull requests are welcome. Read CONTRIBUTING.md. Translation fixes are especially useful: include the language, the English source, the current text and a suggested correction.
This project follows the Contributor Covenant.
Do not paste account tokens, API keys or private session data into issues. Report security problems privately through GitHub Security Advisories; see SECURITY.md.
--dsw-alias-*, --dsw-specific-*) and
the native popover metrics so it matches the host in light and dark themes.This is an independent, unofficial project. It is not affiliated with, endorsed by, or sponsored by DeepSeek or the DeepSeek Harness maintainers. It contains no DeepSeek source code or binaries; it only extends a local Harness installation through its public plugin APIs. “DeepSeek” and “DeepSeek Harness” belong to their respective authors.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。