n8n-io/n8n · error · LLMServiceError

LLM doesn't support withStructuredOutput

Error message

LLM doesn't support withStructuredOutput

What it means

Capability error in createParameterUpdaterChain, raised as LLMServiceError. It fires when the provided BaseChatModel does not implement withStructuredOutput (duck-typed function check), so the chain cannot extract the updated parameters object into a schema-constrained result. The model is incompatible with the chain, not malfunctioning.

Solutions

  1. Configure a chat model that implements withStructuredOutput (most OpenAI/Anthropic/Mistral chat models do).
  2. Check the connected model node's type — some wrappers or custom models lack structured output support.
  3. Switch the parameter-estimation flow to a model that supports tool/structured calling.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at packages/@n8n/ai-workflow-builder.ee/src/chains/parameter-updater.ts:76 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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

Appendix: source

Thrown at packages/@n8n/ai-workflow-builder.ee/src/chains/parameter-updater.ts:76

Current Parameters: {current_parameters}
</selected_node>

<requested_changes>
{changes}
</requested_changes>

Based on the requested changes and the node's property definitions, return the complete updated parameters object.`;

/**
 * Creates a parameter updater chain with dynamic prompt building
 */
export const createParameterUpdaterChain = (
	llm: BaseChatModel,
	options: ParameterUpdaterOptions,
	logger?: Logger,
) => {
	if (typeof llm.withStructuredOutput !== 'function') {
		throw new LLMServiceError("LLM doesn't support withStructuredOutput", {
			llmModel: llm._llmType(),
		});
	}

	// Build context for registry lookups
	const context = {
		nodeType: options.nodeType,
		nodeDefinition: options.nodeDefinition,
		requestedChanges: options.requestedChanges,
		hasResourceLocatorParams: hasResourceLocatorParameters(options.nodeDefinition),
	};

	// Get matching guides and examples from registry
	const guides = getMatchingGuides(context);
	const examples = getMatchingExamples(context);

	// Build dynamic system prompt using PromptBuilder
	const builder = createPromptBuilder()

View on GitHub (pinned to 5ac6606e81)