返回目录
开发工具 插件

dsh-api-cost

OrstedOshua/dsh-api-cost

API cost tracker for DeepSeek Harness: per-chat token cost, configurable prices, currency+language selectors, live exchange rates.

Stars
0
Forks
0
Issues
0
更新
5 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:OrstedOshua/dsh-api-cost

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-api-cost

A DeepSeek Harness plugin that tracks API token cost from real usage data, per chat, with configurable prices, currency + language selectors, and live exchange rates.

Features

  • Per-chat cost — listens to session events (assistant/message with the provider-reported usage) and accumulates cost separately for every chat.
  • Price freeze on use — each token is billed at the prices in effect when the request happened; changing prices never rewrites already-spent amounts.
  • Session-header indicator — shows the current chat's cost next to the context indicator; click opens a menu (prices, clear this chat, counting switch).
  • Flexible prices — set a price per 1M tokens separately for input, output and cache tokens.
  • Language — Russian and English UI (selectable in settings).
  • Currency — RUB / USD / EUR / CNY (selectable in settings).
  • Live rates — exchange rates auto-loaded hourly from a free, open source (open.er-api.com) and shown in settings.

Install

The package is a standard DSH bundle. Add it from its source (npm package or GitHub): use the DSH plugin manager or the /plugin-manager command. After installation:

  1. Enable the dsh-api-cost plugin.
  2. Open Settings → API Cost: pick language and currency, set prices, save.

Development

# syntax check
node --check lib/client.js
node --check lib/index.js

State is stored in $DSH_HOME/token-cost-state.json (or ~/.dsh/token-cost-state.json).

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类开发工具
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: api。