DeepSeek Harness Plugin Hub

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

探索

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

社区

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

相关链接

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

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

Switch Cost — DeepSeek Harness 插件(DSH Plugin)
DeepSeek Harness Plugin Hub
ProfilesPlugins分类动态文档登录管理 Profiles
ProfilesPlugins分类动态文档登录
← Plugins
S

dsh-switch-cost

Switch Cost

将 dsh 会话的费用与其他模型进行比较:显示运行该会话的路由所产生的费用,以及相同令牌数量在其他地方的费用。

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

npx -y @deepseek-ai/dsh plugin --profile web add github:xyzs996/dsh-switch-cost#d2f66675fae8a78c3e58152f46378d97b8ecbfc3
README兼容性版本

兼容性与来源证明

Switch Cost 以 dsh-switch-cost 发布,当前版本为 0.1.0。Plugin Hub 会校验它的 manifest,并保存精确安装来源,便于复现安装结果。

DSH 兼容范围
*
运行环境
any
发布来源
github
Registry 更新时间
2026/8/24

版本

0.1.0stable
2026/8/24

相关插件

正在加载相关插件…

最新版
0.1.0
DSH
*
HMR
重启进程
Tree shaking
未声明可安全裁剪
解包体积
未提供
文件数
未提供
Surface
any
许可证
MIT
发布源
github
GitHub
★ 0
周下载
0
最近提交
2026/8/24
查看源码 ↗
README Badge

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

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

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

认领这个 Plugin →
报告问题

相关插件

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

Usage Stats@ychris12138/dsh-usage-statsdsh Web GUI 的令牌使用热力图、提供商余额和订阅配额Codex Connectdsh-codex-connect用于 DeepSeek Harness 的 ChatGPT OAuth 和 Codex 模型。Damage Pulsedsh-damage-pulseDeepSeek Harness 余额监控器,配有鲸鱼女孩伙伴,并为每次令牌消耗提供感知缓存的伤害动画。Agy Linkdsh-agy-link适用于 DeepSeek Harness 的 Google Antigravity(agy CLI)模型——将 Gemini/Claude/GPT-OSS 订阅流式接入 DSH,并支持思考过程、工具活动、令牌使用量以及在 GUI 中通过 Google OAuth 登录。

README

dsh-switch-cost

English | 中文

Prices the current session twice: once on the route that actually ran it, and once on every other route in the shipped price table. It answers "what did this cost" like the other usage plugins do, and then the question they don't — "what would the same traffic have cost somewhere else."

The session's usage is folded into token buckets keyed by route and by UTC hour, so a provider that bills different rates at different hours is priced hour by hour rather than at whichever rate happened to be in force when you asked. The fold records when; the price table decides what that hour costs.

Install

dsh plugin add dsh-switch-cost

Composes into any assembly that provides sessionProjections and tools. Both registrations sit behind ctx.inject(['sessionProjections'], …) — an assembly that composes no projection registry gets neither the projection nor the tool, rather than a tool that always answers zero.

Config

switch-cost:
  alternatives: 8   # how many other routes to report, cheapest first

Service surface

This plugin registers no service. It registers one projection unit and one tool.

Projection: switchCost

Host-only (no wire), stateVersion: 1. State:

{
  routes: { [`${provider}/${model}`]: { byHour: { [`${utcDay}-${utcHour}`]: Buckets } } },
  route: string | null,
  last: { turn, step, routeKey, hourKey, buckets } | null,
}

Buckets is { input, cacheRead, cacheWrite, output }. Hour keys are sparse; utcDay is 0–6 with Sunday first.

A step reports its usage twice — once as an assistant/chunk of type usage, once on the assembled assistant/message. The fold keeps last-wins per (turn, step): the second sample replaces the first instead of adding to it, and the withdrawal is made from the hour the first sample was originally filed under, not the hour the replacement arrived in. A step that straddles an hour boundary therefore leaves no phantom bucket. Events the fold does not care about return the same state reference, as the projection drive requires.

Usage that arrives before any request/context is filed under unknown/unknown rather than dropped.

Tool: switch_cost

No parameters. Reads the projection state for the calling agent's session and returns:

{
  tokens,            // whole-session bucket totals
  actual: [{ route, tokens, cost, costText, ratesApplied, pricedAs, source, checkedAt, layer }],
  actualTotal, actualTotalText,
  alternatives: [{ route, cost, costText, versusActual, source, checkedAt, layer }],
  unpriced?: [{ route, tokens }],
  caveats: string[],
}

A call with no owning agent session is rejected. A route with no price on file is reported under unpriced and left out of the total — it is never silently priced as zero.

Sample rendered result:

Ran on deepseek-official/deepseek-v4-flash: $0.0416 (peak and off-peak hours both billed)

Same tokens, other routes:
  deepseek-official/deepseek-v4-flash-vision-exp  $0.0416  +0%
  openai/gpt-5.6-luna  $0.0513  +23%
  deepseek-official/deepseek-v4-pro  $0.1260  +203%
  zhipuai/glm-4.7  $0.1446  +247%
  anthropic/claude-haiku-4-5  $0.2452  +489%
  moonshotai/kimi-k2.6  $0.2707  +550%

The price table

dsh-switch-cost/prices exports the table. Every row carries source, checkedAt and layer.

Two layers, vendor first:

  • layer: 'vendor' — read off the provider's own pricing page on checkedAt.
  • layer: 'models.dev' — taken from the community catalog.

Vendor wins because the catalog lags and, more importantly, because it has no representation of time-of-use pricing at all: off_peak, peak and time_of_use appear nowhere in its schema, and its tiers field carries context-size tiers only. A provider that bills two rates a day cannot be expressed there, so a plugin that mirrored the catalog would price those sessions at a single rate that is neither of the two.

Time-of-use

A row may carry a tariff instead of a single flat block. DeepSeek's is the one shipped:

{ peakWindowsUtc: [[1, 4], [6, 10]], peakWeekdaysUtc: [1, 2, 3, 4, 5] }

Those are the published Beijing windows 09:00–12:00 and 14:00–18:00, weekdays, with weekends fully off-peak. The rule is resolved in UTC, and for these particular windows that is exact rather than approximate: every hour they cover satisfies hour + 8 < 24, so adding the Beijing offset never rolls the date over, and the UTC weekday equals the Beijing weekday for every hour that can be peak. A test asserts that property directly and fails if a future window ever reaches past 16:00 UTC — at which point resolving in UTC would stop being safe and the rule would need a real timezone.

Model Experience

What the model sees

One tool with an empty parameter schema, described as reporting session cost and the cross-route comparison. The result text names each route, its cost, whether both tariffs were billed, and the alternatives cheapest-first with a signed percentage against what was actually spent. The closing line restates that the comparison is of published rates at equal token counts.

Token effect

One small fixed schema. The result grows with the number of routes that ran plus alternatives rows — roughly 200–400 tokens at the default of 8.

KV Cache effect

None. The plugin prices usage that has already been logged; it never assembles or sends a provider request, and it contributes nothing to the system prompt.

What this does not claim

These ship inside every result, not just here, because a result read by a model will otherwise be presented as a bill.

  • Token counts are the ones the model that actually ran produced. A different model tokenizes differently and would not produce these counts. This compares published rates at equal token counts; it does not predict the other model's invoice.
  • The cache read/write split is carried over unchanged. Prompt caching differs by provider in what it caches, how long it holds it, and what it charges to write. A route with a very different caching model is the least reliable row in the table.
  • Every rate is pay-as-you-go list price. Subscription plans, prepaid credit packages and free tiers are not modelled.
  • Prices are a dated snapshot. Each row reports its own source and date; check them before acting on a number.

Where a provider publishes no separate cache-write price, those tokens are billed at the input rate — cache-write tokens are cache-miss tokens — and the result sets cacheWriteBilledAtInputRate so the imputation is visible rather than assumed.

Development

pnpm install
pnpm test

License

MIT