dsh-quota-meter
A usage panel for provider plans: shows how much of each quota window is left (GLM Coding Plan and OpenCode Zen) as a compact chip next to the model selector, with a detail popover.
同名套件的其他儲存庫
安裝
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Dogtiti/dsh-quota-meter說明文件
閱讀完整 README ↗dsh-plan-usage
给 DeepSeek Harness 加一个供应商套餐用量面板:在模型选择器右侧显示一枚小图标,悬停(或点击)展开当前套餐的窗口明细。
已接入两家:
| 套餐 | 面板列 |
|---|---|
| GLM Coding Plan(智谱 / Z.ai) | 5 小时 · 每周 · 工具调用 |
| OpenCode Zen(Go) | 滚动窗口 · 每周 · 每月 |
- 按会话实际使用的供应商显示:面板问 Host「这个会话在跑哪家」,Host 从会话自己的
model/selection事件读 provider id,所以newapi之类的网关不会误显示 - 平时不发任何请求:只有悬停/点击时才查一次(
?refresh=1绕过缓存),移开即关闭 - API key 只在 Host 进程内使用,不下发到浏览器;上游结果按
refreshSeconds缓存
安装
dsh plugin install dsh-plan-usage
或在 Plugins 页安装后重启。
配置
| 键 | 默认 | 说明 |
|---|---|---|
source | auto | auto / glm / opencode;auto 按当前 provider 判断 |
apiKeyEnv | ZAI_CODING_CN_API_KEY | 智谱 key 的凭据名 |
baseUrl | https://api.z.ai | 智谱接口域名;BigModel 用 https://open.bigmodel.cn |
opencodeApiKeyEnv | OPENCODE_GO_API_KEY | OpenCode key 的凭据名 |
opencodeBaseUrl | https://opencode.ai/zen/go/v1 | OpenCode 接口域名 |
refreshSeconds | 20 | 缓存时间(下限 10 秒) |
两个 key 都只在 Host 进程内使用,不会下发到浏览器。只配一家也能用,另一家会显示「未配置 API Key」。
数据来源
与各家客户端自己用的接口一致:
## 配置
| 键 | 默认 | 说明 |
| --- | --- | --- |
| `source` | `auto` | `auto` / `glm` / `opencode`;`auto` 按当前 provider 判断 |
| `apiKeyEnv` | `ZAI_CODING_CN_API_KEY` | 智谱 key 的凭据名 |
| `baseUrl` | `https://api.z.ai` | 智谱接口域名;BigModel 用 `https://open.bigmodel.cn` |
| `opencodeApiKeyEnv` | `OPENCODE_GO_API_KEY` | OpenCode key 的凭据名 |
| `opencodeBaseUrl` | `https://opencode.ai/zen/go/v1` | OpenCode 接口域名 |
| `refreshSeconds` | `20` | 缓存时间(下限 10 秒) |
两个 key 都只在 Host 进程内使用,不会下发到浏览器。只配一家也能用,另一家会显示「未配置 API Key」。