切换模型后发送消息报 400:[ArrayParam] array_above_max_length
- Dominant language
- TypeScript
- Stars
- 2.7k
- Forks
- 395
- Avg merge
- 21h 48m
- Merged PRs (30d)
- 776
Description
**提交人**: 用户3312
**客户端版本**: 0.1.38
---
## 反馈类型
Bug(问题报告)
## 现象
在会话中切换模型(GPT ↔ DeepSeek,两个方向都可能出现)后发送消息,会报 400 错误,错误原文如下:
```json
{ "type": "error", "error": { "type": "invalid_request_error", "message": "[ArrayParam] [input[14].content] [array_above_max_length] Invalid 'input[14].content': array too long. Expected an array with maximum length 0, but got an array with length 1 instead." }, "status": 400 }
```
## 复现步骤 / 使用场景
- 在某个会话中从 GPT 切换到 DeepSeek,或从 DeepSeek 切换到 GPT。
- 切换后发送消息,错误出现。
- 无法稳定复现,两个切换方向都可能触发。
补充观察:错误提示 `input[14].content` 要求数组最大长度为 0,但实际长度为 1,疑似与切换模型后残留的内容数组(如附件/图片等媒体引用)有关,这一点希望官方确认。
## 期望行为
切换模型后可以正常对话,不再出现该 400 错误。
---
**版本区域**: CN
**OS**: win32 x64 (10.0.26200)
**界面语言**: zh-CN
Contributor guide
Research direction
Start by tracing the model-switch handling and the request serialization path after switching between GPT and DeepSeek, paying attention to input[14].content and retained attachment or image references. Reproduce the 400 response if possible, then verify that switching models allows messages to send without an array_above_max_length error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100