DeepSeek Harness Plugin Hub

发布与管理完整 Harness Profiles,发现适合你的插件。

探索

插件目录环境预设文档中心动态

社区

发布插件联系我们报告问题

相关链接

Plugin Hub GitHubDeepSeek Harness 官方项目系统状态隐私说明
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

独立、非官方社区项目,与 DeepSeek 官方无隶属、授权或背书关系。

Openrouter Spend — DeepSeek Harness 插件(DSH Plugin)
← Plugins

dsh-openrouter-spend

Openrouter Spend

DeepSeek Harness 插件:显示 OpenRouter 账户今天实际收取的费用——按聊天和总计分别显示,可在输入框下方和设置中查看,并按模型和 API 密钥拆分。

插件会安装到这里;不确定时保持 web。

npx -y @deepseek-ai/dsh plugin --profile web add dsh-openrouter-spend@0.6.0
README兼容性版本

兼容性与来源证明

Openrouter Spend 以 dsh-openrouter-spend 发布,当前版本为 0.6.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
web
发布来源
npm
Registry 更新时间
2026/10/16

版本

0.6.0stable
2026/10/14
0.5.0stable
2026/10/12
0.4.1stable
2026/10/11
查看其余 8 个版本收起版本
0.4.0stable
2026/10/9
0.3.2stable
2026/10/7
0.3.1stable
2026/10/6
0.3.0stable
2026/10/6
0.2.0stable
2026/10/6
0.1.2stable
2026/10/5
0.1.1stable
2026/10/5
0.1.0stable
2026/10/5

相关插件

正在加载相关插件…

最新版
0.6.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
252.5 kB
文件数
14
Surface
web
许可证
MIT
发布源
npm
GitHub
★ 0
周下载
510
安全扫描
✓ v0.6.0 扫描通过
最近提交
2026/10/14
查看源码 ↗项目主页 ↗
README Badge

点击下方 Badge 复制 Markdown,粘贴到 README 即可。

这是你的 Plugin?认领权益 · 优先安全扫描

验证 package.json 声明的 GitHub 仓库,即可管理这个公开页面。认领后,Hub 会优先安排当前版本的安全扫描,并在通过后公开展示结果。

认领这个 Plugin →
报告问题
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录

README

OpenRouter spend icon

dsh-openrouter-spend

OpenRouter spend inside DeepSeek Harness — billed USD from OpenRouter's own analytics API, not token estimates priced from a local table.

English | 中文 | Русский

What you get

Spend chip under the composer
The chip under the composer: this chat's spend over the day's total, next to the session's token and context stats.

Spend popover
The popover: range and API-key filters, today's spend per model, daily bars, prepaid balance and lifetime spend. The screenshot predates the limit block and the failed-refresh state added in 0.4.0 — the [limit-notice mockup](docs/mockups/limit-notice.html) shows how those look.

  • Chip under the composer — session/day: what this chat spent today on one API key over that same key's spend today, following the selected key. Both figures name one key (see ADR 0006).
  • Chip popover — range and API-key filters, today's spend per model, a daily bar chart across the window, prepaid balance and lifetime spend.
  • Settings → OpenRouter spend — store or clear the management key, pick the display currency (USD, or RUB at the cbr.ru rate), set the refresh interval, filter by API key.
  • Limit warning — off by default. Turn it on in Settings and the popover shows how much of the tracked key's limit is left: the share consumed, how long the remainder lasts at the current pace, and when the cap refills. The chip's dot turns amber and then red as the cap approaches, and a toast fires once when the level escalates.
  • Account balance warning — the prepaid balance is judged like the lifetime cap it is: when it buys under three days at the median account pace (under one day, or at the mean of the last three days, is critical) the dot alarms, the popover's balance block says the money and the days it buys — $6.58 left · under a day at this rate · shared by all keys — instead of a bare percent or a total the panel shows nowhere else, and a toast says to top up. See ADR 0007 for the metric and ADR 0010 for the sentence.
  • Raise the limit — the limit block, and the toast when it fires, offer the raise that keeps the cap from stopping work: one click raises the key's spend limit through the same management key. The offered figure follows the amount and the pace — the cap plus the period's burn for a period cap that is burning fast, half again as much otherwise — with a custom field beside it for a figure of your own. Only a raise is accepted, and at most 10× the current cap; a key that carries no limit has to be given one in OpenRouter first. A $10 daily cap at $8.50 burned offers $18.5. The offer is stated in the account's own money (USD) — that figure is what is sent — with your display currency beside it as a read-only echo, Raise to $15.00 · ≈ 2114.67 ₽, which disappears when cbr.ru is unreachable. See ADR 0008.

The host half caches the summary for refreshSeconds and coalesces concurrent refreshes, so any number of open tabs cost one OpenRouter query per refresh window. When a refresh fails, the last good figures stay on screen and the reason is shown instead of an empty panel: the popover names the fault, counts down to the next automatic attempt (15 seconds after the first failure, then 30, then the ordinary interval), and offers Retry now to read again immediately.

Requirements

  • DeepSeek Harness web profile. The plugin needs the credentials, webServer, and connection services and stays inactive in profiles without them (for example, headless).
  • An OpenRouter Management API key — OpenRouter dashboard → Settings → Management API Keys → Create New Key (OpenRouter docs). A regular inference key is rejected: 403 Only management keys can perform this operation.

Install

From npm (web is the default web-GUI profile; use your own profile name instead if you run one):

dsh plugin --profile web add dsh-openrouter-spend

From GitHub (plain JavaScript, no build step and no build-script permission):

dsh plugin --profile web add github:RyabykinIlya/dsh-openrouter-spend#v0.6.0

Then open Settings → OpenRouter spend and paste the management key.

Configuration

Every field can be overridden in the profile's cordis.patch.yml row; the schema validates the row at activation and names the offending field.

FieldDefaultBoundsMeaning
credentialRefOPENROUTER_MGMT_API_KEYnon-empty stringCredentials reference holding the management key
apiBasehttps://openrouter.ai/api/v1https:// URLOpenRouter REST API root
refreshSeconds6010–3600, integerSeconds between OpenRouter refreshes
historyDays302–366, integerDays of history the summary window covers, today included
cbrUrlhttps://www.cbr.ru/scripts/XML_daily.asphttps:// URLCBR daily-rates sheet read for the RUB rate
rateRefreshSeconds360060–86400, integerSeconds between cbr.ru rate reads
timeoutMs150001000–120000, integerPer-request deadline against OpenRouter and cbr.ru
warnConsumedFraction0.40.05–0.95Share of a periodic cap consumed that raises the warning level
criticalConsumedFraction0.80.1–1Share of a periodic cap consumed that raises the critical level
burnWindowDays71–30, integerTrailing days of hourly burn read for the runway estimate

Viewing preferences (display currency, per-key filter, refresh interval override, the limit-warning switch) are browser-local (localStorage). The limit warning stays off until it is turned on.

burnWindowDays reads one row per hour and key. Past 5000 rows the read is refused rather than truncated, so a long window combined with many simultaneously active keys does not mix: the runway estimate reports the refusal and names this setting, and narrowing burnWindowDays is the fix.

What the numbers are

  • Figures are total_usage — USD OpenRouter actually billed — from POST /api/v1/analytics/query, grouped per UTC day by API key and model.
  • "Today" is the current UTC day.
  • Balance is total_credits − total_usage from GET /api/v1/credits: what remains of prepaid credits.
  • The 7-day and 30-day ranges cover at most historyDays days; keep historyDays ≥ 30 for full coverage.
  • RUB display converts those USD figures at the cbr.ru daily rate, read host-side and cached for rateRefreshSeconds. When cbr.ru cannot be reached, the figures stay in USD and the panel says so, with the fetch reason and a hint to check the connection.
  • The chip's session half comes from the same analytics/query, grouped by session_id and api_key_id. The harness stamps each request with its Session id (x-session-id), and the host folds each session's delegated subagent sessions into its row, recursively: a delegated child runs as its own session and is billed on its own analytics row, so the figure is this session plus everything it delegated, and the chip shows session/day. The none bucket (requests sent without a session) is excluded — it belongs to no chat. The account-wide figures (today, 7 and 30 days, per key, per model, per day) already include descendant spend and are unchanged.
  • Both halves of the chip's pair name one API key: this chat's spend on it, over that same key's day. The key is the one selected in the popover, or the session's own key when no key is selected and the session used exactly one. When the key cannot be named — the session split could not be read, the lineage fold failed, no selected key matches any row, or a single session spans several keys — the chip shows a single scoped figure instead of a pair, and the popover says why. See ADR 0006.

Security

  • The management key is stored through the Harness credentials service (credentials.set), not in this package's files, and is never echoed back to the browser.
  • The summary, credential and limit-raise routes are fenced by the connection trust check. Anyone who passes that check — by default, the browser session on your local Harness port — can read your spend figures and raise a key's limit. Do not expose the Harness web port publicly without its own authentication.
  • The limit raise sends the management key in the Authorization header and the key's name in the body; the key's hash is resolved host-side and never travels to the browser.

License

MIT. Unofficial plugin; not affiliated with OpenRouter or DeepSeek.

相关插件

继续浏览 models-usage 分类下经过校验的插件。

Whale Widgetdsh-whale-widgetDSH Web 界面右下角的 DeepSeek 余额小鲸鱼挂件:余额/今日已用/峰谷定价、自定义泡泡点击序列(文本/余额/今日/峰谷/图片/随机语句与并列加权选择)、逐行样式与字体、悬浮快捷编辑、音效与每轮消耗、自定义角色/动图/音效、吸附与翻转自定义Client Ui Model Capabilities@linxin666/dsh-client-ui-model-capabilities为自定义 pi-ai 提供商声明每个模型的能力(图像输入和推理力度),可直接在 Models 设置卡片中编辑;写入官方 llm-pi-ai 设置命名空间,不更改 DSH 源代码。Codex Subscriptiondsh-codex-subscription通过 OAuth 在 DeepSeek Harness 中使用 ChatGPT 和 Codex 订阅,支持配额管理、安全重置、网页搜索、图像和快速模式Plugin Subscriptionsdsh-plugin-subscriptions将 ChatGPT (Codex)、Claude、Grok (X Premium)、GitHub Copilot 和 Google Antigravity 订阅用作 DeepSeek Harness LLM 提供商,并通过网页设置页面使用 OAuth 登录