Using the AI Agent with Azure 5-mini model always causes an error. This error does not occur when using Azure 4.1-mini for example, so I think it’s an issue with n8n AI Agent handling the newer models? The problem is OpenAI has decided to retire 4.1-mini so it won’t be supported anymore, and I need to start using a newer model but this error is preventing me from doing so.
hey @JonathanTAU
i have hit similar compatability snags with newer Azure models too it is because the AI Agent node (LangChain based) is still wired for old Chat Completions and it is still sending the old Chat Completions playload (“messages array”) but Azure’s Responses API (which newer models force) wants “input” instead. OpenAI started pushing that migration hard from mid - 2025, and Azure rolled it out agressively.
things that can fix it :
Switch to the standalone Azure OpenAI Chat Model node use “Generate a Model Response” operation if avalable in your version (it maps responses API ) . Feed your prompt there and handle tools / memory separately if needed.
Update n8n to the latest (1.128+ has better Responses handling in OpenAI nodes).
If you must keep Agent, try failling back to an older model deployment that still accepts Chat Completeions syntax (like your working 4.1-mini).
Ensure the “Model” field in your Azure node matches your Deployment Name in Azure AI Foundry exactly.
hey, yeah this is a known compatibility issue with the newer Azure OpenAI models, they switched from the Chat Completions API to the Responses API and n8n’s LangChain-based nodes haven’t caught up yet. Your best bet right now is to use an HTTP Request node to call the Azure API directly with the correct input parameter format instead of going through the AI Agent node, it’s more manual but it’ll work with the new models until n8n updates their integration.