Han-1413141/dsh-cost-meter

Cost tracking for DeepSeek Harness: session and model costs, token usage, budgets, provider balances, and coding-plan quotas. Bilingual English/Chinese UI.

What it solves

dsh-cost-meter is a session cost tracking plugin for the DeepSeek Harness (DSH) web GUI. It solves the problem of opaque AI model usage costs, providing real-time visibility into how much money or quota is being spent per conversation, per day, and across multiple AI providers. It specifically handles the complexity of mixing pay-as-you-go API costs with subscription-based "coding plans" (like Claude Pro or OpenRouter), which often have different billing cycles and quota limits.

How it works

The plugin integrates directly into the DSH interface, adding cost statistics, balance displays, and budget alerts. It tracks token usage (input, cache, and output) and calculates costs based on a built-in catalog of over 170 models. It can sync prices from official documentation or allow manual overrides. For subscription plans, it queries external endpoints to fetch current quota levels. It also features a peak/off-peak pricing system that alerts users when pricing tiers change based on UTC time and public holidays.

Who it’s for

Users of the DeepSeek Harness web GUI who want to precise control over their AI spending, especially those using multiple LLM providers (e.g., Anthropic, Google Gemini, OpenAI) or those on specialized coding plans with limited quotas.

Highlights

  • Comprehensive Cost Tracking: Tracks per-conversation, daily, weekly, and monthly costs, including a Codex-style token usage heat grid.
  • Multi-Vendor Support: Built-in pricing for 170+ models and support for various coding plan quotas (Anthropic, Z.ai, MiniMax, Kimi, etc.).
  • Budgeting and Alerts: Set custom budget limits with progress bars and system notifications for peak/off-peak pricing shifts.
  • Flexible Balance Lookup: Supports custom HTTP balance lookups (e.g., LiteLLM, NewApi) with configurable extraction rules.
  • Official Price Sync: One-click synchronization of prices from official provider documentation.
  • History Import: Automatically imports historical session logs to calculate costs for conversations that occurred before the plugin was installed.

Related

  • Project
  • Project
  • Project
  • Project
  • Project