diff --git a/api/libs/agents/src/agent.rs b/api/libs/agents/src/agent.rs index 96b8fb7de..f69ae38c0 100644 --- a/api/libs/agents/src/agent.rs +++ b/api/libs/agents/src/agent.rs @@ -416,7 +416,7 @@ impl Agent { generation_name: "agent".to_string(), user_id: thread.user_id.to_string(), session_id: thread.id.to_string(), - trace_id: thread.id.to_string(), + trace_id: None, }), ..Default::default() }; diff --git a/api/libs/agents/src/tools/categories/file_tools/search_data_catalog.rs b/api/libs/agents/src/tools/categories/file_tools/search_data_catalog.rs index 93c590aad..04a8ed7be 100644 --- a/api/libs/agents/src/tools/categories/file_tools/search_data_catalog.rs +++ b/api/libs/agents/src/tools/categories/file_tools/search_data_catalog.rs @@ -141,7 +141,7 @@ impl SearchDataCatalogTool { generation_name: "search_data_catalog".to_string(), user_id: user_id.to_string(), session_id: session_id.to_string(), - trace_id: session_id.to_string(), + trace_id: None, }), reasoning_effort: Some("low".to_string()), max_completion_tokens: Some(8092), diff --git a/api/libs/handlers/src/chats/post_chat_handler.rs b/api/libs/handlers/src/chats/post_chat_handler.rs index 03748acad..abfd32280 100644 --- a/api/libs/handlers/src/chats/post_chat_handler.rs +++ b/api/libs/handlers/src/chats/post_chat_handler.rs @@ -1572,7 +1572,7 @@ pub async fn generate_conversation_title( generation_name: "conversation_title".to_string(), user_id: user_id.to_string(), session_id: session_id.to_string(), - trace_id: session_id.to_string(), + trace_id: None, }), ..Default::default() }; diff --git a/api/libs/litellm/src/types.rs b/api/libs/litellm/src/types.rs index 7fc30f611..f6e18108e 100644 --- a/api/libs/litellm/src/types.rs +++ b/api/libs/litellm/src/types.rs @@ -59,7 +59,7 @@ pub struct Metadata { pub generation_name: String, pub user_id: String, pub session_id: String, - pub trace_id: String, + pub trace_id: Option, } impl Default for ChatCompletionRequest { @@ -149,7 +149,7 @@ pub enum AgentMessage { #[serde(skip)] progress: MessageProgress, }, - Done + Done, } // Helper methods for Message