Preface¶
During long conversations in DeepSeek Harness (DSH), the built-in stats bar displays turn count, step count, throughput, and token usage. However, it typically does not directly answer “How much did this entire session cost?” or “How much was spent on the last turn?”. If you try to manually calculate based on official pricing, you must distinguish between the two price tiers for cache hits and misses, making it difficult to verify costs at a glance as the conversation accumulates.
The community plugin dsh-bottom-cost (Maintainer: LanFeng97, Category: Network Tools) addresses this. It displays the session cost in the row below the input box, alongside the built-in stats pills. It lists costs per turn and breaks down the total into cache-hit and cache-miss parts (in CNY). The price list can be refreshed from the official pricing page when needed.
What is this¶
dsh-bottom-cost is a web UI plugin for DSH: it adds a “Session Cost” pill to the stats bar below the composer, sitting alongside the built-in “Turns/Steps” and “Token Usage” pills. The number on the left represents the accumulated cost of the current session, while the right side shows the cost of the most recent turn. It does not render if there is no billing data, consistent with the “hide if empty” behavior of the built-in stats pills.
On the plugin host side, it is a Node module (lib/index.js) with the client injected via lib/client.js. It depends on DSH >=0.2.0-rc.2 and requires a Node environment of >=20.0.0. The repository is open-source on GitHub (MIT), and the current package version is 0.5.2. The plugin itself has no runtime npm dependencies.
Core Features¶
Stats Bar Pill¶
Example form of the pill (from README):
◎ ¥2.922 · ¥0.4877
↑ Left: Session Total ↑ Right: Latest Turn
The numbers update in real-time as usage changes during the conversation.
Expandable Panel¶
Clicking the pill expands a panel upwards:
- Fixed Header: The total cost for this session, split into cache-hit and cache-miss amounts (CNY). By design, the total cost equals the sum of hits and misses.
- Scrollable List: Three lines per Turn (total / cache-hit / cache-miss). The list starts with the latest turn; scroll up to view earlier turns. The scroll window height is approximately two turn blocks.
- Turn Titles: Clicking a turn title jumps to the corresponding conversation turn (read-only driver for the right-side turn rail). For unloaded turns, the app handles pagination before locating the turn; if a turn cannot be found, a prompt will appear at the bottom of the panel.
- Model Identifier: The model name used in that turn is displayed to the right of the turn title (e.g.,
v4-pro; only thedeepseek-prefix is removed). If multiple models are mixed, they are displayed side-by-side, and hovering reveals the full ID. - In-panel Theme: The sun/moon icon on the right side of the title row only toggles the color scheme of this plugin’s panel and pill, without changing the global DSH theme. If there is a conflict with the stats bar background, the pill uses the plugin’s own background to ensure readability.
Pricing data comes from the official price list and is refreshed on demand (classified as a Network Tool due to this internet capability).
Installation & Activation¶
After installation, you must fully restart the DSH process (e.g., close the running dsh and execute dsh web again). Reloading the configuration alone will not load the host-side Node module. After restarting, the pill should appear in the UI; usually, no page refresh is needed.
Method 1: DSH Interface (Recommended)¶
- Open Plugins → Add Plugin in the sidebar.
- Enter one of the following and click Install:
- Package name
dsh-bottom-cost(includes official desktop clients; desktop can only install from npm sources, so use the package name instead of a GitHub URL). - Or repository URL
https://github.com/LanFeng97/dsh-bottom-cost(applicable fordsh web; the marketplace resolves this to a codeload tarball. If the network is unstable, it may fail, so please retry).
- Package name
- Restart DeepSeek Harness as prompted.
Installing via the Plugin Manager pins the version (e.g., "dsh-bottom-cost": "0.5.x" in the profile). To upgrade to a new version, you must click Update in the Plugin Manager.
Method 2: Delegate to a Local AI¶
Paste the entire installation instruction block from the README to an Agent, allowing it to clone the repository and run the installation script (you need to restart DSH manually):
Install the DSH plugin at https://github.com/LanFeng97/dsh-bottom-cost into my DeepSeek Harness:
clone the repo, run `node tools/install.mjs`, and tell me when I need to restart DSH.
Method 3: Plugin Marketplace¶
Search for dsh-bottom-cost on dshmarket (available after listing; use Method 1 or 2 before it is listed).
Method 4: Source Installation (Developers)¶
git clone https://github.com/LanFeng97/dsh-bottom-cost
cd dsh-bottom-cost
node tools/install.mjs # Copies to profile node_modules and writes to loader
node tools/install.mjs --dry-run # Preview only, no file writes
node tools/install.mjs web # Specify profile (default is desktop)
The installation script is idempotent; you can run it again after git pull to sync. The resolution order for the DSH directory is consistent with the Harness: $DSH_HOME, otherwise ~/.dsh. After modifying lib/client.js, simply refresh the page; modifying lib/index.js still requires a restart.
Do not mix installation paths: Choose either the Plugin Manager installation or tools/install.mjs. Both methods declare the same component in cordis.patch.yml. Mixing them will result in the plugin being unable to be disabled or uninstalled (error message indicating other configs are still using the bundled component). If mixed, you must manually delete the insert blocks related to # dsh-bottom-cost in the patch within the README’s “Cannot install or cannot uninstall” section and restart, then uninstall via the manager. Self-check:
grep -n "dsh-bottom-cost" cordis.patch.yml package.json
Only having a record in package.json is normal; having a record in cordis.patch.yml indicates a potential double-declaration issue.
Typical Usage¶
- Install and restart DSH. Open the web UI and locate the cost pill in the stats bar below the input box (it appears once billing data is available).
- Observe the accumulated total on the left and the “last turn” amount on the right as the conversation progresses.
- To verify the hit/miss breakdown or view costs for specific past turns, click the pill to open the panel. Click a Turn title to jump to the corresponding turn and verify the context and model.
- The price list refreshes from the official pricing page when needed. If you are concerned about whether unit prices are up-to-date, use it in a networked environment and check if the breakdown in the panel seems reasonable.
Scenarios & Notes¶
Suitable for: Users engaging in long sessions or multi-turn Agent development within DSH who wish to see RMB costs alongside built-in token statistics and distinguish between cache-hit and cache-miss costs.
Notes:
- The plugin runs under the permissions of the current DSH process. Please read the GitHub repository source code and MIT license before installing to determine if it meets your security and compliance requirements.
- Network access is used for refreshing the price list; in offline scenarios or when the pricing page is unreachable, behavior depends on the plugin implementation. It is recommended to confirm limitations in the README before use.
- Installing via GitHub URL on the desktop client may fail; use the npm package name
dsh-bottom-costinstead. - The DSH ecosystem emphasizes “Everything is a plugin”; the community directory SkillHub Plugin Page is an independent site and has no official affiliation with DeepSeek or Hithink RoyalFlush (Huanfang).
Conclusion¶
dsh-bottom-cost consolidates “How much did this session cost, how much was the last turn, and how much was for hits vs misses” into a single pill and an expandable per-turn list within the composer stats bar. Prices are refreshed on demand based on the official table. If you are already using DSH web (or desktop via the npm package name), you can add the plugin and restart the process to begin using it.
- Directory Page: https://www.skillhub.cn/plugins/LanFeng97/dsh-bottom-cost
- GitHub: https://github.com/LanFeng97/dsh-bottom-cost