ivvan3016/dsh-ui-pricing0

dsh-ui-pricing

User-configurable cost pricing for dsh: per-model list prices and per-day-of-week time segments with price multipliers, edited through a Plugins-settings card

AI 分析

核心用途是提供精细化的Token消耗成本估算。适合需要监控多模型API开销,或需要针对不同时间段(如高峰期/空闲期)进行差异化计费的用户。

パッケージ
dsh-ui-pricing
バージョン
0.1.3
ライセンス
MIT
最終更新
2026/08/25

インストール

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:ivvan3016/dsh-ui-pricing

ドキュメント

README 全文を読む ↗

Configuration

The package registers the pricing settings namespace (see dsh-settings):

FieldDefaultMeaning
currencyCNYCurrency code the prices are denominated in.
modelsV4 catalogList prices per model id in currency units per one million tokens; a model with no entry is unpriced. Cache writes are billed at the cache-miss input rate (DeepSeek has no separate write price).
defaultScheduleone 00:00–24:00 segment at multiplier 1The default time policy every day uses unless overridden; a segment is an HH:MM window with a multiplier. A segment whose end is earlier than its start wraps midnight.
overrides{}Per-day exceptions: a day present here uses its own TimeSegment[] instead of the default schedule.
manualSpend0Manual-spend correction delta added to the auto-computed total: a positive value tops the estimate up, a negative one trims it. The CostLine writes it when you correct the total in place (corrected total − auto amount), so the display reads auto + manualSpend and keeps accruing usage on top of the correction.

Settings → Plugins → Plugin configuration shows a Pricing settings card: a per-model price table (model rows are seeded from the wire llm.models() catalog, so the deployment's actual models appear), one default timeline that applies to every day, and day-exception toggles — enabling a weekday gives it its own timeline that overrides the default (e.g. a weekend that is off-peak all day). On a timeline, click inside a segment to split it, drag a handle to move a boundary (dragging never inserts), click × to remove a boundary, and type each segment's multiplier directly.

The cost projection re-registers whenever the section changes, replaying the durable log under the new prices and windows.