Skip to content

Commit 11818a6

Browse files
jcorbinyiwang
authored andcommitted
Clarify include_tool_for_provider logic
1 parent 5061ce8 commit 11818a6

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

crates/core/src/agent/mod.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,12 @@ impl Agent {
358358
}
359359

360360
fn include_tool_for_provider(&self, tool_name: &str) -> bool {
361-
!(self.use_native_web_search() && tool_name == "web_search")
361+
// Elide the web search tool if the provider support native search
362+
if tool_name == "web_search" {
363+
return !self.use_native_web_search();
364+
}
365+
366+
true
362367
}
363368

364369
pub fn tool_names(&self) -> Vec<&str> {

0 commit comments

Comments
 (0)