dsh-plugin-cost-tracker

by yytbit

3 开发与运行时github收录于 08-23

DeepSeek Harness 的 token 成本追踪

Token cost tracker for DeepSeek Harness

安装

dsh plugin --profile web add github:yytbit/dsh-plugin-cost-tracker

GitHub 源码安装:首次需按提示配置 allowBuilds 构建授权后重试

安装与环境配置指引、插件开发教程见 DSH 中文社区文档 ↗

安装即在你的机器上以你的权限运行第三方代码——它可读写文件、使用凭据、访问网络,DSH 的工具审批不会为插件代码加沙箱。「检测到 manifest」仅代表发现 dsh.bundle / dsh.plugin 清单,不构成兼容性或安全审查;安装前请审阅源码,不熟悉的插件先在不含密钥的环境试用。

README

目录

Token cost tracker for DeepSeek Harness.

What it does

  • Tracks token usage per session
  • Calculates costs based on model pricing
  • Injects cost awareness into system prompt
  • Provides CLI tool for cost estimation

Install

dsh plugin --profile your-profile add dsh-plugin-cost-tracker

CLI

cost --model deepseek-v4 --input 10000 --output 5000
# Model: deepseek-v4
# Input: 10,000 tokens @ $0.27/M
# Output: 5,000 tokens @ $1.10/M
# Cost: $0.01

Supported models

  • 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

Configuration

- id: cost-tracker
  name: dsh-plugin-cost-tracker
  config:
    defaultModel: deepseek-v4
    budgetWarning: 5.0
    enableInjection: true

License

MIT -- YYTbit

原始 README: https://github.com/YYTbit/dsh-plugin-cost-tracker/blob/master/README.md ↗