deepseek-harness-wallet-patched: DSH conversation-side wallet and usage control center

Introduction

When running long conversations or switching between multiple Providers in DeepSeek Harness (DSH), balance, current session tokens, and model pricing are often scattered across official pages, third-party consoles, and host logs. Official bills are delayed, and third-party sources lack a unified standard, making it difficult to tell at a glance next to the input box “how much this session has roughly cost and whether it is currently at peak or off-peak pricing.”

Below is an introduction to the community-maintained deepseek-harness-wallet-patched (the npm package name is the same as the plugin id). It is a personal patched fork of feibi-mochi/deepseek-harness-control-center: the upstream has not been updated since 2026-09-09, and ThinkofRain1213 continues to maintain a usable version here. The plugin is categorized as a “Model Inference” capability, targeting web profile DSH hosts.

About

DeepSeek Harness monitoring, reminders, recharge, and session control center—local-first: balance is retrieved via official interfaces where possible; costs are estimated locally based on usage and pricing rules; prompts or response content are not stored.

Typical UI summary format:

Balance ¥5.89 · Session ¥0.72 · Official 18.8M | Third-party 800K · ↗ Recharge

The maintainer notes that energy is limited and updates may be interrupted; if upstream resumes maintenance, they will prioritize merging back into upstream. The current README marks the version as v0.3.13; the npm release is 0.3.13-patched.6, licensed under MIT.

Core Features

Official DeepSeek and V4 Peak/Off-Peak

  • Balance refreshes globally approximately every 60 seconds with a fast retry on startup; current session cost is a local estimate (not an official bill), with each usage snapshot locked at the price at the time of occurrence, including peak/off-peak pricing rules effective from 2026-08-17.
  • V4 Peak/Off-Peak Billing Clock (sidebar ring clock): Applies to v4-flash, v4-pro, and v4-flash-vision-exp. Peak hours on weekdays are Beijing Time 09:00–12:00 and 14:00–18:00; after 18:00 on Fridays, it prompts for the weekend off-peak; all-day off-peak is displayed on Saturdays and Sundays; before 09:00 on Mondays, it shows the time remaining until peak hours; the period from Friday 18:00 to Monday 09:00 is treated as a continuous off-peak cycle.
  • Vision Model Billing: deepseek-v4-flash-vision-exp is billed at V4 Flash rates; image tokens and text tokens reported by the Harness are counted together.
  • Official Price Synchronization: Periodically checks the DeepSeek official pricing page; only fully validated price lists are applied. Network failures fall back to the last verified rules (built-in rules are used before the first sync); if the page structure cannot be recognized, it marks the item for review without silently altering billing.

Provider Following & Third-Party

  • Input box labels and the sidebar clock follow the current session’s Provider/Model. When Z.ai is selected (including transparent vision-toolkit- variants), the DeepSeek balance, recharge, and peak clock are replaced by a plan window summary; other third-parties primarily display current session tokens; switching back to DeepSeek V4 restores the wallet and peak/off-peak views.
  • Z.ai Coding Plan: Monitors configured Global/China region plans via official plan adapters without exposing credentials to the browser; 5-hour model Tokens and monthly MCP quotas are displayed separately.
  • Third-Party Aggregation: Current session tokens (Input / Cache Read / Output) are available with zero configuration.
  • Third-Party Custom Pricing: Users can fill in currency and per-million-Token pricing (Input, Cache Read, Cache Write, Output) per Provider/Model, and configure IANA timezones, weekdays, and midnight-crossing time slots; the 365-day ledger and current session are recalculated based on time of occurrence and marked as custom estimates.
  • Provider Bucketing: The settings page lists observed wrapper routes; once checked, subsequent calls are counted into the official token/cost bucket and billed according to the official price list, without retroactive application to history.

Ledger, Panels & Alerts

  • Local Usage Ledger (max 365 days / 20,000 entries): Official/Third-party are separated, deduplicated by stable request IDs; data collection starts after upgrading from v0.3.2, and old aggregated data is not backfilled with fabricated dates.
  • Click the panel to view balance breakdown, cost and token details, set low balance thresholds by account and currency (two decimal places, no cross-currency addition), manual refresh, and jump to official recharge (domain confirmation required on first click).
  • Conversation Completion Reminder, Low Balance Reminder (label turns red and breathes + desktop notification, resets when balance recovers); multi-tab queuing dedup, page-internal reminders used if system notifications are unavailable.
  • Cards are draggable, snap-able, and scalable; can float or minimize to a dot; theme follows DSH --dsw-alias-* variables.
  • Clear Current Session Wallet Data only clears current conversation tokens/costs, not the conversation; clearing the historical ledger is a separate operation.

Multi-Account

Add Name + API Key, switch, or delete in Account Management within the wallet panel. Switching writes to the host credential store (credentials.set('DEEPSEEK_API_KEY', ...)), and the next LLM call will be billed to the new account without needing a restart. Keys are encrypted and stored in $DSH_HOME/storages/accounts.json (Windows DPAPI, AES-GCM key file for other systems); the UI displays them masked only. If the environment already provides DEEPSEEK_API_KEY, switching will be rejected, requiring unsetting that environment variable in the shell.

Installation & Activation

The plugin is installed under the web profile; after installation, dsh web must be restarted and the page force-refreshed. Node requirements per package declaration: ^22.19.0 || >=24.0.0; DSH compatibility range is >=0.1.2-alpha.3 <0.1.3 || >=0.1.5-alpha.1 <0.1.8 (README compatibility verification for this round refers to 0.3.13 documentation; official 0.1.5-alpha.1 does not provide the permanent deletion capability required by the plugin, so related switches remain disabled).

Install from npm:

dsh plugin --profile web add deepseek-harness-wallet-patched

Or install directly from GitHub main:

dsh plugin --profile web add github:ThinkofRain1213/deepseek-harness-wallet-patched

Update and uninstall:

dsh plugin --profile web update deepseek-harness-wallet-patched
dsh plugin --profile web remove deepseek-harness-wallet-patched

Typical Usage

  1. Click the wallet card or the peak/off-peak card to open the control panel; you can also open the health check card in Harness settings.
  2. The peak/off-peak card supports horizontal/vertical layouts and 100%–120% scaling; the wallet label scales to approximately 100%–105% inside the input box, and up to 125% when docked or floating.
  3. The official recharge button can be turned off to shrink the card; official and third-party data can be displayed or hidden separately.
  4. Drag the card to a blank area; if it cannot be found, use “Reset/Dock” in the panel to return it to the sidebar.
  5. Force refresh after upgrading the plugin to ensure the new frontend is loaded.

For desktop hosts like Electron/Tauri, if notifications or external links are restricted, window.__DSH_WALLET_ADAPTER__ can be injected on demand before the wallet script loads (fields such as storage, notify, openExternal, and capabilities are optional); for details, see the “Browser, Desktop, and System Compatibility” section in the repository README.

Use Cases & Caveats

Suitable for: Users who wish to view DeepSeek balance, V4 peak/off-peak hours, current session and last-year token ledgers while conversing in DSH, or manage multiple API Keys and configure local estimation rules for third-party APIs.

Caveats:

  • The plugin runs with the permissions of the current DSH process and makes requests to official interfaces like /user/balance; multi-account switching also rewrites DEEPSEEK_API_KEY in the DSH credential store. Before installing, you should read the GitHub source code and the MIT license to ensure it meets your security policies.
  • Current session costs and third-party custom prices are local estimates and do not replace vendor bills or real-time exchange rates (the “approx $x” for USD accounts is displayed using a fixed 7.25 CNY/USD conversion factor, not the official USD unit price).
  • The DSH ecosystem is “everything is a plugin”; the SkillHub directory page is a community site and has no official affiliation with DeepSeek / High-Flyer.

Conclusion

deepseek-harness-wallet-patched integrates balance, the peak/off-peak clock, price synchronization, a local ledger, and multi-account switching into a control center right next to the input box, making it suitable for tracking consumption during long-term model inference with DSH. For more information, see the directory page and repository:

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye