DSH Plugins Marketplace

DSH Plugins

Plugins

/

Development & Infrastructure

/

dsh-deepseek-usage

s

dsh-deepseek-usage

Manifest valid

DeepSeek Usage · Balance Panel (DeepSeek Harness Web Client Plugin) | A clean DeepSeek usage & balance panel for DeepSeek Harness

UI (client)hasBundlePatch

dsh-deepseek-usage

DeepSeek 平台用量面板(DeepSeek Harness Web GUI 客户端插件):

  • 💳 账户余额:api.deepseek.com/user/balance(官方公开接口,Bearer API Key)
  • 📊 平台用量:镜像 platform.deepseek.com/usage 页面的数据 —— 今日/本月 token 与花费、请求数、缓存命中/未命中/输出分类、Top 模型、每日用量热力图、 按月翻页与单日明细(平台私有 dashboard 接口,Bearer userToken)
  • 🧩 位置:侧边栏底部「DeepSeek 用量」入口(sidebar.footer.action), 徽标上直接显示当前余额;点击打开浮动面板,收起侧边栏时变为圆形图标按钮
  • 🔒 安全:服务端两个接口仅接受本机回环 GET;userToken 默认从 ~/.dsh/.credentials.yaml 的 DEEPSEEK_PLATFORM_TOKEN 读取,也可以在面板里 粘贴(只存浏览器 localStorage,仅随请求头发给本机 dsh 服务,绝不落盘)

安装

dsh plugin --profile web add "file:/绝对路径/dsh-deepseek-usage"
# 或者发布到 npm 后:dsh plugin --profile web add dsh-deepseek-usage

重启 dsh web 并在浏览器里硬刷新,侧边栏底部会出现入口。

凭据

数据凭据说明
余额DEEPSEEK_API_KEY(默认 ref,可配 apiKeyRef)通常已配置在 ~/.dsh/.credentials.yaml
平台用量DEEPSEEK_PLATFORM_TOKEN(默认 ref,可配 platformTokenRef)平台登录会话 token,见下

获取 userToken

  1. 浏览器登录 https://platform.deepseek.com
  2. 打开 F12 → Application(应用)→ Local Storage → platform.deepseek.com
  3. 复制 userToken 的值

两种配置方式任选其一:

  • 面板内「配置会话 token」粘贴(推荐,即时生效)
  • 写入 ~/.dsh/.credentials.yaml:
refs:
  DEEPSEEK_PLATFORM_TOKEN: <userToken>

未配置 userToken 时面板仍显示余额,用量区会给出配置引导。

可选配置

cordis.patch.yml 的 insert 条目可加 config:

- insert:
    - id: deepseek-usage
      name: dsh-deepseek-usage
      config:
        apiKeyRef: DEEPSEEK_API_KEY        # 默认
        platformTokenRef: DEEPSEEK_PLATFORM_TOKEN  # 默认
        refreshMs: 300000                  # 服务端缓存 TTL,默认 5 分钟
        timeoutMs: 15000                   # 上游请求超时,默认 15s

接口

端点说明
GET /api/deepseek-usage/summary?month=&year=余额 + 指定月份用量聚合(带缓存)
GET /api/deepseek-usage/refresh?month=&year=同上,强制刷新

搭配 Codex 用量插件

本面板专注 DeepSeek 平台的余额与用量展示;如果你想看 Codex (ChatGPT 订阅) 的配额—— 5h / 7d / month 滚动窗口用了多少、多久重置——配套 host 插件 dsh-codex-usage 会把 Codex 配额 + DeepSeek 余额聚合成 GET /api/dsh-usage/overview,本面板的「Codex 订阅」 区块直接消费它(缺端时静默隐藏)。

💡 有 ChatGPT Plus 账号? 搭配 DSH 的 Codex 子代理,日常写码、查资料、跑测试 可以交给 Codex 分担 DeepSeek 的 token 压力;面板在 Codex 干活的同时帮你盯着订阅 额度,真正做到"物尽其用"。

数据源与致谢

  • 平台接口(/api/v0/usage/amount、/api/v0/usage/cost、/api/v0/users/get_user_summary) 及其响应结构、聚合口径参考 CodexBar 的 DeepSeek provider 文档 与 DeepSeekUsageCostParser.swift(MIT)。这些是 platform.deepseek.com 的私有 dashboard 接口,非公开 API,可能随上游变化。
  • DSH 插件骨架与回环护栏借鉴 @ychris12138/dsh-usage-stats (MIT):dsh.bundle.patch + dsh.client + window.__ModuleLoader__.load 打包方式、 sidebar.footer.action 插槽注册、webServer.register 精确路由与 loopback 判定。
  • 官方文档:client-modules、 ui-sidebar(slot 契约)。

License

MIT

Compatibility

DSH 0.2.2-alpha.2: failedDSH 0.2.1-rc.2: failedDSH 0.1.7-alpha.2: failed

Versions

Latest versionPublishedSize
0.1.0——

Comments

Loading…

Similar plugins

dsh-deepseek-usage-panel

by WeiyangPro

一个用于DeepSeek Harness(DSH)的用量监测面板(目前仅支持DeepSeek官方模型)

UI & ExperienceManifest valid

★ 9

↓ 36/wk

MIT

JavaScript

Sep 17, 2026

dsh plugin --profile web add dsh-deepseek-usage-panel

by kai-GitHubaccount

DeepSeek 余额 + Token 用量面板(DSH Web):三级预警、自定义阈值、一键充值、缓存命中率 | Balance & usage panel for DeepSeek Harness

Tools & CapabilitiesDevelopment & InfrastructureManifest valid

★ 0

MIT

JavaScript

Sep 21, 2026

dsh plugin --profile web add dsh-usage-panel

by yunshu-iii

DSH Harness 桌面端插件:窗口底部状态栏显示 DeepSeek API 余额与 token 用量 | Desktop plugin for DeepSeek Harness

Manifest valid

★ 0

MIT

JavaScript

Oct 23, 2026

dsh plugin --profile web add dsh-api-usage-meter

by Huasecc

DeepSeek 用量面板—DSHWeb GUI 余额与Token用量仪表盘

Models & ProvidersManifest valid

★ 0

MIT

JavaScript

Sep 6, 2026

dsh plugin --profile web add @dsh-external/dsh-usage

by xie-tj

Persistent token-usage ledger and Web Usage dashboard for DeepSeek Harness.

Tools & CapabilitiesModels & ProvidersManifest valid

★ 2

MIT

JavaScript

Sep 15, 2026

dsh plugin --profile web add dsh-plugin-usage-ledger

by kane-le

DeepSeek API 用量与余额查看插件(DSH Plugin)· /usage 命令实时查询余额并汇总本机 token 用量

Development & InfrastructureModels & ProvidersManifest valid

★ 0

MIT

JavaScript

Aug 25, 2026

dsh plugin --profile web add dsh-deepseek-usage