Deepseek v4 bad request

Hi Everybody, I am using repocloud.io service to run n8n ver.2.14.2

:sad_but_relieved_face:

Describe the problem/error/question

it worked fine in deepseek v3, but when deepseek upgrade to v4, it doesn’t work for 2nd round. Does anyone get the same problem? how to fix it.

, instance unavailable), please contact support at help@n8n.io

What is the error message (if any)? Bad request

Information on your n8n setup

  • n8n version: 2.14.2

Hi @Alan_Cheung1 Have you tried accessing the DeepSeek v4 model from OpenRouter? That would make it work hopefully.

@Alan_Cheung1 sounds like the chat memory is sending back a message format v4 rejects on turn 2, drop the memory node and reconnect a fresh Window Buffer Memory with context window set to 1, or just swap the deepseek node for a plain HTTP Request to https://api.deepseek.com/chat/completions so you control the body shape yourself.

Seems ok if loaded from OpenAI chat model

Follow your suggestion, it is failed when ai agent call a tool

If no tool is called , it works. Original deepseek chat model node also works fine.

This is expected. You may have to define a tool calling schema. This may require some trial and error

@AlanCheung1 deepseek v4 is stricter on function schemas, in your tool node make sure every param has a type and description and drop any nested objects, also try setting toolchoice to auto in the model node options, v4 chokes when the schema has loose types that v3 silently accepted.

hey @Alan_Cheung1

Someone has already created a community node that resolves this issue,

If the community node isn’t an option for you, you can bypass the native DeepSeek node entirely and use a HTTP Request node.

and finally you cann also contact support at help@n8n.io

It happens sometime, same for the postges, its not your fault. Have you tried the deepseek v4 from the openrouter? If it still happen try contacting the n8n support