@dsh-polyglot/bundle
dsh-polyglot — the model switch for DSH: one generic OpenAI-compatible ctx.llm adapter, curated free/cheap DeepSeek provider presets, and automatic provider fallback when a free tier rate-limits you
安装
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Jesse-njx/dsh-polyglot说明文档
阅读完整 README ↗dsh-polyglot
The model switch for DSH. Point DeepSeek Harness at any OpenAI-compatible endpoint — with curated presets for free and cheap DeepSeek providers and automatic fallback when a free tier rate-limits you.
What claude-code-router is to Claude Code, dsh-polyglot is to DSH — except
DSH's ctx.llm is a sanctioned extension seam, so there is no request
interception: the generic adapter and the router are both real LlmAdapter
registrations.
- One generic adapter. A single OpenAI-compatible
ctx.llmadapter parameterized by{baseUrl, apiKey, model, headers?, quirks?}. Streaming, tool calls, and usage extraction are all handled; per-provider deviations (reasoning field names, strict tool schemas, cache-folded usage) are small declarativequirksflags, never per-provider code. - A router with fallback. On 429 / quota-exceeded / 5xx (or a missing
key), the failing provider is marked cooling-down (exponential backoff,
honoring
Retry-After) and the request is retried on the next provider in the chain. Free tiers rate-limit constantly — automatic failover is the whole product. - Provider presets as data.
presets/*.json— community PRs add providers without touching the adapter. Each preset carriesverifiedAtand free-tier notes so rot is visible. - Usage you can see. Every attempt lands in the append-only session log as
polyglot/served;/polyglot usagetallies per provider with token counts and estimated cost from preset pricing.
Quick start
Install the bundle into a profile (a DSH profile is an ordered stack of plugin-bundle patch layers):
dsh plugin --profile web add @dsh-polyglot/bundle
The bundle's patch registers the polyglot plugin with the recommended
default chain — "code all day for free until something rate-limits, then
degrade gracefully to cheapest-paid":
nous-portal → opencode-zen → deepseek-official (5M grant) → kilo
Configure keys through the credentials seam (the web Models page writes them), or export the env names each preset declares:
export NOUS_PORTAL_TOKEN=... # nous-portal (bearer, manual token for v0.1)
export OPENCODE_API_KEY=... # opencode-zen
export DEEPSEEK_API_KEY=... # deepseek-official (new accounts: 5M free tokens, 30 days, no card)
export KILO_API_KEY=... # kilo (paid fallback rung)
Pick the virtual provider in the model selector. A provider without a configured key is skipped automatically — the chain degrades, it never fails hard.