DSH Plugins Marketplace

DSH Plugins

Plugins

/

Terminal & Clients

/

dsh-api-cost

d

dsh-api-cost

Manifest valid

DeepSeek Harness Plugin: Real-time per-session API cost meter for DeepSeek Harness: prices provider-reported token usage with configurable rates and shows a live cost chip above the composer.

UI (client)hasBundlePatch

dsh-api-cost

English | 中文

A Host + Web Client plugin for deepseek-harness (dsh): shows the real-time per-session API cost — the provider-reported token usage (uncached input / cache-hit input / output) priced with a configurable per-model rate table, rendered as a live chip above the composer. Installable via dsh plugin add.

Features

  • apiCost session projection (host half): a pure fold over the session log that prices each provider usage sample at the model's rate, so streaming usage chunks update the cost live and the finalized assistant/message never double-counts.
  • Composer-dock chip (browser half): API cost $0.0023 1.2K + 3.4K tok, updating in real time; hover shows a per-bucket breakdown (input / cache hit / cache write / output, plus the model id).
  • Configurable pricing: USD per one million tokens; unknown models fall back to a default rate table, and per-model overrides ride the plugin row's config (see Configuration).
  • Bilingual UI (中文 / English), following the host locale.
  • Self-contained: no host-repository changes — the in-package cordis.patch.yml inserts its own row as a bundle layer.

Installation

dsh plugin --profile web add dsh-api-cost

The installer adds the package to the web profile's dependencies and bundle list; after restarting dsh web, the loader applies the in-package cordis.patch.yml automatically. Then open any session and send a message — the cost chip appears above the composer and ticks up as tokens stream.

Manual install (same mechanism, bypassing the installer): edit $DSH_HOME/profiles/web/package.json — add "dsh-api-cost": "<version>" to dependencies and "dsh-api-cost" to the dsh.profile.bundles array — then run pnpm install in that directory and restart.

Peer dependencies are the official @deepseek-ai/* packages (^0.1.0-rc.6) plus react, all provided by the host.

Configuration

The plugin ships usable defaults and has no Config schema: override pricing by setting config on the api-cost row in the profile's cordis.patch.yml (e.g. $DSH_HOME/profiles/web/cordis.patch.yml):

- id: api-cost
  config:
    currency: USD
    # fallback rates for unknown models (USD per 1M tokens)
    rates:
      input: 0.27
      cacheRead: 0.07
      cacheWrite: 0.27
      output: 1.1
    # per-model overrides (partial objects merge over `rates`)
    models:
      deepseek-chat:
        input: 0.27
        cacheRead: 0.07
        cacheWrite: 0.27
        output: 1.1
      deepseek-reasoner:
        input: 0.55
        cacheRead: 0.14
        cacheWrite: 0.55
        output: 2.19
      deepseek-v4-pro:
        input: 0.27
        cacheRead: 0.07
        cacheWrite: 0.27
        output: 1.1
      deepseek-v4-flash:
        input: 0.14
        cacheRead: 0.03
        cacheWrite: 0.14
        output: 0.55

Billing buckets follow the harness TokenUsage convention (disjoint counts): DeepSeek's prompt_tokens already includes cache hits, and the official adapter subtracts cacheReadTokens out of inputTokens, so:

bucketmeaningrate
inputTokenscache-miss inputinput
cacheReadTokenscache-hit inputcacheRead
cacheWriteTokenscache write (not reported by DeepSeek)cacheWrite
outputTokensoutputoutput

deepseek-v4-pro / deepseek-v4-flash defaults are placeholders — update them once official pricing is published.

Projection

The apiCost session projection exposes:

fieldmeaning
costtotal cost (currency units)
inputCost / cacheReadCost / cacheWriteCost / outputCostper-bucket cost
inputTokens / cacheReadTokens / cacheWriteTokens / outputTokensper-bucket tokens
model / providercurrent route (last-wins)
currencycurrency code

Known Limitations

  • Estimate, not a bill: cost is computed from the local session log and may differ from the official invoice (provider-side caching, price changes, model renames). The rate table is the single source of truth — keep it current.
  • Model-switch granularity: each usage sample is priced at the route that was current when it was reported, so switching models mid-session prices later steps at the new model's rate.
  • Subagents have their own session ids and are not aggregated into the parent session's chip.

License

MIT

Comments

Loading…

From the same category

dsh-web

by zhu1090093659

DeepSeek Harness (DSH) Web Plugin Aggregation Ecosystem · Everything is a plugin, distributed via the Creative Workshop

Tools & CapabilitiesUI & ExperienceDevelopment & InfrastructureTerminal & ClientsModels & ProvidersManifest valid

★ 8.2k

↓ 134/wk

Apache-2.0

TypeScript

Oct 1, 2026

dsh plugin --profile web add dsh-web

by ccch1mneyyy

DSH 官方公众号收录的 TUI 补位插件:Claude Code 风,鲸鱼顶栏/实时状态/流式思考/双击 Esc 回滚/上下文进度+TPS。npm 一键装。 DSH official WeChat featured TUI plugin — Claude Code style: whale bar, live status, streaming thoughts, double-Esc rol

Terminal & ClientsManifest valid

★ 3.9k

↓ 11.6k/wk

MIT

TypeScript

Oct 1, 2026

dsh plugin --profile terminal add @deepseek-harness-tui/dsh-tui

by YuJunZhiXue

DeepSeek Harness 破甲:让所有模型都能破甲,不同模型可换不同提示词;默认提示词面向国模「小码酱」。Jailbreak for every model — swap prompts per model. 求 Star 收藏 ⭐

Tools & CapabilitiesTerminal & ClientsManifest valid

★ 2.9k

MIT

JavaScript

Oct 1, 2026

dsh plugin --profile web add dsh-purge

by bowenliang123

The best DeepSeek Harness plugin for context insight and management, with context dashboard / browser / sidebar and context command, for context statistics, composition, breakdown, evolution details,

Tools & CapabilitiesUI & ExperienceTerminal & ClientsManifest valid

★ 1.8k

↓ 32k/wk

Apache-2.0

TypeScript

Sep 30, 2026

dsh plugin --profile web add dsh-context

by agentrq

AgentRQ: Human-in-loop realtime conversational task manager for AI Agents. Self-hosted! Control your own agents from wherever you want Mobile, Web, Desktop. Designed to work well with your own Claude

Workflow & AutomationUI & ExperienceTerminal & ClientsManifest valid

★ 1.1k

↓ 56/wk

Apache-2.0

JavaScript

Oct 1, 2026

dsh plugin --profile web add @agentrq/dsh-plugin-agentrq

by vshulcz

One memory shared by Claude Code, Codex, Cursor, Copilot CLI, OpenClaw and 20 more coding agents, built from the session history already on disk. A fix found in one agent comes back in any of them, in

Tools & CapabilitiesTerminal & ClientsMemory & ContextManifest valid

★ 1.1k

↓ 1.2k/wk

MIT

Go

Oct 1, 2026

dsh plugin --profile web add dsh-deja