Hi, when using the Cohere Chat Model node, im getting thi errors:
BadRequestError Status code: 400 Body: { “id”: “xxxxxxx-c0eb-41cf-997e-xxxxxxx”, “message”: "invalid request: this model is not supported with ‘/v1/chat’, please use ‘/v2/chat’ instead. More details in the migration guide: Migrating From API v1 to API v2 | Cohere " }
@lamanrasmi kjooleng’s answer is right for now — there isn’t a supported way to fully avoid the HTTP Request node here today. A couple of details that might help:
The reason the OpenAI Chat Model node with a custom base URL doesn’t work isn’t just the endpoint version — Cohere’s v2/chat request/response format isn’t the same shape as OpenAI’s chat completions, so the OpenAI-compatible node can’t map it correctly (it isn’t built to speak Cohere’s own protocol).
The built-in Cohere Chat Model node hardcoding /v1/chat while your model requires /v2/chat looks like a genuine bug in that node, since the model list check itself still lives on /v1. Worth filing on n8n’s GitHub issue tracker if you haven’t already, so it gets fixed at the source instead of everyone working around it.
One thing to note: the HTTP Request node can’t be wired in as a drop-in replacement for the Chat Model input on an AI Agent or Basic LLM Chain — that connector needs the LangChain “language model” interface, not a plain HTTP output. So the workaround only really works if you call Cohere directly with an HTTP Request node as a normal step in your flow and parse the JSON response yourself, not as a sub-node feeding an Agent/Chain.
Hope that saves you some trial and error.
Cohere supports an OpenAI-compatible endpoint at https://api.cohere.com/compatibility/v1 - that’s your best workaround for using it inside an AI Agent or Basic LLM Chain right now. Just use the OpenAI Chat Model node, point the base URL to that Cohere compatibility endpoint, and use your Cohere API key. This keeps the LangChain interface intact so it works natively with agents and chains.