Skills Plugins MCP Prompt Model 导航 博客 资讯 我的中心
工具与能力 #cost-tracker#deepseek#deepseek-harness#dsh-plugin

dsh-cost

DeepSeek Harness(DSH)插件:在输入框统计栏实时显示会话费用与 DeepSeek 账户余额——中文界面显示人民币,英文界面显示美元。

giantgkl @giantgkl ⬇ 2 ★ 3 main

安装

dsh plugin --profile web add github:giantgkl/dsh-cost
下载安装清单

需要可复现安装时,可在仓库后追加 #commit 固定提交。

DeepSeek Harness(DSH)插件:在输入框统计栏实时显示会话费用与 DeepSeek 账户余额——中文界面显示人民币,英文界面显示美元。

该插件未提供要点说明,请参考仓库 README。

cost-trackerdeepseekdeepseek-harnessdsh-plugin
  1. 安装并启动 DeepSeek Harness:npx @deepseek-ai/dsh web
  2. 在终端执行上面的安装命令(CLI 会解析插件并核验来源)
  3. 用 dsh plugins list 确认已安装,必要时重启 Harness 生效

插件以当前 dsh 进程的权限运行,安装时可能执行代码。请先通读仓库源码与许可证,确认无破坏性命令与越权访问;本站只做索引,不对第三方插件安全性作担保。

代码仓库github.com/giantgkl/dsh-cost
许可证MIT
主要语言main
下载量2
GitHub 星标3
最近推送2026-08-13
收录日期2026-09-19
分类工具与能力

事实信息来自公开插件目录快照(2026-10-01),介绍文案由本站再加工。

以下为插件仓库 README 全文(原始内容,由公开目录抓取整理)。

# dsh-cost

> [中文](README.zh.md)

DSH plugin for the [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): live conversation cost and DeepSeek account balance in the composer stats row. **Currency follows the UI locale: RMB (¥) in the Chinese UI, USD ($) in the English UI.**

## Features

- **Conversation cost**: cumulative token usage over the whole session log × official DeepSeek pricing, shown as a live estimate — `¥ 0.0123` in the Chinese UI, `$ 0.0018` in the English UI. Hover for the input/output/cache-read token breakdown and the pricing tier.
- **Account balance**: queries the official DeepSeek `GET /user/balance` endpoint. A USD account is converted to RMB in the Chinese UI; a CNY account is converted to USD in the English UI (estimated rate, noted in the tooltip). Click to refresh, auto-poll every 60 s.
- **DeepSeek only**: the cost hides itself for non-DeepSeek models; without a configured API key the balance shows "余额 — / Balance —".
- Supported models: `deepseek-v4-pro` / `deepseek-v4-flash` / `deepseek-chat` / `deepseek-reasoner` (other DeepSeek models are estimated with the v4-pro tier).

## Install

```sh
npm install dsh-cost
```

Then mount it in the deployment's `cordis.yml` (or a profile's `cordis.patch.yml`):

```yaml
plugins:
  - name: 'dsh-cost'
```

The web client is composed automatically via the `dsh.client` declaration (`platform: web`); no further configuration is required.

## Config

The Host half follows the `llm-deepseek` adapter settings (`$DSH_HOME/settings.yaml`):

| Setting | Default | Meaning |
| --- | --- | --- |
| `llm-deepseek.apiKeyEnv` | `DEEPSEEK_API_KEY` | Credential reference (environment-variable name) for the API key, resolved through the credentials service (`$DSH_HOME/.credentials.yaml` / environment / `.env`) |
| `llm-deepseek.baseURL` | `https://api.deepseek.com` | Base URL of the balance endpoint |

Without an API key the balance shows "余额 — / Balance —"; the cost display is unaffected.

## Pricing (USD, per 1M tokens)

| Model | Input | Output | Cache read |
| --- | --- | --- | --- |
| deepseek-v4-pro | $0.435 | $0.87 | $0.003625 |
| deepseek-v4-flash | $0.14 | $0.28 | $0.0028 |
| deepseek-chat | $0.28 | $0.42 | $0.07 |
| deepseek-reasoner | $0.55 | $2.19 | $0.14 |

- Cache writes are billed at the input price (DeepSeek has no separate write fee).
- Official DeepSeek USD pricing (the v4 tiers match the deployment's bundled pi-ai data). In the Chinese UI the same tiers are displayed in RMB.
- Balance conversion uses the estimated rate 1 USD ≈ ¥6.79 (2026-08 central parity 6.7888). To follow official price or rate changes, edit the `PRICING` table in `lib/client.js` and `USD_CNY` in `lib/index.js`.

## Privacy

- The API key is resolved through the credentials service and used only to send the Bearer request to `api.deepseek.com` — it is never logged, never placed on a command line, and never returned to the browser.
- The balance route lives on the harness web server's same-origin path `/api/plugins/dsh-cost/balance`; responses carry balance numbers only (no key) with `Cache-Control: no-store`.
- The balance request runs inside the Host process (native `fetch`), not through a sandboxed subprocess.

## Limitations

- DeepSeek models and the official DeepSeek balance endpoint only.
- Balance conversion uses a hard-coded estimated rate, not a live rate.
- The cost is an estimate based on official pricing (token counts come from the Harness `tokenUsage` projection; discounts and taxes are not included).

## License

MIT © 2026 GiantGKL

数据来源:公开的 DeepSeek Harness 插件目录与各插件 GitHub 仓库。本站为独立第三方目录,与 DeepSeek、幻方(High-Flyer)及插件作者均无隶属或背书关系。

每日精选 Skill 推荐,免费送到你邮箱

输入邮箱,每天接收一个精选 AI Agent 技能推荐。完全免费,持续更新。

提交后我们会发送一封确认邮件,点击邮件里的链接才会开始收信。

完全免费,取消任意时间。我们不会发送垃圾邮件。