deepseek-ai-dsh-api-cost: An API Cost Monitor Plugin for DeepSeek Harness
moyunlee/deepseek-ai-dsh-api-cost
A DSH plugin that shows real-time token usage, cost, and balance in the DeepSeek Harness Web sidebar, with CSV reconciliation, budget alerts, and light/dark themes.
deepseek-ai-dsh-api-cost is an API cost monitor plugin that lives in the DeepSeek Harness Web sidebar, making every conversation's token usage and spend visible in real time. It queries the official balance endpoint directly; hover the badge to see balance, current conversation/today/monthly usage, and 7-day trends, and click it to jump to the settings dashboard. It includes CSV reconciliation, budget alerts, a local ledger, and light/dark themes, maintained by MoyunLee under the MIT license. With it, DeepSeek API costs are no longer a mystery.
How to Install
dsh plugin --profile web add github:moyunlee/deepseek-ai-dsh-api-cost- Category
- Models & Reasoning
- Platform
- DSH Plugin
- Author
- moyunlee
- Distribution
- Plugin
deepseek-ai-dsh-api-cost Key Features
deepseek-ai-dsh-api-cost Repo Summary
What Does It Do?
DeepSeek AI DSH API Cost is a DSH plugin for DeepSeek Harness that monitors API costs, showing real-time token usage, spend, and account balance in the web sidebar. It solves the problem of opaque DeepSeek API costs and difficult reconciliation, letting you track every expense directly inside the harness without manual billing checks. Core capabilities include real-time balance, usage statistics, CSV reconciliation, budget alerts, and a local ledger. It is maintained by MoyunLee and released under the MIT license.
Core Features
- Real-time balance: queries the official balance endpoint directly, keeping API keys on the server; hover the badge for full details.
- Usage statistics: breaks down tokens and costs by current conversation, today, this month, and overall, filterable by model.
- CSV reconciliation: imports official CSV files, recalculates local amounts using official unit prices, and highlights discrepancies; can also calibrate the local price table.
- Budget alerts: set a monthly limit and receive webhook notifications when exceeded.
- Local ledger: logs every call to a JSONL file and recalculates historical amounts using the current price table after restarts.
- Light/dark themes: follows the system or locks to day/night manually, synced across three panels.
How to Use This Plugin?
After enabling it in DSH, a balance/spend badge appears at the bottom-left of the sidebar, showing real-time increments during generation. Hover over the badge to view balance, current conversation/today/monthly usage, 7-day trends, and recent calls; click it to jump to the "Usage & Spend" dashboard in settings. For reconciliation, click "Verify Official CSV" and select the official export; local amounts are recalculated using official unit prices for comparison, and "Calibrate with Official Prices" writes those prices into the local table. Configuration is done by overriding lines in the profile's user-level config file, supporting custom model prices, peak/off-peak billing, and monthly budgets.
This page is an independent rewrite of the plugin's official README — for authoritative documentation and the latest changes, refer to the source: moyunlee/deepseek-ai-dsh-api-cost. The plugin is third-party code that runs on your machine once installed; inclusion does not imply endorsement — please review the source before installing.
