
Jolly-J/dsh-deepseek-billing
40Last commit Aug 14, 2026
dsh-deepseek-billing DSH plugin
This plugin adds a collapsible card to the left sidebar of DSH web, displaying your DeepSeek account balance and the cost of the current session. It fetches balance directly from DeepSeek's official API using the same API key as the model, and calculates session costs based on official pricing. The card auto-refreshes every 60 seconds and collapses when the sidebar is narrow.
How to install the dsh-deepseek-billing DSH plugin
dsh plugin --profile web add https://github.com/Jolly-J/dsh-deepseek-billing.gitCopying does not run this command. Review the repository and version before installing the dsh-deepseek-billing DSH plugin.
dsh-deepseek-billing DSH plugin data source
dsh-deepseek-billing DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-deepseek-billing DSH plugin can do
- Real-time display of DeepSeek account balance and current session cost
- Expandable card showing detailed data: recharge/gift balance, input/output tokens, cache hit rate, etc.
- Auto-refresh every 60 seconds; updates automatically when switching sessions
- Automatically hides when the sidebar is collapsed to avoid clutter
- Smooth scroll animation when numbers change; collapses when clicking outside the card
Where the dsh-deepseek-billing DSH plugin fits
- Monitor account balance to avoid interruptions during model calls
- Track session spending for budget control
- View detailed usage and cache hit rate to optimize API usage
- Quickly refresh balance to see the latest status
Who the dsh-deepseek-billing DSH plugin is for
- Developers using DeepSeek Harness web interface
- Users who need to manage API call costs or monitor balance
dsh-deepseek-billing DSH plugin limitations
- Session cost is calculated only for the current session; sub-agent sessions are not aggregated
- Pricing table is hardcoded; plugin must be updated when DeepSeek changes prices
- Session cost is an estimate, not a bill; discrepancies with actual balance may occur due to invisible charges (failed retries, background calls, etc.)
dsh-deepseek-billing DSH plugin: from the repository README
Quoted from the Jolly-J/dsh-deepseek-billing README, the upstream source of the dsh-deepseek-billing DSH plugin. Copyright remains with the original authors.
给 [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)(DSH)网页版装一个**余额小卡片**:在左侧边栏底部实时显示你的 DeepSeek **账户余额**,以及**当前会话花了多少钱**。 ## 效果图 | 图 1 | 图 2 | | --- | --- | | <img src="docs/images/view-1.png" width="400" alt="效果图 1" /> | <img src="docs/images/view-2.png" width="400" alt="效果图 2" /> | 卡片长这样: - **一行摘要**:绿点状态 · `余额:¥xx.xx元` · `会话:¥x.xxx` · 刷新按钮 · 箭头; - **点一下展开**:显示充值/赠送余额、输入/输出 token、缓存命中率、本会话费用(标注“非账单”); - 点卡片外面自动收起;数字变化时是滚动动画;切换会话自动跟着变; - 侧边栏收起(窄栏)时自动隐藏,不挡东西; - 每 60 秒自动刷新一次。 ## 安装 ### 方式一(最简):一条命令 ```sh dsh plugin --profile web add https://github.com/Jolly-J/dsh-deepseek-billing.git ``` 装完重启 `dsh web` 即可(插件会自动作为 profile 层加入组合;`lib/` 产物已随仓库提交,无需本地构建)。 ### 方式二:让 AI 帮你装 你不会装也没关系。**把本仓库地址发给你的 DSH 智能体**,对它说一句: > 帮我把这个插件装到我的 DSH 里:<仓库地址> 你的智能体照着下面 6 步做完,重启 `dsh web` 就好了: 1. 把本仓库放到 DSH 项目的 `packages/extensions/dsh-deepseek-billing`; 2. 在 `packages/bundle/web-app/cordis.patch.yml` 里加一行: ```yaml - id: ui-deepseek-billing name: 'dsh-deepseek-billing' ``` 3. 在 `packages/bundle/web-app/package.json` 的 `dependencies` 里加: ```json "dsh-deepseek-billing": "workspace:^" ``` 4. 在根目录 `tsconfig.client.json` 的 `references` 里加 `{ "path": "./packages/ex
Read the full READMERepository license: MIT
dsh-deepseek-billing DSH plugin questions
How do I install this plugin?
Run the command `dsh plugin --profile web add https://github.com/Jolly-J/dsh-deepseek-billing.git` in your terminal. Then restart `dsh web`. If you prefer, you can ask your DSH agent to do it by providing the repository URL.
Where does the plugin get the balance data?
It calls DeepSeek's official balance API using the same API key that your model is already using. No additional configuration is needed. The key is only used temporarily in memory and is never stored or sent elsewhere.
Is the session cost accurate?
The session cost is an estimate based on official pricing and usage logs. It may differ from the actual bill because failed retries, background model calls (e.g., session title generation), and delayed balance updates are not included. The balance displayed is the authoritative source.
How secure is my API key?
The plugin does not store, steal, or transmit your API key. It only requests the key from DSH in memory, uses it for a single curl call to the balance API, and discards it. The key never appears in command-line arguments, logs, or web responses. However, processes with the same privileges on the same machine could theoretically read the environment variable.
Does the plugin support sub-agent sessions?
No. Currently, the session cost calculation only covers the current session. Sub-agent sessions are not aggregated. This is a known limitation.