fix(core): Inline AI_NODE_SDK_VERSION to save memory by not loading @n8n/ai-utilities on boot (#30113)

This commit is contained in:
Jaakko Husso 2026-05-08 17:33:31 +03:00 committed by GitHub
parent f87094cf6e
commit f709e53824
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,5 @@
// Controls which SDK version is supported by the current n8n
// Check README.md for explanation
// NOTE: also inlined in packages/cli/src/modules/community-packages/community-packages.config.ts
// to avoid loading the @n8n/ai-utilities barrel at boot. Keep both values in sync.
export const AI_NODE_SDK_VERSION: number = 1;

View File

@ -1,6 +1,10 @@
import { AI_NODE_SDK_VERSION } from '@n8n/ai-utilities';
import { Config, Env } from '@n8n/config';
// Keep in sync with AI_NODE_SDK_VERSION in
// packages/@n8n/ai-utilities/src/ai-node-sdk-version.ts.
// Inlined to avoid loading the @n8n/ai-utilities barrel at boot.
const AI_NODE_SDK_VERSION = 1;
@Config
export class CommunityPackagesConfig {
/** Whether to enable community packages */