fix(agent): 将 pi-agent 默认模型对齐为 MiniMax-M2.7-highspeed
根因是 Go 默认 provider 误为 cc-switch-kimi-for-coding,且 app 容器未注入 PI_AGENT_*,导致 runner 收到未知 provider。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+2
-1
@@ -5,7 +5,8 @@
|
||||
|
||||
## 焦点
|
||||
|
||||
Codex 审计 P0 整改 **Wave 0–D 已全部完成**;main 本地冒烟已通过。
|
||||
1. **已修复**:dev pi-agent provider 误为 `cc-switch-kimi-for-coding` → 已对齐 `.env` 的 `minimax` + `MiniMax-M2.7-highspeed`(见 short-term)
|
||||
2. Codex 审计 P0 整改 **Wave 0–D 已全部完成**;main 本地冒烟已通过
|
||||
|
||||
## 剩余(非 P0)
|
||||
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
title: "修复 pi-agent Unknown provider cc-switch-kimi-for-coding"
|
||||
status: done
|
||||
created: 2026-09-13
|
||||
updated: 2026-09-13
|
||||
owner: agent
|
||||
---
|
||||
|
||||
# 修复 pi-agent Unknown provider cc-switch-kimi-for-coding
|
||||
|
||||
## 目标
|
||||
|
||||
任务 `run_1789263149536199173` / workspace `intake_1789263149571817685` 因错误 provider 中断;恢复为与根 `.env` 一致的 `minimax` + `MiniMax-M2.7-highspeed`。
|
||||
|
||||
## 范围
|
||||
|
||||
- 修正 `internal/config/config.go` 错误默认值
|
||||
- 同步 `configs/.env.dev` 与 compose 注入(不编造新密钥/新 endpoint)
|
||||
- 对齐根 `.env` 中 `PI_AGENT_MODEL` 与 `MINIMAX_MODEL_ID`
|
||||
- 重启 / 重建 dev 的 app / pi-agent 使配置生效
|
||||
|
||||
## 非目标
|
||||
|
||||
- 不改动 test/main 环境密钥
|
||||
- 不擅自更换 API endpoint / API key
|
||||
- 不在本任务内重跑完整业务长任务(修复后由用户 continue/restart)
|
||||
|
||||
## 步骤
|
||||
|
||||
1. [x] 根因定位:Go 默认 `cc-switch-kimi-for-coding`;app 容器无 `PI_AGENT_*` 覆盖
|
||||
2. [x] 修正代码默认值与 `.env` / `.env.dev` / compose
|
||||
3. [x] force-recreate + rebuild;health 已显示 `MiniMax-M2.7-highspeed`
|
||||
4. [ ] 提交
|
||||
|
||||
## 验收标准
|
||||
|
||||
- [x] `shuimu-pi-agent-dev` health 显示 `MiniMax-M2.7-highspeed`
|
||||
- [x] app 进程生效 `PI_AGENT_PROVIDER=minimax`、`PI_AGENT_MODEL=MiniMax-M2.7-highspeed`
|
||||
- [x] 配置链不再默认 `cc-switch-kimi-for-coding`(业务 continue/restart 由用户触发验证)
|
||||
|
||||
## 相关链接
|
||||
|
||||
- 失败 workspace: `data/dev/workspaces/bizdev/intake_1789263149571817685`
|
||||
- 根配置: `.env`(`MINIMAX_MODEL_ID=MiniMax-M2.7-highspeed`)
|
||||
|
||||
## 证据 / 备注
|
||||
|
||||
- upstream: `step step_01_organize failed: Error: Unknown provider "cc-switch-kimi-for-coding"`
|
||||
- blame: `abd0893e` 将默认从 anthropic 误改为 kimi
|
||||
- 验证:`curl :18865/health` → `model_id=MiniMax-M2.7-highspeed`;app env 含 `PI_AGENT_PROVIDER=minimax`
|
||||
+2
-2
@@ -31,7 +31,7 @@ CURSOR_RUNNER_PORT=18765
|
||||
# --- 4. Pi-Agent 容器与 MiniMax 模型(pi-agent 容器 entrypoint 读取)---
|
||||
MINIMAX_ENDPOINT_URL=https://api.minimaxi.com/v1
|
||||
MINIMAX_API_KEY=
|
||||
MINIMAX_MODEL_ID=MiniMax-M3
|
||||
MINIMAX_MODEL_ID=MiniMax-M2.7-highspeed
|
||||
MINIMAX_API_TYPE=openai-compatible
|
||||
|
||||
# --- 5. Tavily 联网搜索(pi-agent 容器内工具;多 Key 逗号分隔)---
|
||||
@@ -48,7 +48,7 @@ PI_AGENT_RUNNER_PORT=18865
|
||||
PI_AGENT_BIN=/opt/homebrew/bin/pi
|
||||
PI_AGENT_BRIDGE_BIN=tools/pi-bridge/index.mjs
|
||||
PI_AGENT_PROVIDER=minimax
|
||||
PI_AGENT_MODEL=MiniMax-M3
|
||||
PI_AGENT_MODEL=MiniMax-M2.7-highspeed
|
||||
|
||||
# --- 8. 共享法规知识库(宿主 Go 进程:127.0.0.1:5432;容器 app:compose 注入 shuimu-kb-shared)---
|
||||
KB_DB_HOST=127.0.0.1
|
||||
|
||||
@@ -43,7 +43,9 @@ AGENT_TIMEOUT=60m
|
||||
# 6. Pi-Agent / MiniMax / Tavily(pi-agent 容器必填;从根 .env 复制)
|
||||
MINIMAX_ENDPOINT_URL=https://api.minimaxi.com/v1
|
||||
MINIMAX_API_KEY=
|
||||
MINIMAX_MODEL_ID=MiniMax-M3
|
||||
MINIMAX_MODEL_ID=MiniMax-M2.7-highspeed
|
||||
MINIMAX_API_TYPE=openai-compatible
|
||||
PI_AGENT_PROVIDER=minimax
|
||||
PI_AGENT_MODEL=MiniMax-M2.7-highspeed
|
||||
TAVILY_API_KEYS=
|
||||
# RUNNER_AUTH_TOKEN=
|
||||
|
||||
@@ -56,7 +56,7 @@ services:
|
||||
DATA_DIR: /app/data/workspaces
|
||||
MINIMAX_ENDPOINT_URL: ${MINIMAX_ENDPOINT_URL:-https://api.minimaxi.com/v1}
|
||||
MINIMAX_API_KEY: ${MINIMAX_API_KEY:-}
|
||||
MINIMAX_MODEL_ID: ${MINIMAX_MODEL_ID:-MiniMax-M3}
|
||||
MINIMAX_MODEL_ID: ${MINIMAX_MODEL_ID:-MiniMax-M2.7-highspeed}
|
||||
MINIMAX_API_TYPE: ${MINIMAX_API_TYPE:-openai-compatible}
|
||||
MINIMAX_PROVIDER: minimax
|
||||
TAVILY_API_KEYS: ${TAVILY_API_KEYS:-}
|
||||
@@ -102,6 +102,8 @@ services:
|
||||
CURSOR_RUNNER_URL: http://cursor-agent:18765
|
||||
PI_AGENT_RUNNER_URL: http://pi-agent:18865
|
||||
PI_AGENT_RUNNER_AUTH_TOKEN: ${RUNNER_AUTH_TOKEN:-}
|
||||
PI_AGENT_PROVIDER: ${PI_AGENT_PROVIDER:-minimax}
|
||||
PI_AGENT_MODEL: ${PI_AGENT_MODEL:-MiniMax-M2.7-highspeed}
|
||||
RUNNER_AUTH_TOKEN: ${RUNNER_AUTH_TOKEN:-}
|
||||
ALLOW_IN_MEMORY: "false"
|
||||
AUX_FILE_DSN: file:/var/lib/feishu/outbox_dev.db?_journal_mode=WAL&_busy_timeout=5000
|
||||
|
||||
@@ -80,8 +80,8 @@ func Load(path string) (*Config, error) {
|
||||
CursorBridgeBin: "tools/cursor-bridge/index.mjs",
|
||||
PiAgentBin: "/opt/homebrew/bin/pi",
|
||||
PiAgentBridgeBin: "tools/pi-bridge/index.mjs",
|
||||
PiAgentProvider: "cc-switch-kimi-for-coding",
|
||||
PiAgentModel: "kimi-for-coding",
|
||||
PiAgentProvider: "minimax",
|
||||
PiAgentModel: "MiniMax-M2.7-highspeed",
|
||||
KbDbHost: "127.0.0.1",
|
||||
KbDbPort: 5432,
|
||||
KbDbUser: "regkb",
|
||||
|
||||
Reference in New Issue
Block a user