Compatibility with DeepSeek model's design to return reasoning content after tool calls?

DeepSeek V4 was released today, and its coding capabilities seem noteworthy. However, Cursor currently doesn’t support DeepSeek’s thinking model design, which requires returning reasoning_content after multi-turn tool calls. Could compatibility be added?

same question

Yeah please add support for it, would be lovely

same request, pls try to add this feature

same request

same request

Seems like it fails when it does a tool call

Based on the benchmarks, Kimi K2.6 performs better than Deepseek V4.

So what’s the harm in having another model to choose from?

It takes manpower to do such implementations, tests and optimizations. If I have to choose one model to be added, I am not choosing the worse one.

Hi folks, I just worte this compatibility layer: https://github.com/yxlao/deepseek-cursor-proxy

The root cause is that DeepSeek API expects reasoning_content to be passed back when tool call + thinking mode is used.

This shall make Cursor work with deepseek-v4-pro and deepseek-v4-flash. Feedback are welcome!

same request

Request ID: cf87522c-4f2a-4ea8-a65f-89b1835e8b9d
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: {“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: {“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
Cvs: Provider Error Provider returned error: {“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
at Pf_ (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Object.Va [as onSubmit] (vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)
at async vscode-file://vscode-app/o:/Program%20Files/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:40803:100980

need it too

in DeepSeek thinking_mode,you can find that 'Please note that, unlike turns in thinking mode that do not involve tool calls, for turns that do perform tool calls, the reasoning_content must be fully passed back to the API in all subsequent requests.

If your code does not correctly pass back reasoning_content, the API will return a 400 error. Please refer to the sample code below for the correct approach’

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Issue 1: Context window capped at 200K
DeepSeek V4 Pro has a native 1M token context window. When connected through Cursor, the context appears to be limited to only 200K tokens. Other tools (e.g., OpenCode) pass through the full 1M context without restriction. Please support the full 1M context window.
Issue 2: “reasoning_content must be passed back to the API” error
When DeepSeek V4’s thinking mode is enabled, Cursor throws:
{“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”}}
DeepSeek’s API requires the reasoning_content from the previous response to be included unmodified in subsequent requests. Cursor’s agent loop does not preserve/relay this field, causing all follow-up requests to fail. Please implement proper reasoning_content passthrough for DeepSeek models.

Steps to Reproduce

Issue 1:

  1. Connect DeepSeek V4 in Cursor
  2. Load a codebase larger than 200K tokens
  3. Observe that only ~200K tokens of context are available, even though the model supports 1M
    Issue 2:
  4. Enable thinking/reasoning mode for DeepSeek V4 in Cursor settings
  5. Send a multi-turn conversation (2+ messages)
  6. Error occurs on the second request: “reasoning_content must be passed back to the API”

Operating System

MacOS

Version Information

Version: 3.2.11
VSCode Version: 1.105.1
Commit: e9ee1339915a927dfb2df4a836dd9c8337e17cc0
Date: 2026-04-24T14:36:47.933Z
Layout: editor
Build Type: Stable
Release Track: Default
Electron: 39.8.1
Chromium: 142.0.7444.265
Node.js: 22.22.1
V8: 14.2.231.22-electron.0
OS: Darwin arm64 25.4.0

For AI issues: which model did you use?

DeepSeekV4pro

For AI issues: add Request ID with privacy disabled

Request ID: 08ff07d7-7821-4f23-8329-4c3076ce4aab
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: {"error":{"message":"The reasoning_content in the thinking mode must be passed back to the API.","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: {“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
Cvs: Provider Error Provider returned error: {“error”:{“message”:“The reasoning_content in the thinking mode must be passed back to the API.”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
at Pf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:24260)
at Rf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29432:23144)
at Uf_ (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:6490)
at q0h.run (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29433:11307)
at async cQi.runAgentLoop (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41748:12418)
at async Vnm.streamFromAgentBackend (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:12344)
at async Vnm.getAgentStreamResponse (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:41816:19567)
at async lCt.submitChatMaybeAbortCurrent (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:29548:16906)
at async Va (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:40804:4230)

Does this stop you from using Cursor

No - Cursor works, but with this issue

This provides a workaround: GitHub - yxlao/deepseek-cursor-proxy: Fixes missing reasoning_content for DeepSeek V4 · GitHub You may try it out.

thanks

Hopefully cursor will fix this in the next update

Hey everyone,

Thanks for the reports. BYOK with Deepseek isn’t something we’re actively working on right now, but I’ve passed along the feedback to our team!

Thanks @yxlao for posting this workaround: