跳到正文

linkingoscar/dsh-billing-glass

30最近提交 2026年8月15日

dsh-billing-glass DSH 插件

该插件在 DeepSeek Harness Web GUI 右下角添加一个液态玻璃胶囊,一眼显示当前提供商余额。点击展开完整账单卡片,包括会话成本、每日支出、令牌桶细分和提供商列表。支持多提供商自动切换,每 10 秒轮询余额数据。

如何安装 dsh-billing-glass DSH 插件

dsh plugin --profile web add github:linkingoscar/dsh-billing-glass

复制不会执行命令。安装 dsh-billing-glass DSH 插件前请核对仓库和版本。

dsh-billing-glass DSH 插件数据来源

dsh-billing-glass DSH 插件快照日期:2026年8月16日

discovered

dsh-billing-glass DSH 插件能做什么

  • 常驻玻璃胶囊显示余额、提供商名称和状态点
  • 展开的账单卡片包含会话成本、每日支出、令牌桶细分和提供商列表
  • 每条助手消息上显示成本徽章,包含令牌拆分和模型信息
  • 支出账本(JSONL 格式),按浏览器时区统计今日/本月/全部总计
  • 定价同步检查按钮,将内置价格与官方来源对比
  • 多提供商自动切换,跟随当前会话使用的提供商
  • 未知模型标记为未定价,而非静默按零计费

dsh-billing-glass DSH 插件适合哪些场景

  • 从 DeepSeek Harness 界面实时监控 API 提供商余额
  • 追踪跨多个提供商的会话和每日支出
  • 验证插件定价是否与官方价格页面一致
  • 查看历史支出账本,支持自动压缩和迁移

dsh-billing-glass DSH 插件适合谁

  • 使用多个 API 提供商的 DeepSeek Harness 开发者
  • 需要在 Harness Web GUI 中监控和控制 API 成本的用户

dsh-billing-glass DSH 插件的限制

  • 除非配置了 DEEPSEEK_PLATFORM_TOKEN,否则每日支出行隐藏
  • 会话成本和支出统计使用内置价格表本地计算,非提供商发票
  • 支出统计仅覆盖插件处理过的消息,未处理的历史会话缺失
  • 未知模型标记为未定价,可能低估实际总额,直到提供定价方案
  • 部分提供商没有公开余额端点,余额显示为“—”

dsh-billing-glass DSH 插件的仓库 README 摘录

以下文字摘自 dsh-billing-glass DSH 插件的上游仓库 linkingoscar/dsh-billing-glass 的 README,版权归原作者,仅作引用。

English | [中文](README.zh.md) A billing overlay plugin for the DeepSeek Harness Web GUI: a **liquid-glass** capsule pinned to the bottom-right corner showing the provider balance; click to expand a full billing card (session cost, daily spend, token-bucket breakdown, provider list). **DeepSeek-first**, with an extension point for more API providers. ## Features - **Always-on glass capsule**: status dot + provider name + balance at a glance; click to expand. The expanded card's header is draggable (position stored in localStorage; it can be dragged anywhere on the page with no bottom dead zone). The card disables horizontal overflow — no horizontal scrollbar needed to reach content. - **Fresh data**: the client polls every 10s; the DeepSeek balance cache TTL is 10s (other providers 60s); official daily spend is cached for 5 minutes; window focus, tab visibility change and card expansion refresh immediately, and the manual refresh button force-refreshes the current provider balance via POST. - **Liquid-glass material**: `backdrop-filter` frost + translucent theme colors + specular highlight border + refraction sheen layer + soft float shadow; follows the `--dsw-*` l

阅读完整 README仓库许可: Apache-2.0

dsh-billing-glass DSH 插件常见问题

如何安装 DSH Billing Glass 插件?

在终端中运行命令 `dsh plugin --profile web add github:linkingoscar/dsh-billing-glass`,然后重启 `dsh web` 并刷新页面。插件需要在设置 → 模型中配置 DeepSeek API 密钥。

为什么每日支出行没有显示?

每日支出行仅在 `~/.dsh/.credentials.yaml` 中配置了 `DEEPSEEK_PLATFORM_TOKEN` 时才会显示。没有该令牌时,该行隐藏,因为余额差值估算因充值或退款不可靠。

会话成本和支出统计的准确性如何?

它们使用插件内置的官方价格表和消息令牌本地计算,可能因定价时刻、四舍五入或峰谷解释而与最终平台账单略有差异。它们不是提供商发票。

如果使用价格目录中没有的模型会怎样?

插件将该消息标记为未定价,并在卡片和支出统计中显示 `unpricedCalls: N`。账本存储 `priced: false`。您可以运行 `scripts/sync-providers.js` 更新目录,或在聊天中提供定价方案。

我可以添加官方列表之外的自定义 API 提供商吗?

可以。对于未识别的提供商,插件会显示引导提示。您可以在聊天中告知助手定价方案,通用的 `defineOpenAiCompatProvider` 工厂将永久接入。或者,按照 `registry.js` 中的约定创建自定义提供商文件。