{"record":{"id":"cacfe6a0a7fd1675","repo":"n8n-io/n8n","slug":"llm-does-not-support-tools","errorCode":null,"errorMessage":"LLM does not support tools","messagePattern":"LLM does not support tools","errorType":"exception","errorClass":"LLMServiceError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-workflow-builder.ee/src/subgraphs/discovery.subgraph.ts","lineNumber":332,"sourceCode":"\n\t\t// Create agent with tools bound (including submit tool)\n\t\tconst systemPrompt = ChatPromptTemplate.fromMessages([\n\t\t\t[\n\t\t\t\t'system',\n\t\t\t\t[\n\t\t\t\t\t{\n\t\t\t\t\t\ttype: 'text',\n\t\t\t\t\t\ttext: discoveryPrompt,\n\t\t\t\t\t\tcache_control: { type: 'ephemeral' },\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t],\n\t\t\t['human', '{prompt}'],\n\t\t\t['placeholder', '{messages}'],\n\t\t]);\n\n\t\tif (typeof config.llm.bindTools !== 'function') {\n\t\t\tthrow new LLMServiceError('LLM does not support tools', {\n\t\t\t\tllmModel: config.llm._llmType(),\n\t\t\t});\n\t\t}\n\n\t\t// Bind all tools including the output tool\n\t\tconst allTools = [...tools, submitTool];\n\t\tthis.agent = systemPrompt.pipe(config.llm.bindTools(allTools));\n\t\tthis.plannerAgent = createPlannerAgent({\n\t\t\tllm: config.plannerLLM,\n\t\t\ttools: [\n\t\t\t\tcreateGetDocumentationTool().tool,\n\t\t\t\tcreateWebFetchTool(plannerSecurityFactory, ssrf).tool,\n\t\t\t],\n\t\t});\n\n\t\t// Build the subgraph\n\t\tconst subgraph = new StateGraph(DiscoverySubgraphState)\n\t\t\t.addNode('discovery_agent', this.callAgent.bind(this))","sourceCodeStart":314,"sourceCodeEnd":350,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-workflow-builder.ee/src/subgraphs/discovery.subgraph.ts#L314-L350","documentation":"Error \"LLM does not support tools\" thrown in n8n-io/n8n.","triggerScenarios":"Thrown at packages/@n8n/ai-workflow-builder.ee/src/subgraphs/discovery.subgraph.ts:332 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}