docs(ack): add Codex model routing

This commit is contained in:
2026-07-12 14:53:50 +08:00
parent af823e867f
commit ae05845ee7
2 changed files with 34 additions and 2 deletions
+15 -1
View File
@@ -59,15 +59,29 @@
**模型不由编排层设置。** Orca 的 `orchestration task-create` / `dispatch` 没有 `--model` 参数——`dispatch` 只是把任务投递给一个已存在的终端 handle。**模型在创建 worker 终端、启动 agent CLI 时用 CLI 自带的 flag 固定**,之后该终端的所有 dispatch 都用这个模型。
**默认不跨 Agent CLI 创建 worker。** Coordinator 应按自己所在的运行环境选择同类 worker:Cursor 会话创建 `cursor-agent` workerCodex 会话创建 `codex` worker。不要依赖 Coordinator 凭模型回答来猜测运行环境或精确模型名;以实际 CLI / 终端环境为准。只有项目 overlay 或用户明确指定跨 Agent 时,才混用不同 CLI,并记录原因。
因此「档位 → 具体模型」的映射是 **agent 相关** 的,落地方式见 `orca-adapter.md` §「给 worker 终端固定模型」。常见 CLI:
| Agent CLI | 指定模型的方式 |
|-----------|----------------|
| Cursor (`cursor-agent`) | `cursor-agent --model <model>``--model auto` 让 Cursor 自动选(推荐给 Test/Developer worker |
| 其它(codex / opencode 等) | 用各自 CLI 的模型参数或配置 |
| Codex (`codex`) | `codex -m <model> -c model_reasoning_effort=<effort>` |
| 其它(opencode 等) | 用各自 CLI 的模型参数或配置 |
**本 kit 对 Cursor 的默认建议**Test 与 Developer worker 用 `cursor-agent --model auto`(自动选型,天然偏向高效模型,符合"中低档位"意图);需要更强时改成具体强模型(如 `--model claude-opus-4-8-thinking-high`)。Coordinator 作为强模型脑,通常就是发起编排的那个会话本身。
### Codex 默认映射
| 角色 | 模型 | reasoning effort |
|------|------|------------------|
| Coordinator (PM) | `gpt-5.6-sol` | `high` |
| Developer | `gpt-5.6-terra` | `medium` |
| Test | `gpt-5.6-luna` | `low` |
| Developer 升级 | `gpt-5.6-sol` | `high`;极复杂任务可用 `xhigh` |
Codex worker 应明确指定模型和 reasoning effort,不把“未指定模型”当作 Cursor `auto` 的等价物。Codex 未指定模型时使用产品推荐模型,但推荐值可能随版本更新,也不保证符合 Test / Developer 的成本档位。具体模型若失效或被弃用,应保持上面的角色档位不变,只更新本映射;项目也可在 overlay 中覆盖映射。
---
## 成本原则
+19 -1
View File
@@ -31,6 +31,8 @@ orca orchestration inbox --limit 20 --json
**编排层不设模型。** `task-create` / `dispatch` 都没有 `--model``dispatch --to <handle>` 只是把任务投给一个已存在的终端,用的是那个终端里 agent 会话启动时的模型。要固定模型,就在 **创建 worker 终端** 时用 agent CLI 的模型参数:
默认沿用 Coordinator 当前所在的 Agent CLICursor Coordinator 创建 Cursor workerCodex Coordinator 创建 Codex worker。不要通过询问模型来猜运行环境;以当前 CLI / 终端环境为准。除非项目 overlay 或用户明确指定,否则不跨 Agent CLI 创建 worker。
```bash
# CursorTest / Developer worker 用 auto 模型(自动选型)
orca terminal create --worktree path:<dev_worktree> \
@@ -39,6 +41,21 @@ orca terminal create --worktree path:<dev_worktree> \
# 需要更强模型时改成具体模型
orca terminal create --worktree path:<dev_worktree> \
--command "cursor-agent --model claude-opus-4-8-thinking-high" --title "DEV" --json
# CodexDeveloper worker
orca terminal create --worktree path:<dev_worktree> \
--command "codex -m gpt-5.6-terra -c model_reasoning_effort=medium" \
--title "DEV" --json
# CodexTest worker
orca terminal create --worktree path:<test_worktree> \
--command "codex -m gpt-5.6-luna -c model_reasoning_effort=low" \
--title "TEST" --json
# Codex:复杂 Developer 任务升级
orca terminal create --worktree path:<dev_worktree> \
--command "codex -m gpt-5.6-sol -c model_reasoning_effort=high" \
--title "DEV-STRONG" --json
```
拿到返回的 handle 后再 `task-create` + `dispatch --to <handle>`。模型档位与选型策略见 `model-routing.md`
@@ -51,7 +68,8 @@ orca terminal create --worktree path:<new_worktree> --command "cursor-agent --mo
```
- `cursor-agent --list-models` 可列出合法模型;`auto` 表示由 Cursor 自动选型。
- 其它 CLIcodex / opencode 等)用各自的模型参数或配置,`--command` 相应替换
- Codex 用 `-m / --model` 指定模型,用 `-c model_reasoning_effort=<effort>` 固定推理档位;不要把省略 `-m` 当作 Cursor `auto` 的等价物
- 其它 CLI(opencode 等)用各自的模型参数或配置,`--command` 相应替换。
- 若 worker 是已在跑的会话(用 `--inject` 投递),模型已由该会话启动时决定,无法在 dispatch 时改;要换模型需新建终端。
---