hiro-nikaitou/dsh-ocg-billing
hiro-nikaitou★ 1JavaScript最后同步: 2026-08-14
DeepSeek Harness (dsh) plugin: OpenCode Go billing layer with cached official pricing, proactive update checks, bill computation and a resident composer bill line
README 摘要
dsh-ocg-billing 中文 English OpenCode Go billing layer for DeepSeek Harness (dsh). This plugin adds a billing layer on top of dsh's existing usage tracking (per-session TokenUsage recorded in session logs). It fetches the official OpenCode Go pricing docs once , caches the price table to disk, and re-checks it proactively — billing always runs against the cache, never against a live fetch. It also calls the default model to analyze the bill, and shows a resident bill line under the web composer. This is a community plugin, not affiliated with DeepSeek AI or OpenCode. Prices are estimates computed from the official docs; actual charges come from your OpenCode Go subscription statement. Features - Resident bill line (web UI) — under the composer card (conversation.composer.dock): global 7-day cost, monthly limit progress, current-session cost, top models, price-source freshness. Auto-refreshes every 60s; click to refresh instantly. - Cached official pricing — ocg pricing check re-fetches opencode.ai/docs/go, diffs against the cache, and updates the cache only when the table changed (force: true forces a refresh). A 24h background check runs automatically. Billing never re-queries the w…
在 GitHub 查看完整 README →