
rainforest888/dsh-plugins-raincode
30最近提交 2026年8月15日
dsh-plugins-raincode DSH 插件
dsh-raincode 让 raincode 成为 DeepSeek Harness 的模型层。它通过本地 OpenAI 兼容网关提供廉价模型池,具备 StablePrefix 提示缓存、重试和故障转移功能。插件负责将 dsh 的 GenerateOptions 转换为 OpenAI 线格式并流式返回,而 raincode 网关处理配置文件选择、缓存和重试。
如何安装 dsh-plugins-raincode DSH 插件
dsh plugin --profile web add dsh-plugins-raincode复制不会执行命令。安装 dsh-plugins-raincode DSH 插件前请核对仓库和版本。
dsh-plugins-raincode DSH 插件数据来源
dsh-plugins-raincode DSH 插件快照日期:2026年8月16日
discovered
dsh-plugins-raincode DSH 插件能做什么
- 从 raincode 池中选择模型(从网关 /v1/models 获取)
- 通过 /skills 浏览和阅读 raincode 技能库
- 基于 sessionId 的提示缓存(网关侧)
- 按配置文件的重试和故障转移(网关侧)
- 并行工具调用,按调用索引分隔为独立块
dsh-plugins-raincode DSH 插件适合哪些场景
- 将 raincode 作为 dsh 的经济模型池使用
- 浏览并加载 raincode 技能库中的技能
- 利用 StablePrefix 缓存降低 API 成本
- 通过 raincode 配置文件配置多个模型之间的故障转移
dsh-plugins-raincode DSH 插件适合谁
- 希望使用 raincode 作为模型后端的 DSH 用户
- 希望将 dsh 与本地模型网关结合的开发者
dsh-plugins-raincode DSH 插件的限制
- 需要安装并运行 raincode 网关(>=0.1.0)
- 插件本身不包含模型逻辑,所有智能在网关中
- 回环模式下 API 密钥仅为形式,远程网关需要正确凭证
- 只有网关运行并配置时模型才可用
dsh-plugins-raincode DSH 插件的仓库 README 摘录
以下文字摘自 dsh-plugins-raincode DSH 插件的上游仓库 rainforest888/dsh-plugins-raincode 的 README,版权归原作者,仅作引用。
Make **raincode** the model layer of **DeepSeek Harness (dsh)**: a cheap model pool with StablePrefix prompt caching, retries, and failover, driven by a local OpenAI-compatible gateway. Inside dsh you can pick any model from your raincode pool and browse the raincode skill library with `/skills`. The plugin is the "mouth" — it translates dsh's `GenerateOptions` to the OpenAI wire format and streams chunks back — while the raincode gateway (Rust) is the "brain" that owns profile selection, caching, and retries. The plugin holds no model logic. ## Prerequisites 1. **Install raincode** (`>= 0.1.0` with gateway `/v1/models` and `/skills`): ```bash cd raincode cargo install --path crates/rc-cli # or use ./install.sh ``` 2. **Configure profiles** (your model pool): ```bash raincode setup # writes ~/.raincode/profiles.toml ``` 3. **Start the gateway** (keep it running): ```bash raincode proxy --port 8787 ``` Verify: `curl http://127.0.0.1:8787/health` → `{"ok":true,"service":"raincode-gateway"}`. ## Install in dsh ```bash dsh plugin --profile web add dsh-plugins-raincode ``` Then add the row to the profile's patch layer (`~/.dsh/profiles/
阅读完整 README仓库许可: MIT
dsh-plugins-raincode DSH 插件常见问题
网关没有运行怎么办?
你会看到来自模型调用的 TRANSPORT 类型错误。请确保网关正在运行,使用 `raincode proxy --port 8787` 启动,并通过 `curl http://127.0.0.1:8787/health` 验证。
为什么 API 密钥只是形式?
回环网关信任本机,并从 `~/.raincode/profiles.toml` 解析真正的上游密钥(内联、密钥文件或环境变量)。只有当 `baseURL` 指向远程网关时,插件才会要求提供凭证。如果不对 `apiKeyEnv` 进行设置,回环模式仍然可以工作。
如何添加模型?
运行 `raincode setup` 交互式配置配置文件,或者直接编辑 `~/.raincode/profiles.toml`,然后重启网关。插件会自动从网关的 `/v1/models` 端点获取新模型。
如何在 dsh 中安装该插件?
运行 `dsh plugin --profile web add dsh-plugins-raincode`。然后在配置文件的 patch 层(例如 `~/.dsh/profiles/web/cordis.patch.yml`)中添加相应行。之后重启 `dsh web` 以加载插件。
如果不设置 RAINCODE_API_KEY 环境变量会怎样?
由于是回环模式,缺少凭证不会阻塞网关。只有当网关是远程时,插件才会检查凭证。对于远程网关,你必须设置 `apiKeyEnv` 中指定的环境变量。