aqiu817/dsh-llm-kilo-gateway ↗★ 0
dsh-llm-kilo-gateway
Kilo Gateway free-model provider for DeepSeek Harness: auto-discovers the free model catalog, exposes tools/reasoning/image capabilities, records token usage, and gives you a settings page for your own API key and a catalog change log. 适合需要自动发现免费模型、配置 API 密钥并记录 Token 的用户。
설치
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:aqiu817/dsh-llm-kilo-gateway配置
重试策略
重试由 Harness 的 dsh-llm-retry 执行。本插件只负责两件事:
把状态码分类成失败码,并把 maxRetries 作为预算报上去。
| 状态 | 失败码 | 会重试 |
|---|---|---|
| 400 / 422 | INVALID_REQUEST | 否 |
| 401 / 403 | AUTH | 否 |
| 402 | QUOTA | 否 |
| 404 | INVALID_MODEL | 否 |
| 408 | TIMEOUT | 是 |
| 429 | RATE_LIMIT | 是 |
| 5xx | SERVER | 是 |
哪些失败可重试是分类结果,不是设置项——用户能手动重试的失败不代表请求能活下来。 适配器自己只在流尚未开始时重试一次连接层抖动(预算刻意小于宿主的,避免两层循环相乘)。
输出预算 ≠ 输出上限
目录里的 max_completion_tokens 是模型最多能吐多少(能力),不是每次请求该要多少(预算)。
把能力当预算发送会被上游拒绝。本插件取 min(目录上限, 32768),
与内置 dsh-llm-pi-ai 适配器的 DEFAULT_MAX_TOKENS = 32768 惯例一致。
用户仍可通过 Harness 的 maxTokens 显式要求更多。