Introduction¶
When using multiple models in DSH (DeepSeek Harness), knowing the token count alone does not directly equate to cost. Developers also need to combine model pricing, session usage, and budget alerts to determine if the current call is on track.
dsh-plugin-cost-tracker is a Token cost tracker for DeepSeek Harness, used to track token usage, calculate costs, and inject cost awareness into system prompts when needed. Below is an introduction to its features, installation methods, and typical usage.
What is it¶
The one-sentence positioning of dsh-plugin-cost-tracker is: Token cost tracker for DeepSeek Harness..
The maintainer is YYTbit, and the license is MIT. It targets scenarios where users need to view token usage in DSH sessions, estimate model costs, and trigger budget alerts based on configuration.
Core Features¶
According to the repository README, it provides the following capabilities:
- Track token usage for each session
- Calculate costs based on model pricing
- Inject cost awareness into system prompts
- Provide a CLI tool for cost estimation
The list of supported models listed in the README includes:
deepseek-v4, deepseek-v4-flash, deepseek-r1, deepseek-vl2
gpt-4o, gpt-4o-mini, gpt-5.2
claude-sonnet-4, claude-opus-4, claude-haiku-4
gemini-2.5-pro, gemini-2.5-flash
Installation and Usage¶
First, select the DSH profile to install. The your-profile in the command is a placeholder and needs to be replaced with the actual profile name. Execute the following command to add the plugin:
dsh plugin --profile your-profile add dsh-plugin-cost-tracker
Typical Usage¶
CLI Cost Estimation¶
The README provides the following CLI example for estimating cost based on a specified model and input/output token counts:
cost --model deepseek-v4 --input 10000 --output 5000
Configuration Example¶
The configuration example provided in the README is as follows:
- id: cost-tracker
name: dsh-plugin-cost-tracker
config:
defaultModel: deepseek-v4
budgetWarning: 5.0
enableInjection: true
The configuration items appearing in the example include defaultModel, budgetWarning, and enableInjection. If you don’t want the plugin to inject cost awareness into system prompts, you can focus on the enableInjection configuration.
Use Cases and Notes¶
Suitable for developers who use multiple models in DSH, need to view session token usage, estimate costs, or enable budget alerts.
Notes:
- The plugin runs with the permissions of the current
dshprocess; check the source code and license before installing. - This plugin will inject cost awareness into system prompts; if the project has strict requirements for prompt formatting, you need to evaluate the impact before enabling it.
- The list of supported models is based on the README; when switching models or adjusting the budget, confirm that the configuration items match the model names.
Brief Conclusion¶
dsh-plugin-cost-tracker consolidates token usage tracking, model cost estimation, budget alerts, and system prompt injection into a DSH plugin, making it suitable as a cost visibility plugin in DSH.
Community Directory Page: The verified materials currently do not provide a specific URL; you can search in the DSH plugin directory using the plugin name dsh-plugin-cost-tracker.
GitHub: https://github.com/YYTbit/dsh-plugin-cost-tracker