{"record":{"id":"684b1893fd5fadcd","repo":"n8n-io/n8n","slug":"source-langtracer-requires-suite-slug-684b18","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/data/source.ts","lineNumber":15,"sourceCode":"// Test-case source selector — `disk` (default) or `langtracer`, both returning the\n// same WorkflowTestCaseWithFile[] so the rest of the pipeline is source-agnostic.\n\nimport { loadAgentEvalTestCasesWithFiles } from './agents';\nimport { loadWorkflowTestCasesWithFiles, type WorkflowTestCaseWithFile } from './workflows';\nimport type { CliArgs } from '../cli/args';\nimport type { EvalLogger } from '../harness/logger';\nimport { loadTestCasesFromLangTracer } from '../langtracer/provider';\n\nexport async function loadTestCases(\n\targs: CliArgs,\n\tlogger: EvalLogger,\n): Promise<WorkflowTestCaseWithFile[]> {\n\tif (args.source === 'langtracer') {\n\t\tif (!args.suite) throw new Error('--source langtracer requires --suite <slug>');\n\t\treturn await loadTestCasesFromLangTracer({\n\t\t\tsuite: args.suite,\n\t\t\tfilter: args.filter,\n\t\t\texclude: args.exclude,\n\t\t\ttier: args.tier,\n\t\t\tlogger,\n\t\t});\n\t}\n\n\tconst cases = [\n\t\t...loadWorkflowTestCasesWithFiles(args.filter, args.exclude),\n\t\t...loadAgentEvalTestCasesWithFiles(args.filter, args.exclude),\n\t];\n\tconst { tier } = args;\n\tif (!tier) return cases;\n\n\tconst matched = cases.filter(({ testCase }) => testCase.datasets.includes(tier));\n\tif (matched.length === 0) {","sourceCodeStart":1,"sourceCodeEnd":33,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/data/source.ts#L1-L33","documentation":"Thrown by `loadTestCases()` in data/source.ts when `args.source === 'langtracer'` but `args.suite` is unset. The LangTracer provider needs a suite slug to know which suite of recorded cases to pull; without it the request is ambiguous and the provider would return either everything or nothing. The disk source (default) does not need a suite, which is why the check is gated on the source.","triggerScenarios":"Run the workflow/agent eval CLI with `--source langtracer` but forget `--suite <slug>`. Typo the flag as `--suites` or `--suite-name`. Set the suite via an env var that the CLI doesn't actually read (the CLI only reads `--suite`).","commonSituations":"Switching from local disk cases to a LangTracer suite for the first time. A wrapper script that conditionally passes `--source langtracer` but forgets to also pass `--suite`.","solutions":["Add `--suite <suite-slug>` alongside `--source langtracer`. The slug is the LangTracer suite identifier your team configured.","If you didn't mean to use LangTracer, drop `--source langtracer` (the default `disk` source loads local JSON cases).","Confirm the suite slug exists upstream in LangTracer before re-running; an unknown slug will fail later in the provider, not here."],"exampleFix":"// before\n$ node eval.ts --source langtracer\n// after\n$ node eval.ts --source langtracer --suite my-team-suite","handlingStrategy":"validation","validationCode":"function validateArgs(args: CliArgs): void {\n  if (args.source === 'langtracer' && !args.suite) {\n    throw new Error('--source langtracer requires --suite <slug>');\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat `--source langtracer` and `--suite <slug>` as a paired requirement in wrapper scripts — assert both or neither.","Document the dependency clearly in the CLI's `--help` output."],"tags":["cli","argument-parsing","langtracer","configuration","developer-error"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}