前言¶
DeepSeek Harness(dsh)已经可以记录会话用量,但 OpenCode Go 的价格、账单范围和对账单的简单分析,通常还需要单独处理。下面介绍一个 DSH 社区插件 hiro-nikaitou/dsh-ocg-billing,它在 dsh 的 web composer 下方提供常驻账单行,并基于缓存的官方价格完成 OpenCode Go 账单计算。
这是什么¶
hiro-nikaitou/dsh-ocg-billing 是一个 DSH 插件,定位为 OpenCode Go billing layer for DeepSeek Harness (dsh)。
它由 hiro-nikaitou 维护,采用 MIT 许可证。资料中说明,这是一个社区插件,与 DeepSeek AI 或 OpenCode 没有官方从属关系。
它解决的问题是:在 dsh 的 web 界面中直接查看 OpenCode Go 的估算账单,并用缓存的价格表完成账单计算。
核心功能¶
下面是已核实的能力:
- 在 web composer 下方显示常驻账单行(resident bill line)。
- 缓存官方价格,并进行主动更新检查。
- 支持全局范围或单会话范围的账单计算。
- 使用默认模型对账单做分析。
安装与启用¶
1、从 profile 添加插件路径:
dsh plugin --profile web add <path-to-this-repo>
2、或者在 ~/.dsh/config.yaml 中写 overlay 式配置:
# - insert:
# - id: ocg-billing
# name: '@hiro-nikaitou/dsh-ocg-billing'
3、重启 dsh web。插件加载后,账单行会出现在 composer 下方。
典型用法¶
启用后,可以使用这些工具:
ocg_pricing_statusocg_pricing_checkocg_billocg_bill_analyze
其中,ocg_pricing_check 可用于刷新价格缓存;ocg_bill 用于计算账单;ocg_bill_analyze 用于结合默认模型分析账单。
适用场景与注意¶
适合在 DSH web 中使用 OpenCode Go、需要查看估算成本的开发者。使用前注意:
- 插件会以当前
dsh进程权限运行,安装前应检查源码和 MIT 许可证。 - 价格是按官方文档计算的估算值,实际费用以你的 OpenCode Go 订阅账单为准。
- 订阅费
$10/month仅作为参考展示,不会加入 usage cost。 - 如果上游布局变化导致价格滞后或解析异常,可运行
ocg_pricing_check刷新。 - 已核实资料说明 DeepSeek Harness 处于 developer preview,peer ranges 跟随已安装的
0.1.0-rc.6mainline。
链接¶
- 目录页:https://www.skillhub.cn/plugins/hiro-nikaitou/dsh-ocg-billing
- GitHub:https://github.com/hiro-nikaitou/dsh-ocg-billing