xiaomao66666/dsh-deepview ↗★ 0

dsh-deepview

在 Web 设置中查看 OpenCode Go 配额与 DeepSeek 余额。 适合需在 DSH 界面监控用量与余额的用户,需配置端点。

套件
dsh-deepview
相容性
待驗證
Harness 依賴範圍
^0.1.0-rc.3
Cordis 依賴範圍
^4.0.1
版本
0.2.0
授權
MIT
最近更新
2026年8月15日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

Configuration

Host-side tunables live on the plugin row in cordis.yml:

- id: deepview
  name: dsh-deepview
  config:
    baseUrl: https://opencode.ai/zen/go/v1/usage          # default
    deepseekBaseUrl: https://api.deepseek.com/user/balance # default
    timeoutMs: 15000                                       # default
KeyDefaultMeaning
baseUrlhttps://opencode.ai/zen/go/v1/usageThe OpenCode Go usage endpoint.
deepseekBaseUrlhttps://api.deepseek.com/user/balanceThe DeepSeek balance endpoint.
timeoutMs15000Fetch timeout in milliseconds.

The usage endpoints

OpenCode Go quota

GET https://opencode.ai/zen/go/v1/usage
Authorization: Bearer 

`` is the Anthropic-compatible OpenCode Go key (sk-opencode-…). The endpoint returns:

{
  "usage": {
    "rolling": { "status": "ok", "percent": 9,  "resetsAt": "2026-08-14T07:20:04.810Z" },
    "weekly":  { "status": "ok", "percent": 12, "resetsAt": "2026-08-17T00:00:00.810Z" },
    "monthly": { "status": "ok", "percent": 6,  "resetsAt": "2026-09-09T00:41:03.810Z" }
  }
}

percent is 0–100; resetsAt is ISO-8601. The endpoint is not yet in OpenCode's public docs.

DeepSeek platform balance

GET https://api.deepseek.com/user/balance
Authorization: Bearer 

`` is your DeepSeek platform key (sk-…). This is an official, documented endpoint (Get User Balance). It returns:

{
  "is_available": true,
  "balance_infos": [
    {
      "currency": "CNY",
      "total_balance": "110.00",
      "granted_balance": "10.00",
      "topped_up_balance": "100.00"
    }
  ]
}