n8n-io/n8n · error · NodeOperationError

Invalid options

Error message

Invalid options

What it means

Catch-all branch of the Vertex model construction: LangChain's 'Unable to verify model params' validation failed for a reason other than the model name — typically invalid generation options in modelConfig. The original error is attached as the cause for diagnosis.

Solutions

  1. Inspect the attached underlying error to see which option failed validation
  2. Correct the invalid node options (temperature, topK, maxOutputTokens, thinkingBudget)
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at packages/@n8n/nodes-langchain/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.ts:260 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/d6874e23b7f1ef96. Report an issue: GitHub.

Appendix: source

Thrown at packages/@n8n/nodes-langchain/nodes/llms/LmChatGoogleVertex/LmChatGoogleVertex.node.ts:260

			}

			const model = new ChatVertexAI(modelConfig);

			return {
				response: model,
			};
		} catch (e) {
			// Catch model name validation error from LangChain (https://github.com/langchain-ai/langchainjs/blob/ef201d0ee85ee4049078270a0cfd7a1767e624f8/libs/langchain-google-common/src/utils/common.ts#L124)
			// to show more helpful error message
			if (e?.message?.startsWith('Unable to verify model params')) {
				throw new NodeOperationError(this.getNode(), e as JsonObject, {
					message: 'Unsupported model',
					description: "Only models starting with 'gemini' are supported.",
				});
			}

			// Assume all other exceptions while creating a new ChatVertexAI instance are parameter validation errors
			throw new NodeOperationError(this.getNode(), e as JsonObject, {
				message: 'Invalid options',
				description: e.message,
			});
		}
	}
}

View on GitHub (pinned to 5ac6606e81)