makecindy / makecindy/cindy

网关账号下启动 subagent 必现 400 "Model not exist"——子任务请求的 claude-* 模型名未映射到账号可用模型

Open
#3,982 2 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
TypeScript
Stars
2.7k
Forks
395
Avg merge
21h 48m
Merged PRs (30d)
776

Description

**提交人**: 出发吧揪揪
**客户端版本**: 0.1.73

---

## 现象

2026-09-02 起,Linux 桌面端多个会话、多个项目中,凡是通过内置 Agent 工具启动 subagent(Explore / Plan / general-purpose,均未显式指定模型),subagent 的**第一个 API 请求**就返回:

```
API Error: 400 event:error
data:{"code":"InvalidParameter","message":"Model not exist."}
```

subagent 直接终止,100% 复现。2026-08-28 之前同样的调用工作正常(当时账号包含 Anthropic 模型)。

## 触发条件

- 主会话使用 Cindy 内置网关托管的模型账号,该账号的可用模型清单(约 19 个)**不包含任何 Anthropic 模型**;
- 主循环本身正常——host 会把主会话的模型请求改写到网关认识的模型。

## 关键证据(实测)

1. 不指定 model 启动内置 Explore subagent → 报错回显实际发往 API 的模型名是 `claude-opus-5` → 400;
2. 显式 `model: sonnet` 启动 → 发往 API 的是 `claude-sonnet-5` → 400;
3. host agent 日志在同期持续输出:`auto-review model candidate failed — candidateId: claude-haiku, providerId: anthropic, model: claude-haiku-4-5, reason: no_candidate`,即 auto-review 权限模式同样因 haiku 档无映射而失败,降级为逐次人工确认;
4. 本地会话 transcript 中同类失败分布在 9/2、9/3、9/5,跨项目出现。

## 期望行为

非主循环发起的档位/小模型请求(built-in subagent、auto-review 等)应与主循环一样被映射到当前账号可用的模型,或至少明确回退,而不是让整个 Agent/Task 工具在此类账号配置下完全不可用。
---
## 提交时的任务环境

仅代表提交时快照,不一定是故障环境。OS 来自提交客户端本机,不含 SSH 远端主机;Harness / 模型来自当前任务。与运行环境无关的反馈可忽略本段。
**版本区域**: CN
**OS**: linux x64 (6.8.0-138-generic)
**Harness**: Claude Code
**Model ID**: ` qwen3.8-flash `
**界面语言**: zh-CN

Contributor guide

Open the contributing guide

Research direction

Start by tracing model selection and gateway mapping for built-in subagent and auto-review requests, then compare those paths with the main-loop model rewrite. Reproduce using an account whose available models exclude Anthropic models. Done means these requests map to an available model or fall back clearly without returning 400 "Model not exist."

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
Active
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.