精选
为什么选中它
待人工精选——以下事实来自源码仓库。
它能做什么
Show LLM API balances under the chat input: DeepSeek, OpenRouter, SiliconFlow and any custom provider with a balance endpoint. DSH plugin.
适合谁
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
风险提示
- 未发现明显风险信号;安装前仍建议查看源码。
Show LLM API balances under the chat input: DeepSeek, OpenRouter, SiliconFlow and any custom provider with a balance endpoint. DSH plugin.
待人工精选——以下事实来自源码仓库。
Show LLM API balances under the chat input: DeepSeek, OpenRouter, SiliconFlow and any custom provider with a balance endpoint. DSH plugin.
想用 DSH 获得这项能力的用户;装前建议先看源码和文档。
dsh plugin --profile web add github:JonyChan8394/dsh-llm-balance 作者没有声明支持的平台。
llm-pi-ai settings + the built-in adapters you use). Configure a new LLM in dsh and it appears on the next refresh; remove it and it disappears. No restart, no config editing. - No public balance API? — providers like Qwen/DashScope, OpenAI and Anthropic have a public API key but no public balance endpoint. When such a provider is configured with a key, the strip shows "未开放查询API / no balance API" instead of hiding it. - Keys stay on the host — API keys are resolved from DSH credentials (or environment) host-side; the browser only ever sees the fetched balances. ## Install sh dsh plugin --profile web add github:JonyChan8394/dsh-llm-balance Restart dsh web. The balance readout appears under the chat input as soon as at least one configured provider has a key. ## Configure Nothing to configure — the plugin follows the providers you already set up in dsh. Balance endpoints are known for these routes: | Provider route | Balance API | | --- | --- | | DeepSeek (deepseek, deepseek-official) | ✅ | | OpenRouter (openrouter) | ✅ | | SiliconFlow (siliconflow) | ✅ | | Moonshot / Kimi (moonshotai-cn, moonshotai) | ✅ | | MiniMax (minimax) | ✅ | | StepFun (stepfun) | ✅ | | Zhipu / GLM (zhipu) | ✅ | | Any other configured provider | ❌ shows "未开放查询API" | Each preset also ships a rechargeUrl — the provider's top-up page — opened in a new tab when you click the balance in the strip. To add a balance endpoint for a provider not in the list (e.g. an aggregator route with its own balance endpoint), override the plugin config in your profile's cordis.patch.yml: yaml - id: llm-balance config: refreshMs: 30000 endpoints: - id: myprovider name: MyProvider apiKeyEnv: MYPROVIDER_API_KEY url: https://api.example.com/v1/balance balancePath: data.remaining currencyPath: data.currency rechargeUrl: https://console.example.com/recharge A provider without a configured key is hidden from the strip; a provider whose request fails shows "获取失败 / fetch failed". ## How it works - Host half (lib/index.js) reads ctx.llm.listProviders() — the exact set of LLM routes configured in dsh — on every request. For each provider with a known balance endpoint it resolves the key through ctx.credentials and calls the endpoint; for a configured provider with a key but no endpoint it reports error: 'no-api'. Results are served as GET /llm-balance JSON through the webserver route registry. - Browser half (lib/client.js) registers a conversation.composer.dock entry (order 10) that polls /llm-balance and renders the readout under the input card. ## License MIT不看 Star,人工一条条挑的。
把 DSH 的 settings.yaml 做成可视化看板:所有已注册的 settings namespace——包括官方界面从未覆盖的第三方插件配置——都渲染成可编辑表单。项目还早,但方向很对:告别手改 YAML。
给 DSH 的 DIY 轨迹可视化:把 agent 的计划与执行画成图,不用翻原始日志也能看清它在干嘛。项目还早,但补上了「一眼看懂 agent 在做什么」这个真实缺口。
从 Claude Code / Codex 把活派给 DSH:在宿主内拉起带分级预设的 DSH agent 会话,看原生子代理进度,还能借它的多模态桥给纯文本的 DSH 补上视觉和生图。编排型插件,把 DSH 变成其他编码 agent 的后端。