dsh-api-cost

Registers an apiCost session projection that estimates DeepSeek spend from reported token usage at published peak / off-peak rates, in CNY and USD, over self, delegation-tree or verified-team scopes: a composer-dock pill and its detail panel, the /cost command, a session_cost tool, and GET routes for the view and the current rate card. A panel switch parks model requests at the llm/stream waterfall while peak rates apply and dispatches them unchanged once the off-peak window opens, so the call is billed at the off-peak rate with no failure reported to the session.

Overview

Registers an apiCost session projection that estimates DeepSeek spend from reported token usage at published peak / off-peak rates, in CNY and USD, over self, delegation-tree or verified-team scopes: a composer-dock pill and its detail panel, the /cost command, a session_cost tool, and GET routes for the view and the current rate card. A panel switch parks model requests at the llm/stream waterfall while peak rates apply and dispatches them unchanged once the off-peak window opens, so the call is billed at the off-peak rate with no failure reported to the session.

Installation

Install from GitHub

dsh plugin --profile web add github:NIRVANA-APOC/dsh-api-cost

Installing from GitHub runs the project's build script, which pnpm blocks until you allowlist it — run the command once and pnpm prints the exact key to add under `allowBuilds` in ~/.dsh/profiles/web/pnpm-workspace.yaml.

Version compatibility

Compatibility is unconfirmed. Check the project documentation for supported versions.