{"record":{"id":"c9f0125f3a21e6a0","repo":"n8n-io/n8n","slug":"this-fallback-model-is-not-supported-in-version","errorCode":null,"errorMessage":"This fallback model is not supported in ${version} version of the Agent node. Please upgrade the Agent node to the latest version.","messagePattern":"This fallback 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":287,"sourceCode":"\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}\n\n\t\t// Check if streaming is enabled\n\t\tenableStreaming = this.getNodeParameter('options.enableStreaming', 0, true) as boolean;\n\n\t\tfor (let i = 0; i < items.length; i += batchSize) {\n\t\t\tconst batch = items.slice(i, i + batchSize);\n\t\t\tconst batchPromises = batch.map(async (_item, batchItemIndex) => {","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/nodes-langchain/nodes/agents/Agent/agents/ToolsAgent/V2/execute.ts#L269-L305","documentation":"Sibling of error 649: the same Responses-API incompatibility, but for the fallback model (input index 1) when needsFallback is enabled.","triggerScenarios":"Tools Agent V2 with needsFallback=true and the model connected to the Fallback Model input uses the Responses API.","commonSituations":"User added a fallback model that happens to be a Responses-API model; same model used for both primary and fallback on V2.","solutions":["Upgrade the Agent node to V3 so the fallback model also uses the working call path.","Swap the fallback model for a non-Responses-API variant.","If fallback is not strictly needed, disable the needsFallback option."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const fallbackModel = needsFallback ? await getChatModel(this, 1) : null;\nif (fallbackModel && checkIsResponsesApi(fallbackModel)) {\n  throw new NodeOperationError(this.getNode(), 'Fallback model uses Responses API — upgrade Agent to V3 or pick a different fallback.');\n}","typeGuard":"function isResponsesApiModel(model: unknown): boolean {\n  return checkIsResponsesApi(model as BaseChatModel);\n}","tryCatchPattern":null,"preventionTips":["Use a non-Responses-API model as the fallback on V2.","Upgrade to V3 to use Responses-API fallbacks.","Test the fallback path explicitly during development."],"tags":["langchain","agent","tools-agent","openai","responses-api","version","fallback","v2"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}