{"record":{"id":"a4baa35740aec683","repo":"n8n-io/n8n","slug":"seed-endpoint-endpoint-matches-no-configured","errorCode":null,"errorMessage":"seed.endpoint \"${endpoint}\" matches no configured LangSmith tenant (home: ${homeHost}; secondary: ${usHost}). Set LANGSMITH_ENDPOINT_US + LANGSMITH_API_KEY_US, or omit endpoint to use the home tenant.","messagePattern":"seed\\.endpoint \"(.+?)\" matches no configured LangSmith tenant \\(home: (.+?); secondary: (.+?)\\)\\. Set LANGSMITH_ENDPOINT_US \\+ LANGSMITH_API_KEY_US, or omit endpoint to use the home tenant\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/@n8n/instance-ai/evaluations/harness/langsmith-seed.ts","lineNumber":108,"sourceCode":"\t\tprocess.env.LANGSMITH_ENDPOINT ?? process.env.LANGCHAIN_ENDPOINT ?? US_DEFAULT_ENDPOINT,\n\t);\n\tconst homeKey = process.env.LANGSMITH_API_KEY ?? process.env.LANGCHAIN_API_KEY ?? '';\n\tif (!endpoint) return { apiUrl: homeHost, apiKey: homeKey };\n\n\tconst host = bareHost(endpoint);\n\tif (host === homeHost) return { apiUrl: host, apiKey: homeKey };\n\n\tconst usHost = bareHost(process.env.LANGSMITH_ENDPOINT_US ?? US_DEFAULT_ENDPOINT);\n\tif (host === usHost) {\n\t\tconst usKey = process.env.LANGSMITH_API_KEY_US ?? '';\n\t\tif (!usKey) {\n\t\t\tthrow new Error(\n\t\t\t\t`seed.endpoint \"${endpoint}\" is the secondary (US) tenant but LANGSMITH_API_KEY_US is not set — refusing to read it with the home key. Set LANGSMITH_API_KEY_US.`,\n\t\t\t);\n\t\t}\n\t\treturn { apiUrl: usHost, apiKey: usKey };\n\t}\n\tthrow new Error(\n\t\t`seed.endpoint \"${endpoint}\" matches no configured LangSmith tenant (home: ${homeHost}; secondary: ${usHost}). Set LANGSMITH_ENDPOINT_US + LANGSMITH_API_KEY_US, or omit endpoint to use the home tenant.`,\n\t);\n}\n\n/** Workspaces a key can access on a host. Returns [] on any failure so the\n *  caller falls back to the key's default workspace. */\nasync function listAccessibleWorkspaces(\n\tapiUrl: string,\n\tapiKey: string,\n): Promise<Array<{ id: string; name: string }>> {\n\tif (!apiKey) return [];\n\ttry {\n\t\tconst res = await fetch(`${apiUrl}/api/v1/workspaces`, { headers: { 'x-api-key': apiKey } });\n\t\tif (!res.ok) return [];\n\t\tconst data: unknown = await res.json();\n\t\tif (!Array.isArray(data)) return [];\n\t\treturn data.flatMap((entry) => {\n\t\t\tif (typeof entry !== 'object' || entry === null) return [];","sourceCodeStart":90,"sourceCodeEnd":126,"githubUrl":"https://github.com/n8n-io/n8n/blob/5ac6606e81f67bb9534255570cd4e86fd8101eee/packages/@n8n/instance-ai/evaluations/harness/langsmith-seed.ts#L90-L126","documentation":"Thrown by configFor() when a seed's endpoint host matches neither the home tenant (LANGSMITH_ENDPOINT / LANGCHAIN_ENDPOINT) nor the secondary US tenant (LANGSMITH_ENDPOINT_US). The error lists both configured hosts so the developer can see the mismatch. The harness refuses to guess which tenant a key belongs to.","triggerScenarios":"seed.endpoint (or LANGSMITH_ENDPOINT) is set to a host that is neither the home nor the US default; a typo in the host; LANGSMITH_ENDPOINT_US overridden to a different host while the seed points at the old US default.","commonSituations":"Typo in an endpoint URL; a custom LangSmith deployment not configured as either tenant; env drift between author and runner of a seed.","solutions":["Set seed.endpoint to the home host, the US host, or omit it to default to home.","If you need a third tenant, extend configFor() to recognize it (home/US are the two supported).","Compare the offending endpoint against LANGSMITH_ENDPOINT and LANGSMITH_ENDPOINT_US in your env."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate the endpoint against the two known hosts before resolving config.\nfunction assertKnownTenant(endpoint: string | undefined, homeHost: string, usHost: string): void {\n  if (!endpoint) return;\n  const host = bareHost(endpoint);\n  if (host !== homeHost && host !== usHost) {\n    throw new Error(`Endpoint ${endpoint} matches no configured LangSmith tenant (home: ${homeHost}, US: ${usHost}).`);\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Restrict seed.endpoint to the home or US host, or omit it.","Validate LANGSMITH_ENDPOINT / LANGSMITH_ENDPOINT_US at eval startup with a clear error.","Document the two-tenant model so authors do not introduce a third host unhandled."],"tags":["langsmith","env","config","multi-tenant"],"backgroundTag":null,"analyzedSha":"5ac6606e81f67bb9534255570cd4e86fd8101eee","analyzedAt":"2026-08-12T05:26:35.080Z","schemaVersion":2},"datasetVersion":"2026-08-13T19:17:28.613Z"}