diff --git a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs index 0b938c0e9..228e3e40b 100644 --- a/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs +++ b/api/libs/agents/src/tools/categories/file_tools/create_metrics.rs @@ -101,8 +101,8 @@ impl ToolExecutor for CreateMetricFilesTool { let data_source_syntax = match self.agent.get_state_value("data_source_syntax").await { Some(Value::String(syntax_str)) => syntax_str, - Some(_) => bail!("Data source syntax is not a string"), - None => bail!("Data source syntax not found in agent state"), + Some(_) => "generic".to_string(), + None => "generic".to_string(), }; // Collect results from processing each file concurrently diff --git a/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs b/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs index e636b3845..4213dc368 100644 --- a/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs +++ b/api/libs/agents/src/tools/categories/file_tools/modify_metrics.rs @@ -271,8 +271,8 @@ impl ToolExecutor for ModifyMetricFilesTool { let data_source_dialect = match self.agent.get_state_value("data_source_syntax").await { Some(Value::String(dialect_str)) => dialect_str, - Some(_) => bail!("Data source dialect is not a string"), - None => bail!("Data source dialect not found in agent state"), + Some(_) => "generic".to_string(), + None => "generic".to_string(), }; // Map to store validated dataset IDs for each successfully updated metric