Error: Missing required parameter: 'tools[5].filters.type' in OpenAI Chat Model node

Describe the problem/error/question

I was following a tutorial that demonstrates building a training AI agent using n8n and OpenAI’s file search. The workflow connects Slack to an AI that answers questions based on a PDF file. I created a knowledge base, vectorize the document but it’s trowing an error:

Problem in node AI Agent: Bad request - please check your parameters

Expected Result:
The node should process the request and return a response from the OpenAI API.

Actual Result:
The node fails with the error about a missing required parameter: 'tools[5].filters.type'.

OpenAI credentials are set and working for other nodes.

Please advise on how to resolve this error!!

What is the error message (if any)?

When I’m using “@n8n/n8n-nodes-langchain.lmChatOpenAi” node (OpenAI Chat Model, version 1.3) in n8n version 1.120.4. I’m seeing this error:

Bad request - please check your parameters - Missing required parameter: 'tools[5].filters.type'.

Steps to Reproduce:

  1. Add the OpenAI Chat Model node to a workflow.

  2. Configure the node with the following parameters:

    • Model: gpt-4.1-mini

    • Responses API Enabled: true

    • Built-in Tools > File Search:

      • vectorStoreIds: ["vs_692c48b884b481918XXXXXXXXXXXXXX"]
  3. Execute the workflow.

Please share your workflow

Share the output returned by the last node

{

“errorMessage”: “Bad request - please check your parameters”,
“errorDescription”: “Missing required parameter: ‘tools[5].filters.type’.”,
“errorDetails”: {
“rawErrorMessage”: [
“400 Missing required parameter: ‘tools[5].filters.type’.”
]
},
“n8nDetails”: {
“nodeName”: “AI Agent1”,
“nodeType”: “@n8n/n8n-nodes-langchain.agent”,
“nodeVersion”: 3,
“time”: “11/30/2025, 11:34:14 AM”,
“n8nVersion”: “1.120.4 (Cloud)”,
“binaryDataMode”: “filesystem”,
“stackTrace”: [
“NodeOperationError: Bad request - please check your parameters”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_ec7fbe0da3d2dc5c86e61be805f9ba74/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V3/execute.ts:583:12",
" at Array.forEach ()“,
" at ExecuteContext.toolsAgentExecute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_ec7fbe0da3d2dc5c86e61be805f9ba74/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V3/execute.ts:572:16)”,
" at processTicksAndRejections (node:internal/process/task_queues:105:5)“,
" at ExecuteContext.execute (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/@n8n+n8n-nodes-langchain@file+packages+@n8n+nodes-langchain_ec7fbe0da3d2dc5c86e61be805f9ba74/node_modules/@n8n/n8n-nodes-langchain/nodes/agents/Agent/V3/AgentV3.node.ts:130:10)”,
" at WorkflowExecute.executeNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1093:8)“,
" at WorkflowExecute.runNode (/usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1274:11)”,
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:1708:27",
" at /usr/local/lib/node_modules/n8n/node_modules/.pnpm/n8n-core@file+packages+core_@[email protected]_@[email protected]_08b575bec2313d5d8a4cc75358971443/node_modules/n8n-core/src/execution-engine/workflow-execute.ts:2324:11"
]
}
}

Information on your n8n setup

  • n8n version: 1.120.4
  • Database (default: SQLite): n/a
  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a
  • Running n8n via (Docker, npm, n8n cloud, desktop app): n8n cloud
  • Operating system: n/a
1 Like

Same Thing happening with me, Im using self-host n8n

n8n version: 1.121.3

  • Database (default:Postgres): 17

  • n8n EXECUTIONS_PROCESS setting (default: own, main): n/a

  • Running n8n via (Docker, npm, n8n cloud, desktop app): Docker Desktop

  • Operating system: Windows

Error Log

Bad request - please check your parameters

Missing required parameter: ‘tools[1].filters.type’.

Error details

Other info

n8n version

1.121.3 (Self Hosted)

Time

01/12/2025, 12:43:48 pm

Problem in node ‘AI Agent‘

Bad request - please check your parameters

1 Like

Bumping this. The error Missing required parameter: 'tools[5].filters.type' suggests the n8n-nodes-langchain package isn’t sending the correct schema for OpenAI’s file_search tool.

@n8n-team - is this a known issue? Should we open a GitHub issue for tracking?

I think we should open git issue

1 Like

@felipetio I found a way to make it run. I checked what values the file search endpoint accepts in a curl request. If maxResults or filters aren’t provided, the request fails, so we need to supply a value. I’m passing {{ null }} to handle this.

ScreenShot

1 Like

I can confirm, this worked! Great find @Muhammad_Umar_Anzar !