FlowiseAI/Flowise · error · Error

This agent only compatible with function calling models.

Error message

This agent only compatible with function calling models.

What it means

Thrown in the ChatAnthropic branch of Supervisor.createTeamSupervisor() when llm.bindTools is undefined. The supervisor forces tool-calling (a RouteTool) to pick the next worker, so the model must support function/tool calling. Anthropic models support this, so hitting the guard usually means the model instance is not actually a ChatAnthropic or is an old/wrapped version without bindTools.

Source

Thrown at packages/components/nodes/multiagents/Supervisor/Supervisor.ts:203

                    })
            } else if (llm instanceof ChatAnthropic) {
                // Force Anthropic to use tool : https://docs.anthropic.com/claude/docs/tool-use#forcing-tool-use
                userPrompt = `Given the conversation above, who should act next? Or should we FINISH? Select one of: ${memberOptions.join(
                    ', '
                )}. Use the ${routerToolName} tool in your response.`

                let prompt = ChatPromptTemplate.fromMessages([
                    ['system', systemPrompt],
                    new MessagesPlaceholder('messages'),
                    ['human', userPrompt]
                ])

                const messages = await processImageMessage(1, llm, prompt, nodeData, options)
                prompt = messages.prompt
                multiModalMessageContent = messages.multiModalMessageContent

                if ((llm as any).bindTools === undefined) {
                    throw new Error(`This agent only compatible with function calling models.`)
                }

                const modelWithTool = (llm as any).bindTools([tool])

                const outputParser = new ToolCallingAgentOutputParser()

                supervisor = prompt
                    .pipe(modelWithTool)
                    .pipe(outputParser)
                    .pipe((x) => {
                        if (Array.isArray(x) && x.length) {
                            const toolAgentAction = x[0] as any
                            return {
                                next: toolAgentAction.toolInput.next,
                                instructions: toolAgentAction.toolInput.instructions,
                                team_members: members.join(', ')
                            }
                        } else if (typeof x === 'object' && 'returnValues' in x) {

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Upgrade @langchain/anthropic (and langchain core) to a version that implements BaseChatModel.bindTools (recent 0.1.x / 0.2.x).
  2. Pick a model class that natively supports tool calling (ChatOpenAI, ChatAnthropic, ChatGoogleGenerativeAI, ChatMistralAI).
  3. If using a custom model wrapper, expose bindTools on its prototype delegating to the underlying model.
  4. Verify there is no duplicate/old langchain install with `npm ls @langchain/core`.

Example fix

// before
// pinned ancient @langchain/anthropic without bindTools
// after
npm i @langchain/anthropic@latest @langchain/core@latest
Defensive patterns

Strategy: type-guard

Validate before calling

import type { BaseChatModel } from '@langchain/core/language_models/chat_models'
function assertSupportsToolCalling(llm: BaseChatModel): void {
  if (typeof (llm as any).bindTools !== 'function') {
    throw new Error(`Model ${llm.constructor.name} does not support tool calling (bindTools missing). Pick a function-calling model.`)
  }
}
// call before invoking Supervisor.init / createTeamSupervisor

Type guard

import type { BaseChatModel } from '@langchain/core/language_models/chat_models'
function supportsToolCalling(llm: BaseChatModel): boolean {
  return typeof (llm as unknown as { bindTools?: unknown }).bindTools === 'function'
}

Try / catch

try {
  await supervisorNode.init(nodeData, _, options)
} catch (e) {
  if ((e as Error).message === 'This agent only compatible with function calling models.') {
    // switch the LLM to a ChatAnthropic version that implements bindTools, or another supported class
  }
  throw e
}

Prevention

When it happens

Trigger: Selecting an LLM that lands in the ChatAnthropic instanceof branch but whose instance (or prototype) lacks bindTools — e.g. an older @langchain/anthropic version, a custom subclass, or a mock in tests. Also if a non-Anthropic model is misregistered to be detected as Anthropic.

Common situations: Downgrading or pinning @langchain/anthropic to a pre-tool-calling version. Using a custom ChatModel wrapper. Version skew between flowise-components and langchain packages.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/6ceaf838789708a8. Report an issue: GitHub.