Skip to main content

supports_web_search

Function supports_web_search 

Source
pub fn supports_web_search(model: Option<&ModelSource>) -> bool
Expand description

Whether web_search works for model without the Exa opt-in: where the provider has native search, and on every Bedrock API, where AgentCore web search serves it. false for a model instance or router, whose provider is unknown; None is the harness default model.

use strands_harness::supports_web_search;

assert!(supports_web_search(Some(&"openai/gpt-5.6-sol".into())));
assert!(supports_web_search(Some(&"bedrock/global.anthropic.claude-opus-4-8".into())));
assert!(!supports_web_search(Some(&"ollama/llama3".into())));