Skip to content

LightClear/dsh-token-pricing

30Last commit Aug 15, 2026

dsh-token-pricing DSH plugin

dsh-token-pricing lets you configure per-provider/model USD prices (input miss, cache hit, output, and peak pricing with arbitrary peak windows) and view session costs in three surfaces: the bottom data bar, a collapsible draggable floating window (by turn or by model), and a settings page. It uses a tokenPricing projection derived from session event logs, which persists with sessions and survives archiving.

How to install the dsh-token-pricing DSH plugin

dsh plugin --profile web add dsh-token-pricing

Copying does not run this command. Review the repository and version before installing the dsh-token-pricing DSH plugin.

dsh-token-pricing DSH plugin data source

dsh-token-pricing DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-token-pricing DSH plugin can do

  • Configure model prices and peak hour rules per provider/model in the Settings → Model Pricing page
  • View real-time session costs in the conversation bottom data bar (input $X · output $Y · total $Z)
  • Collapsible and draggable floating window showing turn-based or model-based cost breakdown
  • Peak pricing with multiple arbitrary time windows (supports cross-midnight, e.g., 22:00–08:00)
  • Cost calculation uses per-step timestamps to determine peak/non-peak rates

Where the dsh-token-pricing DSH plugin fits

  • Track token costs per conversation to manage budgets
  • Configure different pricing tiers for different providers or models
  • Analyze costs by turn or by model in a floating window
  • Set peak hour pricing for higher cost periods
  • Review historical session costs even after archiving (costs persist with session logs)

Who the dsh-token-pricing DSH plugin is for

  • DSH users who need to monitor and manage token spending
  • Developers or teams using DSH with multiple models and providers

dsh-token-pricing DSH plugin limitations

  • Compressed summarization steps are not billed (no usage event generated)
  • Steps without provider-reported usage are not counted in costs
  • Floating window position resets on page refresh
  • Bottom data bar total only covers configured pricing routes; unconfigured routes show in model view as 'not priced'

dsh-token-pricing DSH plugin: from the repository README

Quoted from the LightClear/dsh-token-pricing README, the upstream source of the dsh-token-pricing DSH plugin. Copyright remains with the original authors.

中文 | [English](README.en.md) > `dsh-token-pricing` 是一款**第三方(非官方)插件**,由社区维护,与 deepseek-ai 官方发布无关。 Web 界面的按提供方/模型 token 定价:按提供方/模型配置美元价格(未命中输入、缓存命中输入、输出,以及可在任意多个高峰时段内生效的高峰价格档),并在三个表面查看会话费用——底部数据栏,以及一个可折叠可拖拽的浮窗(「按轮计价」与「按模型计价」两种视图)。按轮用量由 `tokenPricing` 投影从会话日志派生,随会话持久化、随归档一并保留。node 半身注册设置命名空间与投影单元,其余全部复用现有 Host 服务。 ## 安装 前置:Node ≥ 22、pnpm、可用的 dsh 安装(官方 CLI `npm i -g @deepseek-ai/dsh`,或源码启动 `pnpm dsh`)。 ```sh # 1. 安装到 web profile(自动初始化 profile、安装依赖、注册补丁层) dsh plugin --profile web add dsh-token-pricing # 2. 启动(已在运行则重启后生效) dsh web ``` `dsh plugin add` 走官方插件机制:把本包装进 `$DSH_HOME/profiles/web/` 的依赖 → 依据 `dsh.bundle` 声明加入 profile 补丁层 → 补丁层的一行 row 同时挂载 node 半身(Host)与浏览器半身(`dsh.client` 扫描)。本包只声明两个自用运行时依赖(`schemastery`、`zod`);其余 `@deepseek-ai/dsh-*` 由 dsh 安装本身提供(官方机制的双锚点解析),因此安装不会拉取任何内部包。 验证安装:启动后打开 设置 → 模型定价 配置价格;右下角出现费用小球,对话底部数据栏显示费用读数。 更新与卸载: ```sh dsh plugin --profile web update dsh-token-pricing dsh plugin --profile web remove dsh-token-pricing ``` npm 之外,也可用 git 源安装(装某个分支/提交;仓库内已提交构建好的 `lib/`): ```sh dsh plugin --profile web add github:LightClear/dsh-token-pricing ``` 注意事项: - 若 profile 中已存在 id 为 `token-pricing` 的插件行,安装后会产生冲突——移除其一即可。 - 若需要把插件直接编译进 harness 主仓库(开发/集成),见 [INTEGRA

Read the full READMERepository license: MIT

dsh-token-pricing DSH plugin questions

How do I install dsh-token-pricing?

Run `dsh plugin --profile web add dsh-token-pricing` in your terminal. Make sure you have Node >= 22, pnpm, and a working DSH installation (via `npm i -g @deepseek-ai/dsh` or source). After installation, restart DSH web to see the plugin in action.

Which profiles does this plugin support?

Currently only the `web` profile is supported. The installation command targets the web profile specifically. Other profiles are not tested and may not work.

How do I configure model prices?

Go to Settings → Model Pricing in the DSH web interface. Models are grouped by provider. Expand a model to edit its base rates (input miss, cache hit, output per million tokens) and optional peak pricing. You can add multiple peak time windows and set peak rates.

Why does the floating window reset position after refresh?

The draggable position is stored in component state, which resets on page refresh. This is a known limitation. The plugin may improve this in future versions by saving the position to local storage or session data.

Does this plugin affect API requests or token usage?

No. The plugin does not add any prompts, tools, or messages to model requests. It only reads session event logs after the request completes. Token usage and KV cache are unaffected.