Hey guys, I’m having a “Bad request - please check your parameters” problem with OpenAI. Everything was working fine until yesterday when I started switching between models. Now, no matter which model I use, I get the same error.
Update: I connected OpenRouter Chat and used Gemini, minimax,deepseek, and glm, and the agent worked. I tried using OpenAI models through OpenRouter, but the same problem persists. However, Sub-agents work fine with OpenAI Chat.
Welcome @Ali4 to our community! I’m Jay and I am a n8n verified creator.
The screenshot shows “Use Responses API” is toggled on in the OpenAI Chat Model node - that’s the culprit. The Responses API uses a different tool calling format and is not fully compatible with n8n’s AI Agent node when attached tools are involved. Turn that toggle off and switch back to the standard Chat Completions API - the “No tool output found for function call” error should disappear immediately. The Responses API toggle is mainly useful if you need streaming or specific Responses API-only features, but for agent workflows with tools it causes this kind of failure.
I got this error: Bad request - please check your parameters
An assistant message with ‘tool_calls’ must be followed by tool messages responding to each ‘tool_call_id’. The following tool_call_ids did not have response messages: call_CPQTMJQP1aC9K7szYjBk97kl
The error comes from OpenAI’s tool calling rule, when the assistant generates tool_calls, each id needs to receive a corresponding tool response. In n8n, this points to some tool/sub-agent connected to the AI Agent (like Call Mortgage Agent or Call Expense Agent) that isn’t returning valid output in some path. I’d test disconnecting the tools one by one and make sure each sub-agent always returns valid output, including on error or when there’s no result.
@Ali4 building on @tamy.santos — the “tool_call_ids did not have response messages” error after disabling Responses API means at least one of ur connected subagents is returning empty/undefined when the parent calls it. OpenAI’s tool protocol REQUIRES every tool_call_id to get a tool response, even on no-result paths. fix is making every subagent always emit a string output, never an empty array.
drop this Code node as the last node in each subagent (before it returns to the parent agent):
now even when a subagent has nothing to return (filter rejected all items, API returned empty, etc), the parent agent still gets a output field back and the tool_call_id is satisfied. easiest way to find which subagent is breaking: disconnect them one at a time from the main agent and run — when the error goes away, thats the one missing output.
@Ali4 happy we could help! Feel free to mark whoever’s post as the solution, and have an amazing day! If you want help if we can try to fix the OpenAI one, let us know!