vr-shopxo-plugin/plan.md

90 lines
2.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# Council Plan — openclaw-claude-code MiniMax 路由补丁设计
> Round 1 — 2026-04-14
> Branch: council/Architect → main
> 状态:**Draft Phase**
---
## Task Summary
`@enderfga/openclaw-claude-code` 插件设计可配置的 MiniMax 路由方案,解决硬编码 `provider: 'anthropic'` 导致路由失效的问题。
**核心约束**
1. 配置优先(不硬编码)
2. 向后兼容(默认走 Anthropic 官方)
3. 可还原(插件更新不被覆盖)
4. 显眼易懂(有注释说明)
---
## 4 Q Discussion (Round 1)
### Q1 (Backend): proxy handler 如何读取 provider URL 配置?
**Backend 立场****B — OpenClaw config**
- 理由:`providers` section 已有 MiniMax 配置示例,符合 OpenClaw 插件生态
- 插件可通过 `this.config.providers` 读取,无需额外解析逻辑
### Q2 (Architect): models.js provider 映射如何支持配置覆盖?
**Architect 立场****A — 启动时覆盖**
- 理由:不修改 node_modules通过 OpenClaw hook 在插件加载前注入配置
- 符合"可还原"原则,插件更新后仍生效
- 具体方案:在 plugin 加载时从 `config.routing.override` 读取模型→provider 映射表,动态覆盖 models.js 中的默认值
### Q4 (综合): 推荐方案
**推荐方案**
- **配置位置**`~/.openclaw/openclaw.json` → `routing.override`
- **配置结构**
```json
{
"routing": {
"override": [
{ "model": "claude-sonnet-4-20250514", "provider": "minimax-portal" },
{ "model": "claude-opus-4-6", "provider": "minimax-portal" }
]
}
}
```
- **读取层**proxy handler 从 `config.routing.override` 读取映射,优先使用配置覆盖的 provider
- **回滚步骤**:删除 `routing.override` 配置项即可还原默认行为
---
## Task Checklist
- [x] A1: Backend Q1 回答 - provider URL 读取方式
- [x] A2: Architect Q2 回答 - provider 映射配置覆盖机制
- [x] A3: PM Q3 回答 - 配置项位置与命名
- [x] A4: 综合 Q4 回答 - 推荐方案
- [ ] B1: 交叉评审Architect 评审 Backend/PM 输出)
- [ ] C1: 最终投票
---
## Phase Breakdown
| Phase | 内容 | 状态 |
|---|---|---|
| **Draft** | 4 Q 独立回答 + 综合 | 🔄 In Progress |
| **Review** | 交叉评审,输出 `reviews/` 文件 | ⏳ Pending |
| **Finalize** | 合并到 main投票 | ⏳ Pending |
---
## Claim Status
| Task | Owner | Status |
|---|---|---|
| A1: Q1 回答 | council/Backend | `[Done]` |
| A2: Q2 回答 | council/Architect | `[Done]` |
| A3: Q3 回答 | council/PM | `[Done]` |
| A4: 综合结论 | council/Architect | `[Done]` |
| B1: 交叉评审 | council/Architect | `[Pending]` |
| C1: 最终投票 | council/All | `[Pending]` |
---
**[CONSENSUS: NO]** — Draft Phase 进行中