AI Agent Hub
Back to plugins
🧩

dsh-ocg-billing

admin-security Updated 2026.08.16

Run the following command in DeepSeek Harness:

dsh plugin install hiro-nikaitou/dsh-ocg-billing

Paste the following prompt into your AI chat to install this plugin:

Run dsh plugin install hiro-nikaitou/dsh-ocg-billing in the DeepSeek Harness terminal to install; the full source is available at https://github.com/hiro-nikaitou/dsh-ocg-billing

About this plugin

dsh already tracks per-session token usage, but raw token counts do not translate into an intuitive dollar amount. For teams and individuals on an OpenCode Go subscription, questions like how much did we spend this week, which model is the most expensive, and how much did cached reads save need a clear answer. dsh-ocg-billing bridges that gap: it fetches the official pricing page exactly once, writes the price table to a local cache, and every subsequent billing computation runs against that cache without ever re-querying the site. A background check diffs the live docs against the cache every 24 hours and updates the local table only when the official pricing actually changes.

Three capabilities stand out. First, bill computation: ocg_bill supports either a global scope (all sessions within the last N days) or a single-session scope, broken down by both model and session, with correct handling of Cached Read, Cached Write, and tiered rates for models such as GPT 5.6 Luna 272K and Qwen3.7/3.6 Plus 256K; unknown models are listed at zero cost and flagged for review. Second, a resident bill line in the web UI sits directly under the composer card, displaying 7-day cumulative cost, monthly quota progress, current-session spend, top models, and price-source freshness, auto-refreshing every 60 seconds with a click-to-refresh affordance. Third, transparent price-cache management: ocg_pricing_status reports cache health and last fetch time, while ocg_pricing_check proactively re-fetches the official docs, diffs them against the cache, and writes updates only on change, with a force option for manual refresh.

Beyond the numbers, ocg_bill_analyze hands the computed bill to the dsh default model and asks for a summary, anomaly flags, top cost drivers, and concrete savings recommendations, turning a plain token list into actionable cost insight. It is a good fit for OpenCode Go users who want periodic expense visibility without leaving the dsh workflow, especially teams looking to understand their cost structure and keep subscription spend under control.

Use Cases

  • Check weekly spend and top models under an OpenCode Go subscription
  • Audit cached read/write savings in a specific session
  • Ask the default model to summarize the bill and suggest savings

Best For

  • dsh users on an OpenCode Go subscription
  • Teams that want periodic cost visibility without leaving the dsh workflow
  • Developers who want to understand token cost structure and control spend