continue icon indicating copy to clipboard operation
continue copied to clipboard

Bug: DeepSeek R1 (Reasoner) fails with MCP tools - 400 Missing reasoning_content

Open dzylol opened this issue 11 months ago • 2 comments

Describe the bug When using deepseek-reasoner (DeepSeek R1) with any MCP tool (e.g., Tavily, Filesystem), the second turn of the conversation fails with a 400 error. The API response indicates that the reasoning_content field is missing in the message history when a tool call is involved.

To Reproduce

  1. Select DeepSeek Reasoner as the active model.
  2. Ask a question that triggers an MCP tool (e.g., "@tavily Search for latest news").
  3. The tool executes successfully, but when Continue sends the tool result back to the API to generate the final response, the API returns: 400 Missing reasoning_content field in the assistant message at message index 2.

Expected behavior Continue should preserve and include the reasoning_content field from the assistant's previous "thinking" turn when sending the conversation history back to the DeepSeek API for tool-calling completion.

Screenshots/Logs

400 Missing reasoning_content field in the assistant message at message index 2. 
Reference: https://api-docs.deepseek.com/guides/thinking_mode#tool-calls

Environment

  • OS: macOS 15.7.4 (24G503)
  • Continue version: 1.2.11 (Pre-release)
  • IDE: VSCodium (Darwin-arm64)
  • Model: deepseek-reasoner (official API)

this is the log file. vscode-app-1766330123451.log

something important in the file:

Log snippet showing the failure of DeepSeek R1 with MCP:
[@continuedev] error: 400 Missing reasoning_content field in the assistant message at message index 2.

This confirms that the reasoner's thought trace is being dropped during tool-call history reconstruction.

dzylol avatar Dec 21 '25 15:12 dzylol

Related Issues

  • #8989 - When use deepseek v3.2 as agent, throw "400 Missing reasoning_content field in the assistant message at message index 2"
  • #7170 - Toolcalls is dropped when return in function renderChatMessage in Agent + deepseek-chat context
  • #8990 - BUG: Edit mode with gpt-oss-120b inserts reasoning text into file
  • #5037 - Reasoning models cannot give a thought process

continue avatar Dec 21 '25 15:12 continue

Thanks for reporting! @uinstinct fixed this here: https://github.com/continuedev/continue/pull/10027 This will be on the next release

RomneyDa avatar Feb 03 '26 06:02 RomneyDa