Saikel-Orado-Liu/dsh-fare-meter1

@ljcscp/dsh-fare-meter

DeepSeek conversation cost tracking for the DeepSeek Harness Web GUI: price-snapshot-anchored per-turn cost (peak/off-peak aware), account balance, cost tab, per-message chips, and a header pill with live estimates.

AI Analysis

核心用途是提供针对 DeepSeek 服务的精细化计费追踪,包含单条消息费用筹码和实时估算。适合使用 DeepSeek 官方 API 并需要精细化成本控制的用户。

Package
@ljcscp/dsh-fare-meter
Version
0.1.0
License
MIT
Last updated
Aug 15, 2026

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Saikel-Orado-Liu/dsh-fare-meter

Usage

Once installed, the plugin contributes five browser surfaces (all text shown in Simplified Chinese by default):

SurfaceSlotDescription
Composer dock readoutconversation.composer.dockAnchored session spend + account balance, refreshed every minute; hover for the category breakdown and snapshot info
Cost view tabconversation.viewWhole-conversation totals (main + subagents), category totals, per-subagent list, and the per-reply anchored ledger
Per-reply cost chipconversation.chat.assistant-actionsThe anchored cost of one finalized reply (dash when unpriced)
Header pillconversation.session.header.utilitiesAnchored total, or a live ≈ ¥x.xx (estimate) while streaming; click for the detail panel
Plugin cardsettings.plugin.itemPer-model overrides, OpenRouter aliases, cache-read discount, FX mode, toggles, and manual refresh

The /fare-meter host route serves the balance snapshot, the pricebook view, and the subagent totals over GET, and applies manual refresh over POST ({"action":"refresh"}). Like the /api fence, the route only answers requests whose Host header names a loopback address or a declared trusted host — the DNS-rebinding-safe check.