fix: fixed tool filtering logic for skills and user functions in agents

This commit is contained in:
2026-06-04 11:03:44 -06:00
parent b0a3b0a9a5
commit 46d4b78ccc
2 changed files with 24 additions and 2 deletions
+5 -1
View File
@@ -1229,7 +1229,11 @@ impl RequestContext {
.collect();
if let Some(ref tool_names) = role_filter {
agent_functions.retain(|v| tool_names.contains(&v.name));
agent_functions.retain(|v| {
tool_names.contains(&v.name)
|| v.name.starts_with(SKILL_FUNCTION_PREFIX)
|| v.name.starts_with(USER_FUNCTION_PREFIX)
});
}
let tool_names: HashSet<String> = agent_functions