随 DSH 启动并管理 dario 代理(把 Claude/ChatGPT 订阅当 API 用),就绪门控、随停随止,订阅模型路由开箱即用。
安装
# GitHub 源码(首次需按提示配置 allowBuilds 构建授权后重试)
dsh plugin --profile web add github:GrannyProgramming/dsh-dario-sidecar
装任何插件都等于在你的机器上跑第三方代码,权限和你本人一样大——能读你的文件、用你的凭据、访问网络,工具审批管不到它。GitHub 来源的插件还会在安装时执行构建脚本——pnpm 默认拦截,所以安装可能停在 ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED 或 ERR_PNPM_IGNORED_BUILDS;dsh 会打印出需要添加的确切键名,把它加进该 profile 的 pnpm-workspace.yaml 的 allowBuilds 下,重跑一次即可装上。放行构建本身就是一次信任判断:请只安装可信来源,并尽量锁定 commit(github:owner/repo#sha)。
README
该插件的 README 只有英文版本。
Harness-owned lifecycle for dario — a DeepSeek Harness (DSH) profile plugin.
In plain terms
You probably pay for a ChatGPT or Claude subscription. That plan works in the vendor's own app — but most other tools, including the DeepSeek Harness this plugin is written for, expect an API key. An API key bills you per token, separately, on top of the subscription you already pay for.
dario closes that gap. It's a small program that runs on your machine and lets any OpenAI- or Anthropic-compatible tool use your subscription instead of an API bill.
One catch: dario only works while it's running. Normally that means opening a terminal, starting it yourself, and hoping you remember after every reboot — and when you forget, your tools fail with confusing errors.
This plugin wires dario into your harness's own startup: harness starts → dario starts. Harness stops → dario stops. Install it once, stop thinking about it. The rest of this README covers the details.
What it does
- Spawns
dario proxythrough DSH'ssubprocessseam when the plugin mounts. Default args['proxy']serve every plan dario holds credentials for; overrideargsfor a single-plan posture (see Configuration). - Readiness-gates on
GET /v1/modelsanswering 2xx before reporting ready (default 120 s budget, 500 ms polls), so a slow proxy surfaces as "starting", not as a model-route credential error. - Adopts an already-healthy listener instead of spawning a doomed duplicate. Adoption is not ownership: teardown kills only what this plugin started.
- Tears down effect-scoped: SIGTERM → grace (5 s default) → SIGKILL, tree-scoped, on unload/HMR — the proxy never outlives the harness.
- Surfaces mid-life exits in the harness log with exit code/signal.
Prerequisites
A working DSH deployment with a profile (e.g.
web).dario installed and logged in on the host the harness runs on:
npm install -g @askalf/dario dario add altman # attach a ChatGPT Plus/Pro plan (paste the redirect URL back) dario login # and/or a Claude Pro/Max planThis plugin manages the proxy process only — OAuth login is a human step it deliberately never performs.
Install
Managed route (wires dependency + bundle entry; the package's own patch supplies the loader row, so defaults apply):
dsh plugin --profile web add github:GrannyProgramming/dsh-dario-sidecar
Manual route — add the dependency to your profile's package.json:
{
"dependencies": {
"dsh-dario-sidecar": "github:GrannyProgramming/dsh-dario-sidecar"
}
}
install profile dependencies, then pick one of the two ways to mount it:
Bundle entry (defaults, no config): add
"dsh-dario-sidecar"todsh.profile.bundles. The package's own patch inserts the loader row.Manual insert (you want to override config, e.g.
args): leave it out of the bundles list and add the row to the profile'scordis.patch.ymluser patch layer instead:- insert: - id: dsh-dario-sidecar name: 'dsh-dario-sidecar' config: args: ['proxy', '--no-claude-auth'] # your override
⚠️ These two are mutually exclusive. A bundle entry and a manual insert
for the same id is a duplicate loader entry id boot failure — the loader
refuses the whole tree, not just the duplicate row.
Configuration
Everything lives in the insert row's config:
- insert:
- id: dsh-dario-sidecar
name: 'dsh-dario-sidecar'
config:
args: ['proxy', '--no-claude-auth'] # example: ChatGPT-only posture
| Field | Default | Meaning |
|---|---|---|
command |
dario |
Executable to spawn (absolute, or resolved on PATH at load). |
args |
['proxy'] |
Arguments, no shell. ['proxy','--no-claude-auth'] never loads the Claude OAuth path — useful with a dead/stale Claude credential or a ChatGPT-only deployment. |
host / port |
127.0.0.1 / 3456 |
Readiness-probe target; passed to the child as DARIO_HOST / DARIO_PORT. |
env |
{} |
Extra env vars merged onto the scrubbed ambient env (PATH/HOME survive). |
readyTimeoutMs |
120000 |
Readiness budget before the spawn is torn down and load fails. |
pollIntervalMs |
500 |
Interval between readiness polls. |
killGraceMs |
5000 |
SIGTERM → SIGKILL escalation grace. |
Point a model route at it
With the sidecar up, add dario as an llm-pi-ai custom provider in
$DSH_HOME/settings.yaml:
llm-pi-ai:
providers:
dario:
displayName: Dario (subscription)
api: openai-completions
baseURL: http://127.0.0.1:3456/v1
apiKeyEnv: DARIO_API_KEY # any non-empty value; dario accepts a literal "dario"
compat:
supportsDeveloperRole: true
maxTokensField: max_completion_tokens
models:
- id: gpt-5.6-sol
name: GPT-5.6 Sol
contextWindow: 272000
maxTokens: 128000
input: [ text, image ]
reasoningEfforts: { off: none, low: low, high: high, max: max }
Verify what your account serves before declaring models:
curl -s localhost:3456/v1/models. The listing is static — a live
/v1/chat/completions round-trip is the only real auth proof.
Troubleshooting
- Load fails
not ready within …ms; stderr tail: …— dario started but never served: checkdario status, purge stale credentials (dario logout), or raisereadyTimeoutMs. resolveExecutablefailure — dario is not on the harness process's PATH. Setcommandto the absolute binary path.- Port conflict — set
portin the insert row and the matchingbaseURLin your model route. - WSL + Windows both have dario — the two installs shadow each other and
version-split (
hash -rto re-resolve). Keep exactly one on the harness host, or pincommandto the right binary. - Parallel agents — subscription tokens flag under concurrency; dario is strictly single-flight. Route parallel fan-out to per-token API providers instead.
Origin
Extracted from a working tiered-routing deployment; the design was fixed and
verified in
council_of_agents #7
(lifecycle mechanism) and
#5
(integration + verification). Shape follows DSH's own
@deepseek-ai/dsh-lsp-stdio subprocess-lifecycle pattern.
License
链接
同类插件
Ebony-Vinyl/dsh-our-free-model★ 89895
为 dsh 接入免费模型车道(含 DeepSeek V4.1 Flash、Kimi K3 等),无需登录、注册或填写 API Key,并提供本地 OpenAI 兼容网关、降级路由与用量看板。
dingminhua/dsh-connect-workbuddy★ 2109
将本机登录的 WorkBuddy 模型(国内版与国际版)接入 DSH,每次刷新按上游目录读取每个模型的积分倍率,支持逐模型图片输入开关、带自动换号的账号池、手动每日签到,以及卡片与输入框里的只读积分胶囊读数。
Alice-Marx/dsh-model-router★ 1024
为 DeepSeek Harness 规划有依赖的工作包,将其分配给已配置的模型 API 或支持的厂商 CLI,并提供费用预览。
V1ki/dsh-plugin-subscriptions★ 644
把 ChatGPT(Codex)、Claude、Grok 订阅当作 DeepSeek Harness 的 LLM 提供方:设置页登录、模型目录、用量展示,以及 image_generate、video_generate 与 x_search 工具。
XDTrees/dsh-workbuddy-xdpool★ 634
把本机 WorkBuddy 桌面 App 登录过的所有账号自动并入 DSH 模型池:多账号轮换自动容错、实时积分,模型目录按模型标注积分倍率与限时免费 / 夜间折扣。
XDTrees/dsh-xdpool★ 634
把本机 WorkBuddy 桌面 App 登录过的所有账号自动并入 DSH 模型池:多账号轮换自动容错、429 冷却、实时积分,模型目录按模型标注积分倍率与限时免费 / 夜间折扣,扫码登录 13 家厂商,聚合免费额度渠道。账号重启不丢。
社区评论
评论公开保存在 GitHub Discussions。加载评论会连接 GitHub 和 Giscus;发表内容需要 GitHub 账号。