dsh-opencode-quota
Manifest validOpenCode Go quota in the DSH right sidebar: per-model monthly caps, the shared 5-hour, weekly and monthly allowance left, and an opencode_quota tool for chat.
dsh-opencode-quota
OpenCode Go quota for DeepSeek Harness — in the right sidebar, not in a separate tab.
Shows each OpenCode Go model's monthly cap and how much of the shared allowance is left, and exposes the same numbers as an agent tool.
What you get
额度 4%in the session header — the shared monthly allowance already used. Click it to open the right sidebar on the quota page.OpenCode 额度tab in the right sidebar — the full table: every Go model with its monthly cap and the amount left this month, this week, and in the current 5-hour window. It also registers a card in the right sidebar guide.opencode_quotatool — ask "how much OpenCode quota is left" or "which model still has room" in chat.
All models share one allowance, so a model's remaining amount is that shared percentage applied to the model's own monthly cap — the same relationship the OpenCode Console uses for per-model monthly limits.
Install
dsh plugin --profile <profile> add github:HScoffeeK/dsh-opencode-quota
Or install the local directory from Settings → Plugins → Add plugin.
Restart the host (or reload the window) once after installing; DSH loads client plugins at page boot.
Data source
| Read | Endpoint | Key |
|---|---|---|
| Model catalog and per-model monthly caps | GET https://opencode.ai/inference/go/v1/models | not required |
| Shared allowance percentages and reset times | GET https://opencode.ai/inference/go/v1/usage | required |
Key discovery
No secret is copied or stored by the plugin. It resolves the first available source:
apiKeyEnvin the plugin config, through the DSH credential service.OPENCODE_API_KEYorOPENCODE_GO_API_KEYin the environment.- The credential reference of an installed OpenCode Go provider row (for example
dsh-opencode-go). - A matching credential reference in the composed profile configuration.
- The OpenCode CLI's own
auth.json.
The key stays on the Host; the browser never receives it, and remote error text is redacted.
Configuration (optional)
- id: opencode-quota
name: dsh-opencode-quota
config:
apiKeyEnv: DSH_OPENCODE_GO_ACCOUNT_EXAMPLE
plan: go
cacheTTLSeconds: 60
| Field | Default | Meaning |
|---|---|---|
apiKeyEnv | unset | Credential reference when automatic discovery is not wanted |
baseURL | https://opencode.ai/inference/go/v1 | Gateway for the two reads |
plan | go | Starting plan (Go / Go Plus / Go Teams); the page also has a selector |
cacheTTLSeconds | 60 | Snapshot freshness |
timeoutMs | 8000 | Per-request timeout |
Limitations
- OpenCode Go only. OpenCode Models (pay-as-you-go credits) has no comparable allowance read.
- The gateway reports one shared allowance; per-model figures are derived from it. The 5-hour limit is 20% of the monthly allowance and the weekly limit is 50%, as documented by OpenCode.
- The snapshot route is a read-only localhost endpoint gated by the host's request admission (
ctx.connection.requestRejection): unauthenticated requests get 401, untrusted origins 403, and the payload holds caps and percentages only — never the key.
中文说明
在 DSH 右侧边栏查看 OpenCode Go 各模型的月度上限与共享额度剩余:
- 会话标题栏右侧的
额度 X%按钮打开右侧栏页面; - 右侧栏 guide 里也有「OpenCode 额度」卡片;
- 对话里可以直接问「还剩多少额度」,会走
opencode_quota工具。
额度按共享额度折算到每个模型的月上限;数据来自 OpenCode Go 的公开模型目录与账号 usage 接口,密钥自动复用 DSH 里已有的 OpenCode Go 凭据。
License
MIT
Comments
Loading…
Similar plugins
by 5777-wq
OpenCode Go subscription usage (rolling 5h / weekly / monthly) in the DSH Web UI: sidebar window bars, trend forecast, adaptive polling, and an agent tool.
★ 0
MIT
JavaScript
Nov 15, 2026
dsh plugin --profile web add dsh-opencode-go-quotaAdds an OpenCode Go usage page to dsh Settings with per-model 5-hour, weekly, and monthly spend and remaining allowance.
★ 0
dsh plugin --profile web add dsh-opencode-usage-settingsby moondrop12138
OpenCode Go subscription usage page for the DSH Web UI: official 5h / weekly / monthly used-percent windows, reset countdowns and a local sampling trail.
★ 0
JavaScript
Oct 21, 2026
dsh plugin --profile web add dsh-opencode-go-usageby sxwer001
Quota ring in the DSH composer bar that tracks OpenCode Go and 14 other coding-plan quotas or balances, cycles 5-hour weekly and monthly windows on click, and colours itself by urgency.
★ 1
MIT
JavaScript
Nov 7, 2026
dsh plugin --profile web add dsh-coding-plan-quotaby WihteCo
OpenCode Go quota in the DeepSeek Harness sidebar foot: one 42px cell plus a hover popover with the rolling 5-hour, weekly and monthly windows, each carrying a usage bar, an elapsed-time marker, the remaining share and a reset countdown.
★ 0
MIT
JavaScript
Oct 7, 2026
dsh plugin --profile web add dsh-opencode-go-quotaShows OpenCode GO plan quota (rolling 5-hour, weekly, monthly) on a DSH Settings page, reading the official usage API through a same-origin proxy; registers no sidebar widget. A rework of Astervolans/
★ 0
dsh plugin --profile web add dsh-opencode-go-quota-settings