2026-04-14 10:55:11 +00:00
|
|
|
|
# Council Plan — openclaw-claude-code MiniMax 路由补丁设计
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
> Round 1 — 2026-04-14
|
2026-04-14 10:45:13 +00:00
|
|
|
|
> Branch: council/PM → main
|
2026-04-14 10:55:11 +00:00
|
|
|
|
> 状态:**规划中**
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
## 任务背景
|
2026-04-14 05:47:12 +00:00
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
**问题**:插件 `@enderfga/openclaw-claude-code` 的 proxy 层将 Claude Code 请求路由到各 AI Provider,目前所有 `sonnet`/`opus`/`haiku` 模型都被硬编码映射到 `provider: 'anthropic'`(走真实 Anthropic API),但用户环境是 MiniMax 的 Anthropic 兼容端点,导致路由失效。
|
|
|
|
|
|
|
|
|
|
|
|
**目标**:设计一个可配置、符合 OpenClaw 插件最佳实践的方案。
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## 4 Q 任务分配
|
|
|
|
|
|
|
|
|
|
|
|
| Q | 任务描述 | Owner | 预期输出 |
|
2026-04-14 10:45:13 +00:00
|
|
|
|
|---|---|---|---|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
| Q1 | 插件 proxy handler 如何优雅地读取 provider URL 配置? | council/Backend | 配置读取方案(环境变量 / OpenClaw config / 插件独立配置) |
|
|
|
|
|
|
| Q2 | models.js 的 provider 映射如何支持配置覆盖? | council/Architect | 架构设计(外部配置注入机制) |
|
|
|
|
|
|
| Q3 | 配置项应该放在 OpenClaw 配置的哪个 section?命名规范? | council/PM | 配置结构建议(providers/defaults/ext 位置) |
|
|
|
|
|
|
| Q4 | 综合推荐方案(配置文件结构、修改文件列表、回滚步骤、注释) | council/Architect | 最终方案文档 |
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
## 原则
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
1. **配置优先**:从 OpenClaw 配置或环境变量读取,不硬编码
|
|
|
|
|
|
2. **向后兼容**:不配置默认走原有逻辑(Anthropic 官方)
|
|
|
|
|
|
3. **可还原**:通过 OpenClaw 配置层注入,不改 node_modules
|
|
|
|
|
|
4. **显眼易懂**:配置项有注释说明
|
|
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
## 关键参考
|
|
|
|
|
|
|
|
|
|
|
|
OpenClaw 配置示例(`~/.openclaw/openclaw.json`):
|
|
|
|
|
|
```json
|
|
|
|
|
|
{
|
|
|
|
|
|
"providers": {
|
|
|
|
|
|
"minimax-portal": {
|
|
|
|
|
|
"baseUrl": "https://api.minimaxi.com/anthropic",
|
|
|
|
|
|
"apiKey": "minimax-oauth",
|
|
|
|
|
|
"api": "anthropic-messages"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"defaults": {
|
|
|
|
|
|
"model": { "primary": "minimax-portal/MiniMax-M2.7" }
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
插件文件:
|
|
|
|
|
|
- proxy handler: `node_modules/@enderfga/openclaw-claude-code/dist/src/proxy/handler.js`
|
|
|
|
|
|
- 模型注册表: `node_modules/@enderfga/openclaw-claude-code/dist/src/models.js`
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-04-14 10:21:50 +00:00
|
|
|
|
## Claim Status
|
2026-04-14 05:45:33 +00:00
|
|
|
|
|
2026-04-14 10:21:50 +00:00
|
|
|
|
| Task | Owner | Status |
|
2026-04-14 05:47:12 +00:00
|
|
|
|
|---|---|---|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
| Q1: 配置读取方案 | council/Backend | `[Claimed: council/Backend]` |
|
|
|
|
|
|
| Q2: 架构设计 | council/Architect | `[Claimed: council/Architect]` |
|
|
|
|
|
|
| Q3: 配置结构 | council/PM | `[Claimed: council/PM]` |
|
|
|
|
|
|
| Q4: 综合方案 | council/Architect | `[Pending]` |
|
2026-04-14 06:10:59 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-04-14 10:45:13 +00:00
|
|
|
|
## Phase Breakdown
|
2026-04-14 10:40:41 +00:00
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
| Phase | 内容 | 目标时间 |
|
2026-04-14 10:45:13 +00:00
|
|
|
|
|---|---|---|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
| **Draft** (本轮) | Backend/Architect/PM 分别输出 Q1-Q3 讨论结论 | Round 1 |
|
|
|
|
|
|
| **Review** | 交叉评审,Architect 整合 Q4 综合方案 | Round 2 |
|
|
|
|
|
|
| **Finalize** | 合并到 main,投票 | Round 2 |
|
2026-04-14 10:40:41 +00:00
|
|
|
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
2026-04-14 10:55:11 +00:00
|
|
|
|
**[CONSENSUS: NO]** — Round 1 规划完成,等待 Backend/Architect/PM 执行 Q1-Q3
|