How to use deepseek-harness-wallet
Provides official DeepSeek balance, per-session cost, and third-party Token usage panels for DSH Web. Supports multi-account hot switching, 24-hour peak-valley pricing display, and anti-phishing recharge portal.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
deepseek-harness-wallet
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add github:feibi-mochi/deepseek-harness-wallet
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- Third-party total — current-session tokens (input / cache read / output). No balance guessing, no cost math, zero configuration.
- Floating window mode — detach the detail panel into a draggable window with a remembered position, or minimize it directly to a freely movable dot; the dot turns red below the threshold.
- Low-balance alert — below the threshold the chip turns red with a breathing animation and fires one desktop notification; it resets automatically once the balance recovers.
- Clear current-session wallet data — one button clears only the open conversation's token/cost records; it does not delete the conversation, and every other conversation is untouched.
- Open the wallet panel → 账户管理 to add accounts (name + API key), switch the active one, or remove them.
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
What to do if the tag (chip) doesn't appear after installation?
You must first run dsh plugin --profile web add deepseek-harness-wallet, then restart dsh web, and finally hard refresh the page in the browser. The client half-package is injected via __ModuleLoader__.load({ id: 'deepseek-harness-wallet' }) (lib/client.js:6-11), and hard refresh is a necessary condition to trigger loading (AGENTS.md:23-25).
Why does the balance show error / no numbers?
Balance depends on DEEPSEEK_API_KEY. When it's missing or invalid, it directly queries the official /user/balance endpoint. The key only leaves this machine as an Authorization header. Token/cost accounting doesn't depend on the key and still works normally; as long as you configure the key in the DSH model settings or have the account admin add it, the balance will be restored (index.js:518-529 / AGENTS.md:13).
Why do third-party model sessions only have Token, no balance and cost?
Balance only connects to the official interface for the official price list. Third-party providers have neither the official price list nor a balance endpoint, so only the Token count for input/cache read/output is recorded, without estimating cost and balance (README.md:27).
How to switch between multiple DeepSeek accounts? Who will be charged next?
Add an account in the panel's "Account Management" (name + API key), and the switch will write to the credentials channel credentials.set('DEEPSEEK_API_KEY', ...). The llm-deepseek route parses this credential per request, so the next LLM call will be billed to the new account without restart; if DEEPSEEK_API_KEY is also set in the environment variable, the credentials channel will reject the override, and the switch will fail with a prompt (index.js:435-451 / README.md:39-44).
Can the recharge link address be changed?
No. RECHARGE_URL = 'https://platform.deepseek.com/top_up' is hardcoded on the host side and cannot be configured—this is an intentional anti-phishing measure. The first click will pop up a confirmation for the domain (index.js:28 / README.md:138).
The 'Permanently Delete Session' switch is grayed out, how to enable it?
This is a host capability, not something a plugin can implement independently. It requires the host DSH to truly implement the session deletion path and broadcast data-dshw-capability-permanent-delete='true' to the client; the current official release doesn't have this capability, so the switch remains disabled. If you're a host developer, refer to the integrations/dsh-session-delete/ suite to connect the capability (AGENTS.md:54-57 / lib/client.js:1063).
Where is data stored? Will clearing this session data delete the conversation?
Wallet data is stored in $DSH_HOME/storages/wallet.json, accounts in $DSH_HOME/storages/accounts.json, and UI display content/zoom/layout etc. are stored in browser localStorage. "Clear this session data" only clears the current session's token/cost count and won't delete chats or sessions themselves (README.md:128-136 / index.js:30-31).
How to clean up the old version of dsh-wallet installed on the machine?
dsh-wallet was renamed to deepseek-harness-wallet in version 0.1.1. If the old package isn't uninstalled, it will conflict with the new package for the same UI slot. Run dsh plugin --profile web remove dsh-wallet and then restart dsh web (README.md:93 / AGENTS.md:40-41).
The session cost (¥/¥) seems not very accurate?
Cost is estimated each time a usage event falls onto the price list at the "then-current price": v4 models have peak/off-peak rates (Beijing time 09:00–12:00 and 14:00–18:00 are peak hours, off-peak is half of peak). Historical calls won't be recharged at new rates. The balance returned by the official interface is the authoritative value; the estimate is only for reference (index.js:52-90 / README.md:140-150).
— source: plugin_wiki.faq_json
Compatibility
- DSH: 0.1.0-rc.6+(0.1.0-rc.7 实测)
- Node: >=22.19.0
- Platforms: 跨平台
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule