{"record":{"id":"700d95162ec582b9","repo":"n8n-io/n8n","slug":"source-langtracer-requires-suite-slug","errorCode":null,"errorMessage":"--source langtracer requires --suite <slug>","messagePattern":"--source langtracer requires --suite <slug>","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/cli/args.ts","lineNumber":212,"sourceCode":"\t\tthrow new Error(\n\t\t\t'--build-via-mcp requires LangSmith experiment tracking — set LANGSMITH_API_KEY. The no-LangSmith direct loop does not support MCP builds.',\n\t\t);\n\t}\n\t// Build knobs without --build-via-mcp would parse fine and then be silently\n\t// ignored — the run would look like it honored them. Fail loudly instead.\n\tif (!validated.buildViaMcp && raw.buildOnlyFlags.length > 0) {\n\t\tthrow new Error(\n\t\t\t`${[...new Set(raw.buildOnlyFlags)].join(', ')} only take${raw.buildOnlyFlags.length === 1 ? 's' : ''} effect with --build-via-mcp — pass it, or drop the flag(s).`,\n\t\t);\n\t}\n\tif (validated.deletePrebuiltWorkflows && !validated.prebuiltWorkflows) {\n\t\tthrow new Error('--delete-prebuilt-workflows requires --prebuilt-workflows');\n\t}\n\tif (validated.deletePrebuiltWorkflows && validated.keepWorkflows) {\n\t\tthrow new Error('--delete-prebuilt-workflows cannot be used with --keep-workflows');\n\t}\n\tif (validated.source === 'langtracer' && !validated.suite) {\n\t\tthrow new Error('--source langtracer requires --suite <slug>');\n\t}\n\n\t// In langtracer mode, default the dataset + baseline to a suite-scoped, eval-tagged\n\t// name so runs don't pollute the shared cohort and re-runs upsert one stable dataset.\n\tlet dataset = validated.dataset;\n\tlet datasetAutoForked = false;\n\tlet baselinePrefix = validated.baselinePrefix;\n\tif (validated.source === 'langtracer' && validated.suite) {\n\t\tconst suiteSlug = validated.suite\n\t\t\t.toLowerCase()\n\t\t\t.replace(/[^a-z0-9]+/g, '-')\n\t\t\t.replace(/^-+|-+$/g, '');\n\t\tif (!raw.datasetProvided) {\n\t\t\tdataset = `instance-ai-langtracer-${suiteSlug}`;\n\t\t\tdatasetAutoForked = true;\n\t\t}\n\t\tif (!raw.baselineProvided) baselinePrefix = `instance-ai-langtracer-${suiteSlug}-baseline-`;\n\t}","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/cli/args.ts#L194-L230","documentation":"Thrown by parseCliArgs() when --source langtracer is set but no --suite <slug> is provided. The langtracer source pulls a test-case suite over MCP (requiring LANGTRACER_URL + LANGTRACER_API_KEY), and a suite slug is mandatory to identify which suite to export. Without it the provider cannot resolve any cases. The same check exists in build-mcp-manifest.ts.","triggerScenarios":"Invoking the eval CLI with `--source langtracer` but omitting `--suite <slug>`. The check fires at args.ts:211. The suite value must pass the Zod min(1) constraint.","commonSituations":"A developer switches from the default disk source to langtracer and forgets the suite argument, or the suite slug was in a different positional form. Also occurs when LANGTRACER_URL/LANGTRACER_API_KEY env vars are set but the specific suite identifier is missing.","solutions":["Add --suite <suite-slug-or-id> to the command.","If you did not intend langtracer mode, remove --source langtracer (disk is the default).","Verify the suite slug exists in your langtracer instance before passing it."],"exampleFix":"// before\npnpm eval:instance-ai --source langtracer --base-url http://localhost:5678\n// after\npnpm eval:instance-ai --source langtracer --suite my-suite-slug --base-url http://localhost:5678","handlingStrategy":"validation","validationCode":"function validateLangtracerSuite(args: string[]): void {\n  const idx = args.indexOf('--source');\n  if (idx !== -1 && args[idx + 1] === 'langtracer' && !args.includes('--suite')) {\n    throw new Error('--source langtracer requires --suite <slug>');\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["When switching to langtracer mode, add --suite in the same edit.","Keep a template per source mode (disk vs langtracer) so the required companion flags are bundled.","Validate suite existence in langtracer before the eval run."],"tags":["cli","argument-validation","langtracer","instance-ai"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}