主对话指定 Luna 后原生 subagent 继承模型并因白名单不匹配而无法启动
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: zym
**客户端版本**: 0.1.46
---
## 现象
主对话在模型选择器中手动指定「Codex GPT-5.6 Luna」后,调用原生 subagent 且不传 `model` 参数时,subagent 默认继承主对话模型,但创建接口不接受继承得到的模型标识,导致任务无法启动。
## 复现步骤
1. 在主对话的模型选择器中指定「Codex GPT-5.6 Luna」。
2. 调用原生 `spawn_agent` 创建 subagent,不传 `model` 和 `reasoning_effort`。
3. 分别尝试继承全部上下文和不继承上下文。
4. 观察 subagent 创建结果。
## 期望行为
未显式指定 subagent 模型时,系统应自动选择当前可用的 subagent 模型,或将主对话模型正确映射为 subagent 可识别且账户有权访问的模型。
## 实际行为
创建阶段返回脱敏后的错误摘要:继承模型 `codex/gpt-5.6-luna` 无法识别,接口提示仅支持 `gpt-5.6-sol` 和 `gpt-5.6-terra`。
若显式指定 `gpt-5.6-sol` 或 `gpt-5.6-terra`,subagent 可以创建,但执行阶段返回 `403 Forbidden`;账户允许的模型列表包含 `codex/*` 和 `gpt-5.6-luna`,与创建接口提供的模型名称不一致。
## 复现频率
当前对话中连续复现。切换主对话指定模型后,另一个对话曾成功运行原生 subagent,说明问题与主对话模型继承及模型路由相关。
## 已尝试
- 不指定模型,继承全部上下文:失败。
- 不指定模型,不继承上下文:失败。
- 显式指定 `codex/gpt-5.6-luna`:创建接口拒绝该模型名。
- 显式指定 `gpt-5.6-sol` 或 `gpt-5.6-terra`:执行阶段因账户权限返回 403。
- 在界面切换主对话指定模型后,其他对话曾成功调用。
---
**版本区域**: CN
**OS**: darwin arm64 (25.5.0)
**界面语言**: zh-CN
Contributor guide
Research direction
Start with the model selector and native `spawn_agent` entry point, then trace how an omitted model is inherited during subagent creation. Compare the inherited identifier with the creation allowlist and the account’s permitted models, using the listed reproduction steps to verify the fix. Done means an omitted model creates and runs a subagent without a model-name mismatch or 403.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100