What happened?
The bug present in v0.15.4 persists in v0.15.5. When using DeepSeek V4 Pro (DeepSeek API) with thinking mode enabled, the CLI fails to relay reasoning_content tokens back to the API on subsequent requests, causing:
[API Error: 400 The reasoning_content in the thinking mode must be passed back to the API.]
Session ID: f1f5b1d1-9d99-4e35-b994-67eafa1e178d
Steps to reproduce:
1. Configure Qwen Code with DeepSeek API (DeepSeek V4 Pro / reasoning-capable model)
2. Enable thinking mode
3. Start any conversation — the error appears on the second or third turn
Logs
First occurrence:
1 2026-04-29T16:20:56.881Z [DEBUG] Received user query (20 chars)
2 2026-04-29T16:20:58.975Z [ERROR] [OPENAI_ERROR] OpenAI API Error: 400 The `reasoning_content` in the thinking mode must be
passed back to the API.
3 2026-04-29T16:20:58.997Z [ERROR] [ERROR_REPORT] Error when talking to API [Turn.run-sendMessageStream] {
4 "error": {
5 "message": "400 The `reasoning_content` in the thinking mode must be passed back to the API.",
6 "stack": "Error: 400 The `reasoning_content` in the thinking mode must be passed back to the API.
7 at APIError.generate (file:///.../cli.js:148359:18)
8 at OpenAI.makeStatusError (file:///.../cli.js:155393:25)
9 at OpenAI.makeRequest (file:///.../cli.js:155528:29)
10 ...
11 at async ContentGenerationPipeline.executeWithErrorHandling (file:///.../cli.js:156899:26)
12 at async LoggingContentGenerator.generateContentStream (file:///.../cli.js:146500:21)
13 at async retryWithBackoff (file:///.../cli.js:171879:22)
14 at async GeminiChat.makeApiCallAndProcessStream (file:///.../cli.js:175197:33)"
15 }
Second occurrence (same session, ~30s later):
1 2026-04-29T16:21:14.837Z [ERROR] [OPENAI_ERROR] OpenAI API Error: 400 The `reasoning_content` in the thinking mode must be
passed back to the API.
What did you expect to happen?
For the issue to not occur.
Current workaround: Disable thinking mode or switch to a non-reasoning model (e.g. DeepSeek V3).
Client information
Qwen Code: 0.15.5 (bb32b69)
Runtime: Node.js v20.20.2 / npm 10.8.2
OS: darwin arm64 (25.3.0)
Auth: API Key - openai
Base URL: https://api.deepseek.com
Model: deepseek-v4-pro
Fast Model: deepseek-v4-pro
Session ID: 19b13bc7-83c6-4f45-b320-72c742943f06
Sandbox: no sandbox
Proxy: no proxy
Memory Usage: 314.0 MB
What happened?
The bug present in v0.15.4 persists in v0.15.5. When using DeepSeek V4 Pro (DeepSeek API) with thinking mode enabled, the CLI fails to relay reasoning_content tokens back to the API on subsequent requests, causing:
[API Error: 400 The reasoning_content in the thinking mode must be passed back to the API.]
Session ID: f1f5b1d1-9d99-4e35-b994-67eafa1e178d
Logs
First occurrence:
Second occurrence (same session, ~30s later):
What did you expect to happen?
For the issue to not occur.
Current workaround: Disable thinking mode or switch to a non-reasoning model (e.g. DeepSeek V3).
Client information
Qwen Code: 0.15.5 (bb32b69)
Runtime: Node.js v20.20.2 / npm 10.8.2
OS: darwin arm64 (25.3.0)
Auth: API Key - openai
Base URL: https://api.deepseek.com
Model: deepseek-v4-pro
Fast Model: deepseek-v4-pro
Session ID: 19b13bc7-83c6-4f45-b320-72c742943f06
Sandbox: no sandbox
Proxy: no proxy
Memory Usage: 314.0 MB