What happened?
When using Qwen Code with DeepSeek's API (deepseek-v4-flash model, base URL https://api.deepseek.com/v1), the following error occurs intermittently during conversation:
✕ [API Error: 400 The reasoning_content in the thinking mode must be passed back to the API.]
This happens when DeepSeek's reasoning model returns a reasoning_content field in its response, and Qwen Code fails to pass it back in subsequent API requests. DeepSeek's API requires that reasoning_content from the assistant's response be included in the messages array for follow-up requests when thinking mode is active.
What did you expect to happen?
The conversation should continue normally without API errors. Qwen Code should properly preserve and pass back the reasoning_content field from the assistant's response when making subsequent API calls to DeepSeek's API.
Client information
Client Information
```
Qwen Code 0.15.1 (9010c09)
运行环境 Node.js v22.18.0 / npm 11.10.0
IDE 客户端 VS Code
操作系统 win32 x64 (10.0.26200)
认证 API Key - openai
基础 URL https://api.deepseek.com/v1
模型 deepseek-v4-flash
快速模型 deepseek-v4-flash
沙箱 no sandbox
代理 no proxy
内存使用 261.1 MB
```
Login information
Using API Key authentication with OpenAI-compatible provider pointing to DeepSeek API:
- Provider type:
openai
- Base URL:
https://api.deepseek.com/v1
- Model ID:
deepseek-v4-flash (custom provider config)
Anything else we need to know?
What happened?
When using Qwen Code with DeepSeek's API (deepseek-v4-flash model, base URL https://api.deepseek.com/v1), the following error occurs intermittently during conversation:
This happens when DeepSeek's reasoning model returns a
reasoning_contentfield in its response, and Qwen Code fails to pass it back in subsequent API requests. DeepSeek's API requires thatreasoning_contentfrom the assistant's response be included in the messages array for follow-up requests when thinking mode is active.What did you expect to happen?
The conversation should continue normally without API errors. Qwen Code should properly preserve and pass back the
reasoning_contentfield from the assistant's response when making subsequent API calls to DeepSeek's API.Client information
Client Information
``` Qwen Code 0.15.1 (9010c09) 运行环境 Node.js v22.18.0 / npm 11.10.0 IDE 客户端 VS Code 操作系统 win32 x64 (10.0.26200) 认证 API Key - openai 基础 URL https://api.deepseek.com/v1 模型 deepseek-v4-flash 快速模型 deepseek-v4-flash 沙箱 no sandbox 代理 no proxy 内存使用 261.1 MB ```Login information
Using API Key authentication with OpenAI-compatible provider pointing to DeepSeek API:
openaihttps://api.deepseek.com/v1deepseek-v4-flash(custom provider config)Anything else we need to know?
reasoning_contentfield, which is part of DeepSeek's thinking/reasoning mode response format., value must be function. Request id: 0217769279314770076f3f588c303a7ab8265369cf815762b3fbd #3553 (Kimi K2.5 API error with tool_calls), but with a different error message and root cause.