{"record":{"id":"ecceca9bbbedbde4","repo":"n8n-io/n8n","slug":"this-model-is-not-supported-in-version-version","errorCode":null,"errorMessage":"This model is not supported in ${version} version of the Agent node. Please upgrade the Agent node to the latest version.","messagePattern":"This model is not supported in (.+?) version of the Agent node\\. Please upgrade the Agent node to the latest version\\.","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts","lineNumber":280,"sourceCode":"\t\tconst returnData: INodeExecutionData[] = [];\n\t\tconst items = this.getInputData();\n\t\ttotalItems = items.length;\n\t\tconst batchSize = this.getNodeParameter('options.batching.batchSize', 0, 1) as number;\n\t\tconst delayBetweenBatches = this.getNodeParameter(\n\t\t\t'options.batching.delayBetweenBatches',\n\t\t\t0,\n\t\t\t0,\n\t\t) as number;\n\t\tconst needsFallback = this.getNodeParameter('needsFallback', 0, false) as boolean;\n\t\tconst memory = await getOptionalMemory(this);\n\t\tconst model = await getChatModel(this, 0);\n\t\tassert(model, 'Please connect a model to the Chat Model input');\n\t\tconst fallbackModel = needsFallback ? await getChatModel(this, 1) : null;\n\n\t\t// FIXME: remove when this is fixed: https://github.com/langchain-ai/langchainjs/pull/9082\n\t\t// Responses API + tools is broken when using langchain default call handling. In V3 calls are handled differently, so it works.\n\t\tif (checkIsResponsesApi(model)) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t`This model is not supported in ${version} version of the Agent node. Please upgrade the Agent node to the latest version.`,\n\t\t\t);\n\t\t}\n\n\t\tif (checkIsResponsesApi(fallbackModel)) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t`This fallback model is not supported in ${version} version of the Agent node. Please upgrade the Agent node to the latest version.`,\n\t\t\t);\n\t\t}\n\n\t\tif (needsFallback && !fallbackModel) {\n\t\t\tthrow new NodeOperationError(\n\t\t\t\tthis.getNode(),\n\t\t\t\t'Please connect a model to the Fallback Model input or disable the fallback option',\n\t\t\t);\n\t\t}","sourceCodeStart":262,"sourceCodeEnd":298,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts#L262-L298","documentation":"Thrown by Tools Agent V2 when the connected primary model uses OpenAI's Responses API. As noted in the FIXME comment, LangChain.js default call handling is broken for Responses API + tools (tracked in langchain-ai/langchainjs#9082). V3 uses a different call path and works correctly.","triggerScenarios":"Tools Agent V2 connected to a model whose connector selects the Responses API (newer OpenAI chat models with bindTools) — checkIsResponsesApi returns true.","commonSituations":"User upgraded the OpenAI model node or credentials to use Responses API but the Agent node is still on V2; new workflow created with defaults that point to a Responses-API model.","solutions":["Upgrade the Agent node from V2 to V3 (the V3 call path supports Responses API).","Or switch the model connection to a non-Responses-API model variant (e.g. classic Chat Completions).","If you cannot upgrade, disable tools or use a different agent type."],"exampleFix":"// before — Agent node typeVersion 2 with a Responses-API model\n// (throws on execution)\n\n// after — bump the Agent node typeVersion to 3 in the workflow JSON\n{\n  \"type\": \"@n8n/n8n-nodes-langchain.agent\",\n  \"typeVersion\": 3\n}","handlingStrategy":"validation","validationCode":"// Pre-flight: detect Responses-API models before running the agent\nimport { checkIsResponsesApi } from '@n8n/nodes-langchain';\nconst model = await getChatModel(this, 0);\nif (model && checkIsResponsesApi(model)) {\n  throw new NodeOperationError(this.getNode(), 'Upgrade this Agent node to V3 to use a Responses-API model.');\n}","typeGuard":"function isResponsesApiModel(model: unknown): boolean {\n  return checkIsResponsesApi(model as BaseChatModel);\n}","tryCatchPattern":null,"preventionTips":["When using newer OpenAI Responses-API models, set Agent typeVersion to 3.","Track langchain-ai/langchainjs#9082 for upstream resolution.","Pin model versions if you cannot upgrade the agent."],"tags":["langchain","agent","tools-agent","openai","responses-api","version","v2"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}