fix(config): change web_search.enabled default to false for explicit opt-in (#986)
Network access (web search via DuckDuckGo) should require explicit user consent rather than being enabled by default. This aligns with the least-surprise principle and the project's secure-by-default policy: users must opt in to external network requests. Changes: - WebSearchConfig::default() now sets enabled: false - Serde default for enabled field changed from default_true to default (bool defaults to false) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
parent
75772cc3a7
commit
1a3be5e54f
1 changed files with 2 additions and 2 deletions
|
|
@ -909,7 +909,7 @@ fn default_http_timeout_secs() -> u64 {
|
|||
#[derive(Debug, Clone, Serialize, Deserialize, JsonSchema)]
|
||||
pub struct WebSearchConfig {
|
||||
/// Enable `web_search_tool` for web searches
|
||||
#[serde(default = "default_true")]
|
||||
#[serde(default)]
|
||||
pub enabled: bool,
|
||||
/// Search provider: "duckduckgo" (free, no API key) or "brave" (requires API key)
|
||||
#[serde(default = "default_web_search_provider")]
|
||||
|
|
@ -940,7 +940,7 @@ fn default_web_search_timeout_secs() -> u64 {
|
|||
impl Default for WebSearchConfig {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
enabled: true,
|
||||
enabled: false,
|
||||
provider: default_web_search_provider(),
|
||||
brave_api_key: None,
|
||||
max_results: default_web_search_max_results(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue