{"record":{"id":"e5b2f03d2ce8ebed","repo":"n8n-io/n8n","slug":"only-the-retrieve-and-retrieve-as-tool-operati","errorCode":null,"errorMessage":"Only the \"retrieve\" and \"retrieve-as-tool\" operation mode is supported to supply data","messagePattern":"Only the \"retrieve\" and \"retrieve-as-tool\" operation mode is supported to supply data","errorType":"exception","errorClass":"NodeOperationError","httpStatus":null,"severity":"error","filePath":"packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts","lineNumber":498,"sourceCode":"\t\t\ttry {\n\t\t\t\tconst mode = this.getNodeParameter('mode', 0) as NodeOperationMode;\n\n\t\t\t\t// Get the embeddings model connected to this node\n\t\t\t\tconst embeddings = (await this.getInputConnectionData(\n\t\t\t\t\tNodeConnectionTypes.AiEmbedding,\n\t\t\t\t\t0,\n\t\t\t\t)) as Embeddings;\n\n\t\t\t\t// Handle each supply data operation mode with dedicated modules\n\t\t\t\tif (mode === 'retrieve') {\n\t\t\t\t\treturn await handleRetrieveOperation(this, args, embeddings, itemIndex);\n\t\t\t\t}\n\n\t\t\t\tif (mode === 'retrieve-as-tool') {\n\t\t\t\t\treturn await handleRetrieveAsToolOperation(this, args, embeddings, itemIndex);\n\t\t\t\t}\n\n\t\t\t\tthrow new NodeOperationError(\n\t\t\t\t\tthis.getNode(),\n\t\t\t\t\t'Only the \"retrieve\" and \"retrieve-as-tool\" operation mode is supported to supply data',\n\t\t\t\t);\n\t\t\t} catch (error) {\n\t\t\t\tnormalizeVectorStoreError(this.getNode(), error, itemIndex);\n\t\t\t}\n\t\t}\n\t};\n","sourceCodeStart":480,"sourceCodeEnd":507,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts#L480-L507","documentation":"Mode-validation error raised in the vector store node's supplyData(). supplyData only serves retrieve and retrieve-as-tool modes (data-supplying operations); any other mode reaches this final throw after the handled branches. The mode is valid for execute() but not for supplying data to a downstream consumer.","triggerScenarios":"Thrown at packages/@n8n/ai-utilities/src/utils/vector-store/createVectorStoreNode/createVectorStoreNode.ts:498 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the operation mode to 'retrieve' or 'retrieve-as-tool' when the node is used as a data supplier for an AI chain.","Modes like insert, update, and load only work during normal execution, not supplyData.","Check the workflow connection context: supplyData runs when the node feeds an AI agent, chain, or tool."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","contentChangedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}