diff --git a/pkg/tools/web.go b/pkg/tools/web.go index 8cb58063c..36ed792ce 100644 --- a/pkg/tools/web.go +++ b/pkg/tools/web.go @@ -311,6 +311,15 @@ type WebSearchToolOptions struct { } func NewWebSearchTool(opts ...WebSearchToolOptions) *WebSearchTool { + // If no options are provided, default to DuckDuckGo with 5 results. + if len(opts) == 0 { + opts = []WebSearchToolOptions{ + { + Provider: "duckduckgo", + MaxResults: 5, + }, + } + } // Priority order: Brave > Ollama > DuckDuckGo priorityOrder := []string{"brave", "ollama", "duckduckgo"} optMap := make(map[string]WebSearchToolOptions)