Saikel-Orado-Liu/dsh-cost-meter ↗★ 1
@gamegeek-saikel/dsh-cost-meter
DSH Web GUI 的费用追踪插件,提供单次对话计费、账户余额显示和实时费用估算。
AI 分析
核心用途是基于价格快照锚定单次回复的实际花费,并在输入框下方和独立标签页展示。适合需要精确监控 API 账单消耗、管理预算的用户。
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Saikel-Orado-Liu/dsh-cost-meter说明文档
阅读完整 README ↗Usage
Once installed, the plugin contributes five browser surfaces (all text shown in Simplified Chinese by default):
| Surface | Slot | Description |
|---|---|---|
| Composer dock readout | conversation.composer.dock | Anchored session spend + account balance, refreshed every minute; hover for the category breakdown and snapshot info |
| Cost view tab | conversation.view | Whole-conversation totals (main + subagents), category totals, per-subagent list, and the per-reply anchored ledger |
| Per-reply cost chip | conversation.chat.assistant-actions | The anchored cost of one finalized reply (dash — when unpriced) |
| Header pill | conversation.session.header.utilities | Anchored total, or a live ≈ ¥x.xx (estimate) while streaming; click for the detail panel |
| Plugin card | settings.plugin.item | Per-model overrides, OpenRouter aliases, cache-read discount, FX mode, toggles, and manual refresh |
The /cost-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.