jiay98528-dev/dsh-model-sync0

dsh-model-sync

将服务商的实时模型列表同步至 DSH 设置,并显示当前会话模型的 5小时/7天 额度环。

AI 分析

核心用途是自动同步最新的 API 模型列表并监控使用额度。适合使用多服务商 API、需要及时更新模型选项并掌握额度消耗的用户。支持热加载,无需复杂配置。

包名
dsh-model-sync
版本
0.1.0
许可证
MIT
最近更新
2026年8月15日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:jiay98528-dev/dsh-model-sync

Usage

1. Settings page

  1. Start dsh web and open Settings.
  2. Open the 模型同步 section in the left nav.
  3. Click 刷新 if the list is empty.
  4. Each provider card shows:
    • id and baseURL
    • discovered model chips (blue outline = new, not yet in settings)
    • 应用 N 个新模型 to write those ids into llm-pi-ai.providers..models
    • quota / balance text, or a short reason when the provider has no public window API
  5. The top card toggles 模型同步 and optional 订阅制模型接入 (sub-model-access) by writing disabled on the matching profile row. That change is hot.

Catalog-only protocols (MiniMax, Kimi Coding, OpenAI Codex) do not speak OpenAI GET /models. The plugin falls back to known catalog ids instead of painting a red “this protocol has no /models listing” error.

2. Composer rings

  1. Open any conversation and pick a model as usual.
  2. A dual ring appears to the left of the model name in the composer.
  3. Hover (or focus) it. The card title is provider / model for this session only.
  4. Switching the session model updates the ring. Other providers stay on the settings page.

If the hover card says the current model is not recognized, the session provider is not in the discovered list yet — open Settings and refresh.

3. Quota sources

ProviderWhat you seeEndpoint
openai-codex5h / 7d utilizationchatgpt.com/backend-api/wham/usage
kimi-coding5h / 7d utilizationapi.kimi.com/coding/v1/usages
zai5h / 7d utilizationapi.z.ai/api/monitor/usage/quota/limit
minimax-cn5h / 7d remainingapi.minimaxi.com/v1/api/openplatform/coding_plan/remains
deepseek-officialbalance vs last rechargeapi.deepseek.com/user/balance
xaireason onlygrok.com gRPC billing is not ported yet
othersreason onlyno public plan window

Plan percentages come from the same family of APIs as CC Switch. Remaining % = 100 − used. Zhipu (zai) must send the raw key in Authorization (no Bearer ). Codex also reads tokens.account_id from ~/.codex/auth.json when present.