Chat2API
Chat2API copied to clipboard
[BUG] 使用 Trae 接入时 User 文本变为多个 [object Object]
🐛 Bug Report
问题描述
复现步骤
- 在 Chat2API 中配置好 Qwen,手动调用后确定可用(AI 可以正确回复)
- 接入 Trae,正常添加未报错
- 在 Trae 中与 AI 聊天,AI 回答
It looks like your message didn't come through correctly — I'm seeing `[object Object]` repeated, which usually means a JavaScript object was converted to a string unintentionally.
Could you please restate what you'd like help with?
- 在网页中查看,发现
User:后面跟着一堆[object Object]
期望行为
占位内容正常替换,可以在 Trae 中与 AI 正常聊天
实际行为
提示词正常出现,但 User: 后跟随一堆 [object Object],导致 AI 并不知道用户在说什么
环境信息
基本信息
| 项目 | 值 |
|---|---|
| Chat2API 版本 | v1.4.0 |
| 操作系统及版本 | Windows 11 25H2 |
| 系统架构 | x64 |
相关 Provider 信息
- [ ] DeepSeek
- [ ] GLM
- [ ] Kimi
- [ ] MiniMax
- [ ] Perplexity
- [ ] Qwen (CN)
- [x] Qwen AI (Global)
- [ ] Z.ai
Provider 详情
| 项目 | 值 |
|---|---|
| 出问题的 Provider | Qwen AI (Global) |
| 认证方式 | JWT Token(同时填写了 Cookie) |
| 使用的模型 | Qwen3.7-Max |
代理配置
| 项目 | 值 |
|---|---|
| 代理端口 | 4541 |
| 负载均衡策略 | Round Robin |
| 添加的账号数量 | 1 |
| 是否启用 API Key 认证 | 是 |
请求日志
{"id":"1781426295175-6nv9d40sk","timestamp":1781426295175,"level":"info","message":"Created provider: Qwen AI (International)","providerId":"qwen-ai"}
{"id":"1781426295209-ss095tjhb","timestamp":1781426295209,"level":"info","message":"Created account: Qwen AI (International) 账户","accountId":"1781426295189-0c4tv1hix","providerId":"qwen-ai"}
{"id":"1781426589404-f7oif74lk","timestamp":1781426589404,"level":"info","message":"Update provider: Qwen AI (International)","providerId":"qwen-ai"}
{"id":"1781451242478-vtg4uv40j","timestamp":1781451242478,"level":"info","message":"Update provider: Qwen AI (International)","providerId":"qwen-ai"}
{"id":"1781451996925-8vyy3erx8","timestamp":1781451996926,"level":"warn","message":"POST /v1/chat/completions 200 2143ms","data":{"method":"POST","path":"/v1/chat/completions","status":200,"latency":2143,"clientIP":"127.0.0.1","slowRequest":true}}
请求、用户输入、错误中无任何内容,响应如下
data: {"id":"","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"role":"assistant","content":""},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"It"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" looks like your message"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" didn't come through"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" correctly"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" — I'm seeing"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" `[object Object"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"]` repeated,"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" which usually means"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" a JavaScript object was"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" converted"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" to a string unintention"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"ally.\n\nCould"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" you please resend your"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" request? I"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":"'m ready to help"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" with any"},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{"content":" software engineering task."},"finish_reason":null}],"created":1781451996}
data: {"id":"513e6937-a76a-4cb0-9451-b1c2aa2f3e32","model":"qwen3.7-max","object":"chat.completion.chunk","choices":[{"index":0,"delta":{},"finish_reason":"stop"}],"created":1781451996}
data: [DONE]