Azure OpenAI chat node is not working in our chat agent workflows. Even though we have not made any changes in the configuration or the content of these flows, we are getting a bad request error. We believe something on the OpenAI API side has changed but the node is not updated to reflect that change yet.
What is the error message (if any)?
Bad request - please check your parameters
Missing required parameter: ‘tools[0].type’.
Please share your workflow
Share the output returned by the last node
Bad request - please check your parameters
Missing required parameter: ‘tools[0].type’.
Information on your n8n setup
n8n version: 2.29.10
Database (default: SQLite): SQLite
n8n EXECUTIONS_PROCESS setting (default: own, main): own
Running n8n via (Docker, npm, n8n cloud, desktop app): Docker
To make the OpenAI node work with Azure, you would need to set up a proxy (such as LiteLLM) that translates OpenAI-format requests into Azure-format requests.
This ‘Missing required parameter: tools[0].type’ error is almost always the Azure api-version, not the credential itself. Recently some regions (Sweden Central included) started validating the tools array strictly, requiring each tool to come as {“type”:“function”,“function”:{…}}. If your api-version points to ‘latest’/preview, the endpoint expects the new format but the payload coming from the node doesn’t match, and you see this error even without having changed anything in the flow. Fix the api-version to a stable GA, like 2024-10-21 (or 2024-08-01-preview), directly in the credential/base URL of the deployment, instead of leaving it on the newest one. This realigns the payload that the node sends with what the endpoint accepts. Two quick checks to confirm the diagnosis before making changes: 1) temporarily remove the tool sub-nodes from the AI Agent and run just pure chat; if it works, it’s confirmed that it’s the serialization of the tools tied to the api-version, not the credential. 2) confirm that the deployment is a model that supports tool calling in a recent version (gpt-4o / gpt-4-turbo); older gpt-35-turbo deployments reject the tools format. A proxy like LiteLLM solves it, but that’s a workaround, you don’t need that for this case.
Hello, thanks a lot for your detailed response! After changing the api-version and trying out the stable GA examples you gave, we are getting another error but this time it is from the AI Agent node, not from the Azure OpenAI Chat node. Here is the error trace:
NodeOperationError: Cannot read properties of undefined (reading ‘toLowerCase’) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_2c7f106572ec97ecf6e9416b33a264bd/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:418:13 at Array.forEach () at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_2c7f106572ec97ecf6e9416b33a264bd/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts:406:17) at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_2c7f106572ec97ecf6e9416b33a264bd/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V2/AgentV2.node.ts:142:10) at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_cf5896492347c4895f0373f4acc773d7/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1080:8) at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_cf5896492347c4895f0373f4acc773d7/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1380:11) at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_cf5896492347c4895f0373f4acc773d7/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1842:27 at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@opentelemetry+api@1.9.0_@opentelemetry+exporter-trace-otlp_cf5896492347c4895f0373f4acc773d7/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2534:11
Do you think it might be related to the api-version change in the chat node? Because in the debug editor, I am seeing this message in the chat window on bottom left:
The toLowerCase error in the AI Agent (ToolsAgentV2) is a separate issue from the api-version - it usually fires when a tool call returns undefined or null instead of a string, and the agent tries to call .toLowerCase() on it to normalize the tool name before routing. Two things to check:
Isolate which tool is causing it - remove tools one by one from the AI Agent until the agent runs without crashing. The tool that breaks it is returning a bad response format.
Make sure each connected tool node always returns { json: { output: "some string" } } - the AI Agent expects the tool result in the output field as a string. If your tool node returns nothing or an unexpected shape, you’ll hit this error.
The “Connection rejected” in the chat window suggests the Azure OpenAI connection itself is still failing upstream, so getting that stable first (fixed api-version as nocoderobots described) will help isolate whether the tool error is secondary.
Thanks a lot for your detailed response! It was actually caused by a Chat node connected to the AI Agent as a tool. So when we removed it, it was working again. I will look into how we can fix it and connect it back to the AI Agent.
We have been trying to fix the problem in the human-in-the-loop chat node, but it seems like there is an issue between what the nodes communicate between each other.
We are still getting the error
Bad request - please check your parameters
400 Missing required parameter: ‘tools[0].type’.
We tried adding the node from scratch (to see if there is a node version compatibility issue) and doing all the configurations again from scratch. I do not know what the problem could be. Do you maybe have any idea on how this could be fixed?
Rebuilding the nodes from scratch won’t fix this one - the issue is in the Azure credential, not the node config. Check the API version set in your Azure OpenAI credential. If it’s pointing to a newer API version (like 2025-xx-xx or any preview), Azure now strictly requires type: "function" in every tool definition, which the n8n node doesn’t send yet.
The fix: open your Azure OpenAI credential and pin the API version to 2024-10-21 (stable GA). That version accepts the tool format n8n currently sends. If your credential uses a Base URL with the version embedded in it, update that URL directly.
Hey there! Your intuition is 100% correct—something on the OpenAI API side did change, and it’s causing exactly this issue.
OpenAI recently updated their API requirements for function and tool calling. They now explicitly require a type field (usually set to "function") to be passed within each tool definition in the payload. Because your AI Agent is passing tools to the Azure OpenAI Chat node using the older, legacy payload structure, the Azure API is rejecting it with the Missing required parameter: ‘tools[0].type’ error.
The Fix:
I see you are currently running n8n version 2.29.10. The n8n team is already aware of this OpenAI API shift and released a patch specifically to address it.
All you need to do is update your n8n Docker image to version 2.31.0 or higher.
Once you update, the Azure OpenAI node will automatically structure the tools array to comply with the new requirements, and your chat agents will be back online instantly. No workflow changes needed!
P.S. I actually ran your exact forum post through n8n Mastery / Sensei (a free AI Co-pilot I built for the n8n community), and it immediately identified the OpenAI payload change and the exact n8n version mismatch!
I’m attaching a screenshot of its full analysis below. If you ever want an assistant to instantly debug AI Agent errors or API version mismatches right next to your canvas, you can check it out here: https://n8n-sensei-app-nu.vercel.app/
Hope the update goes smoothly and gets your workflows running again!