From fb5392cdd49cb6c64f44c72befdfa5dbf73197c7 Mon Sep 17 00:00:00 2001 From: oleg Date: Wed, 14 Jan 2026 12:29:55 +0100 Subject: [PATCH] fix(ai-builder): Use LangSmith SDK defaults for batch settings (no-changelog) (#24305) --- .../evaluations/support/environment.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/packages/@n8n/ai-workflow-builder.ee/evaluations/support/environment.ts b/packages/@n8n/ai-workflow-builder.ee/evaluations/support/environment.ts index 3cd3c54c754..718b9d7cfd8 100644 --- a/packages/@n8n/ai-workflow-builder.ee/evaluations/support/environment.ts +++ b/packages/@n8n/ai-workflow-builder.ee/evaluations/support/environment.ts @@ -15,11 +15,8 @@ import { type TraceFilters, } from '../langsmith/trace-filters.js'; -/** Maximum batch size in bytes for trace uploads (2MB - reduced to avoid 403 errors) */ -const TRACE_BATCH_SIZE_LIMIT = 2_000_000; - -/** Number of concurrent trace batch uploads */ -const TRACE_BATCH_CONCURRENCY = 1; +/** Maximum memory for trace queue (3GB) */ +const MAX_INGEST_MEMORY_BYTES = 3 * 1024 * 1024 * 1024; export interface TestEnvironment { parsedNodeTypes: INodeTypeDescription[]; @@ -91,10 +88,8 @@ export function createLangsmithClient(logger?: EvalLogger): LangsmithClientResul // Filter large fields from traces to avoid 403 payload errors hideInputs: traceFilters.filterInputs, hideOutputs: traceFilters.filterOutputs, - // Reduce batch size and concurrency for high-volume scenarios - batchSizeBytesLimit: TRACE_BATCH_SIZE_LIMIT, - batchSizeLimit: 10, // Limit runs per batch (default 100) to avoid 403 multipart errors - traceBatchConcurrency: TRACE_BATCH_CONCURRENCY, + // Increase queue memory limit for high-concurrency evals + maxIngestMemoryBytes: MAX_INGEST_MEMORY_BYTES, }); return { client, traceFilters };