diff --git a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx index 76d7ffa7daf8d..b3ae64bc99860 100644 --- a/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx +++ b/x-pack/packages/kbn-elastic-assistant/impl/assistant/api/index.tsx @@ -80,8 +80,10 @@ export const fetchConnectorExecuteAction = async ({ replacements, isEnabledKnowledgeBase, isEnabledRAGAlerts, - langSmithProject: traceOptions?.langSmithProject, - langSmithApiKey: traceOptions?.langSmithApiKey, + langSmithProject: + traceOptions?.langSmithProject === '' ? undefined : traceOptions?.langSmithProject, + langSmithApiKey: + traceOptions?.langSmithApiKey === '' ? undefined : traceOptions?.langSmithApiKey, ...optionalRequestParams, }; diff --git a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts index b2b09cb1666d9..17757b8778771 100644 --- a/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts +++ b/x-pack/plugins/elastic_assistant/server/routes/evaluate/utils.ts @@ -124,7 +124,7 @@ export const getLangSmithTracer = ({ return []; } const lcTracer = new LangChainTracer({ - projectName: projectName ?? 'default', // Shows as the 'test' run's 'name' in langsmith ui + projectName, // Shows as the 'test' run's 'name' in langsmith ui exampleId, client: new Client({ apiKey }), });