n8n-io/n8n · error · NodeOperationError

Please connect a model to the Fallback Model input or disabl

Error message

Please connect a model to the Fallback Model input or disable the fallback option

What it means

Configuration guard in invokeAgent (Microsoft Tools Agent). If the 'needsFallback' parameter is true but no chat model is connected to the second (Fallback Model) input, the agent cannot construct a fallback-aware executor and refuses to run. Note the primary model is already asserted just above via assert(model, 'Please connect a model to the Chat Model input').

Source

Thrown at packages/@n8n/nodes-langchain/nodes/vendors/Microsoft/langchain-utils.ts:48

	const conversationId = (invokeOptions.configurable as { thread_id?: string } | undefined)
		?.thread_id;
	if (conversationId) {
		const req = nodeContext.getRequestObject();
		if (req.body && typeof req.body === 'object') {
			(req.body as Record<string, unknown>).sessionId = conversationId;
		}
	}

	const needsFallback = nodeContext.getNodeParameter('needsFallback', false) as boolean;
	const memory = await getOptionalMemory(nodeContext);
	const model = await getChatModel(nodeContext, 0);

	assert(model, 'Please connect a model to the Chat Model input');

	const fallbackModel = needsFallback ? await getChatModel(nodeContext, 1) : null;

	if (needsFallback && !fallbackModel) {
		throw new NodeOperationError(
			nodeContext.getNode(),
			'Please connect a model to the Fallback Model input or disable the fallback option',
		);
	}

	const outputParser = await getOptionalOutputParser(nodeContext, 0);
	let tools = await getTools(nodeContext, outputParser);

	if (microsoftMcpToolkits?.length) {
		tools = tools.concat(microsoftMcpToolkits.flatMap((toolkit) => toolkit.tools));
	}

	const options = nodeContext.getNodeParameter('options', {}) as {
		systemMessage?: string;
		maxIterations?: number;
	};

	if (systemMessage) {

View on GitHub (pinned to 5ac6606e81)

Solutions

  1. Connect an AI Model node to the Fallback Model input, or
  2. If you don't need fallback, turn off the 'needsFallback' option in the node settings.
  3. Ensure the connected fallback node is enabled and on a reachable branch.

Example fix

// before
const needsFallback = true;
const fallbackModel = null; // nothing connected to input 1

// after — either disable fallback
const needsFallback = false;
// or wire a model: connect an OpenAI/Anthropic Chat Model node to input 1
Defensive patterns

Strategy: validation

Validate before calling

const needsFallback = Boolean(nodeContext.getNodeParameter('needsFallback', false));
if (needsFallback) {
  const fb = await getChatModel(nodeContext, 1).catch(() => null);
  if (!fb) throw new Error('needsFallback is on but no Fallback Model is connected to input 1');
}

Prevention

When it happens

Trigger: needsFallback is enabled in the node options and the Fallback Model input (input index 1) has no incoming connection — e.g. user toggled the option but didn't wire a second AI Model node, or disconnected it during editing.

Common situations: Building a fault-tolerant agent, enabling fallback, then forgetting to attach the fallback model node; copying a node that referenced a deleted model; the fallback node is on a disabled branch.

Related errors


AI-assisted analysis of n8n-io/n8n@5ac6606e81 (2026-08-12). Data as JSON: /api/errors/7a6d86ea873b8320. Report an issue: GitHub.