agent: Expose web search tool to beta users (#29273)

This gives all beta users access to the web search tool

Release Notes:

- agent: Added `web_search` tool
This commit is contained in:
Bennet Bo Fenner 2025-04-23 17:30:20 +02:00 committed by GitHub
parent 09db31288a
commit 822b6f837d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 67 additions and 40 deletions

View file

@ -61,4 +61,11 @@ impl WebSearchRegistry {
self.active_provider = Some(provider);
}
}
pub fn unregister_provider(&mut self, id: WebSearchProviderId) {
self.providers.remove(&id);
if self.active_provider.as_ref().map(|provider| provider.id()) == Some(id) {
self.active_provider = None;
}
}
}