dshbase

Plugin directory / Developer / dsh-quota-meter

dsh-quota-meter

Unverified huolianjiao

Builds on 4 official DSH packages

View on GitHub ↗ ← Back to plugin directory

1Stars
0Forks
0Open issues
—Language
—Last push
Cross-platformPlatform

What it does

DSH Web 插件:在侧边栏底部实时显示 DeepSeek API 剩余额度,并按「当前模型 × 低峰/高峰计价」估算可用 token 数,附每轮实际花费图。

Our take

No short evidence report

There is no checkable per-level test record on this page. Stars, the catalog test field, a web-only flag, and whether the plugin needs an external account or service are not shown here as a pass or a failure. The catalog badge stays as published.

“Unverified” means our automated CI has not yet installed this plugin. Feature descriptions and version compatibility are the author’s claims. This is not a security audit and not an endorsement of third-party code.

Plugin author? Get the “Verified” label — submit your own evidence (screenshots, logs, or a short demo) and we'll review and flip the badge.

Submit verification evidence ↗

README

dsh-quota-meter

DSH Web 插件:在侧边栏底部实时显示 DeepSeek API 剩余额度,并按「当前模型 × 低峰/高峰计价」估算可用 token 数,附每轮实际花费图。

功能

  • 余额徽章:收缩侧边栏时是带状态圆点的图标;展开时显示「余额 · 估算 token · 时段」一行。
  • 详情面板:总余额 / 赠送余额 / 充值余额、可用状态、按模型 × 低峰/高峰的混合估算与缓存区间(0%–100% 命中边界,当前时段高亮)。
  • 实测用量:缓存命中率、输入/输出占比、每轮实际花费柱状图(按每轮自己的时间戳计价,悬浮显示明细)。
  • 可视化配置:设置页直接编辑计价表、高峰时段、回退占比等,保存即生效,无需重启。
  • 安全:API key 只在本地 host 进程解析,绝不下发浏览器;余额接口仅回环地址可访问。

安装

Requires dsh ≥ 0.1.0-rc.6 and a configured DeepSeek API key.

# Install from GitHub (recommended)
dsh plugin --profile web add github:huolianJiao/dsh-quota-meter

# Or install from a local checkout
dsh plugin --profile web add link:./dsh-quota-meter

装好后重启 web profile(重新执行 dsh web),刷新页面即可。

配置 API Key

插件默认读取凭据引用 DEEPSEEK_API_KEY(可在设置页切换)。任选其一:

  • 环境变量:DEEPSEEK_API_KEY=sk-...
  • 或写入 DSH 凭据文件 $DSH_HOME/.credentials.yaml:
DEEPSEEK_API_KEY: sk-...

配置

  • 设置页(推荐):Settings → 「DS API 计费 / DS API Billing」,可视化编辑计价表、高峰时段、回退占比等,保存立即生效。
  • 补丁文件(固化默认值):在 profile 的 cordis.patch.yml 按 id 覆盖,重启生效:
- id: dsh-quota-meter
  config:
    apiKeyEnv: DEEPSEEK_API_KEY
    baseURL: https://api.deepseek.com
    pollIntervalMs: 60000
    summaryModel: deepseek-v4-pro
    peakWindows:
      - { start: "09:00", end: "12:00" }   # 北京时间,[start, end)
      - { start: "14:00", end: "18:00" }
    pricing:                                # 元 / 百万 token
      - model: deepseek-v4-flash
        offPeak: { input: 1.5, cacheHit: 0.05, output: 4.5 }
        peak:    { input: 3.0, cacheHit: 0.10, output: 9.0 }
      - model: deepseek-v4-pro
        offPeak: { input: 4.5, cacheHit: 0.15, output: 13.5 }
        peak:    { input: 9.0, cacheHit: 0.30, output: 27.0 }

开发

零构建,改完即用:

  • lib/client.js(浏览器端):刷新页面即可生效;
  • lib/index.js(host 端):重启 web profile 生效。
npm test   # 运行 smoke 测试

License

MIT

Install

🧩 Let your agent install it (recommended)

Install the catalog once, then DeepSeek Harness can find and install any plugin from this site automatically:

dsh plugin add dshbase-catalog

Then say "install dsh-quota-meter for me" — your agent finds it in the directory and installs it. Docs: dshbase-catalog · verified packs.

This plugin is GitHub source (not published to npm) — install it straight from the repo:

Web profile:

dsh plugin --profile web add github:huolianjiao/dsh-quota-meter

Headless (CLI) profile:

dsh plugin --profile headless add github:huolianjiao/dsh-quota-meter

Test report

No short evidence report

There is no checkable per-level test record on this page. Stars, the catalog test field, a web-only flag, and whether the plugin needs an external account or service are not shown here as a pass or a failure. The catalog badge stays as published.

Security: not yet scanned — our daily static scan will cover it shortly.

Share this badge

More in Developer

Browse all 26846 plugins →