pub struct WebSearchConfig {
pub provider: WebSearchProvider,
pub max_results: usize,
pub timeout_secs: u64,
pub cooldown_ms: u64,
pub cache_ttl_secs: u64,
pub session_max_requests: u32,
}Expand description
Web Search tool configuration.
VT Code only uses the keyless DuckDuckGo HTML endpoint. The defaults below are tuned to be polite to that endpoint and to keep the agent responsive under low-quota conditions:
cooldown_ms: minimum gap between consecutive live requests on the same tool instance (avoids bursty hammering that triggers the DDG anti-bot challenge).cache_ttl_secs: how long successful results are served from memory before a fresh request is made.session_max_requests: hard cap on outbound requests per tool instance (defends against runaway loops).
Fields§
§provider: WebSearchProviderProvider selection. Supported backends are the keyless DuckDuckGo
HTML endpoint (default) and the You.com Search API (opt-in, requires
YDC_API_KEY).
max_results: usizeDefault cap on the number of results returned per call. Hard-capped at 20 by the runtime to keep responses inline-friendly.
timeout_secs: u64Per-request timeout in seconds. Capped at 60s by the runtime.
cooldown_ms: u64Minimum gap between consecutive live requests, in milliseconds. Defaults to 3000ms (3s).
cache_ttl_secs: u64How long successful search results are cached before a fresh request is made, in seconds. Defaults to 300s (5 min).
session_max_requests: u32Hard cap on outbound network requests per tool instance. Defaults to 12 to stay well below DDG’s soft session quotas.
Trait Implementations§
Source§impl Clone for WebSearchConfig
impl Clone for WebSearchConfig
Source§impl Debug for WebSearchConfig
impl Debug for WebSearchConfig
Source§impl Default for WebSearchConfig
impl Default for WebSearchConfig
Source§impl<'de> Deserialize<'de> for WebSearchConfig
impl<'de> Deserialize<'de> for WebSearchConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for WebSearchConfig
Source§impl JsonSchema for WebSearchConfig
impl JsonSchema for WebSearchConfig
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for WebSearchConfig
impl PartialEq for WebSearchConfig
Source§impl Serialize for WebSearchConfig
impl Serialize for WebSearchConfig
impl StructuralPartialEq for WebSearchConfig
Auto Trait Implementations§
impl Freeze for WebSearchConfig
impl RefUnwindSafe for WebSearchConfig
impl Send for WebSearchConfig
impl Sync for WebSearchConfig
impl Unpin for WebSearchConfig
impl UnsafeUnpin for WebSearchConfig
impl UnwindSafe for WebSearchConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.