{"record":{"id":"b0a7730ee4a82395","repo":"FlowiseAI/Flowise","slug":"agent-node-only-compatible-with-function-calling-m","errorCode":null,"errorMessage":"Agent Node only compatible with function calling models.","messagePattern":"Agent Node only compatible with function calling models\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/components/nodes/sequentialagents/Agent/Agent.ts","lineNumber":696,"sourceCode":"                new ToolCallingAgentOutputParser()\n            ]).withConfig({\n                metadata: { sequentialNodeName: agentName }\n            })\n        }\n\n        const executor = AgentExecutor.fromAgentAndTools({\n            agent,\n            tools,\n            sessionId: flowObj?.sessionId,\n            chatId: flowObj?.chatId,\n            input: flowObj?.input,\n            verbose: process.env.DEBUG === 'true' ? true : false,\n            maxIterations: maxIterations ? parseFloat(maxIterations) : undefined\n        })\n        return executor\n    } else if (tools.length && interrupt) {\n        if (llm.bindTools === undefined) {\n            throw new Error(`Agent Node only compatible with function calling models.`)\n        }\n        // @ts-ignore\n        llm = llm.bindTools(tools)\n\n        const promptArrays = [new MessagesPlaceholder('messages')] as BaseMessagePromptTemplateLike[]\n        if (systemPrompt) promptArrays.unshift(['system', systemPrompt])\n        if (humanPrompt) promptArrays.push(['human', humanPrompt])\n\n        let prompt = ChatPromptTemplate.fromMessages(promptArrays)\n        prompt = await checkMessageHistory(nodeData, options, prompt, promptArrays, systemPrompt)\n\n        if (multiModalMessageContent.length) {\n            const msg = HumanMessagePromptTemplate.fromTemplate([...multiModalMessageContent])\n            prompt.promptMessages.splice(1, 0, msg)\n        }\n\n        let agent\n","sourceCodeStart":678,"sourceCodeEnd":714,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/sequentialagents/Agent/Agent.ts#L678-L714","documentation":"Same `bindTools === undefined` guard as error 283 but on the interrupt path (`else if (tools.length && interrupt)`). When the Agent is configured for human-in-the-loop tool approval, the LLM still must support tool calling because tools are bound before the interrupt-capable runnable is built.","triggerScenarios":"Calling Agent.init with `tools.length > 0` AND `interrupt === true`, where the resolved LLM lacks `bindTools`.","commonSituations":"Enabled the Interrupt toggle on the Agent for human approval of tool calls, but paired it with a non-function-calling model; inherited a non-tool-calling LLM from the Start node and forgot to override it on the Agent.","solutions":["Set the Agent's `model` to a function-calling-capable chat model (gpt-4o, Claude 3+, Gemini 1.5+).","Turn off the Interrupt toggle if you do not need human-in-the-loop approval and the model cannot bind tools.","Upgrade @langchain/core and the provider package so `bindTools` exists.","Verify the Start node's LLM is tool-capable when you rely on inheritance."],"exampleFix":"// before\nnodeData.inputs = { tools: [searchTool], interrupt: true, model: basicChatModel } // throws [284]\n\n// after\nnodeData.inputs.model = new ChatOpenAI({ modelName: 'gpt-4o' })","handlingStrategy":"type-guard","validationCode":"function assertInterruptCompatible(llm, interrupt, tools) {\n  if (interrupt && tools.length > 0 && typeof llm?.bindTools !== 'function') {\n    throw new Error('Interrupt mode requires a function-calling-capable model when tools are attached.')\n  }\n}\n\nassertInterruptCompatible(llm, interrupt, tools)","typeGuard":"function supportsFunctionCalling(llm): llm is BaseChatModel & { bindTools: (tools: unknown[]) => unknown } {\n  return typeof (llm as any)?.bindTools === 'function'\n}","tryCatchPattern":null,"preventionTips":["Pair the Interrupt toggle only with function-calling models.","Set the Agent's `model` explicitly rather than inheriting from Start.","Verify bindTools exists after upgrading LangChain packages."],"tags":["llm","function-calling","tools","interrupt","model-compat"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}