sipeed/picoclaw · error
no SearXNG URL provided
Error message
no SearXNG URL provided
What it means
SearXNGSearchProvider.Search requires a baseURL: it builds "<baseURL>/search?q=...&format=json&categories=general" against your SearXNG instance. Unlike the other providers it needs no API key, but a missing URL means there is no instance to query, so it fails before creating the HTTP request.
Source
Thrown at pkg/tools/integration/web.go:1207
}
return "", fmt.Errorf("all api keys failed, last error: %w", lastErr)
}
type SearXNGSearchProvider struct {
baseURL string
proxy string
client *http.Client
}
func (p *SearXNGSearchProvider) Search(
ctx context.Context,
query string,
count int,
rangeCode string,
) (string, error) {
if p.baseURL == "" {
return "", errors.New("no SearXNG URL provided")
}
searchURL := fmt.Sprintf("%s/search?q=%s&format=json&categories=general",
strings.TrimSuffix(p.baseURL, "/"),
url.QueryEscape(query))
if timeRange := mapSearXNGTimeRange(rangeCode); timeRange != "" {
searchURL += "&time_range=" + url.QueryEscape(timeRange)
}
req, err := http.NewRequestWithContext(ctx, "GET", searchURL, nil)
if err != nil {
return "", fmt.Errorf("failed to create request: %w", err)
}
client := p.client
if client == nil {
client = &http.Client{Timeout: searchTimeout}
}View on GitHub (pinned to 49183d7e8d)
Solutions
- Set the SearXNG instance URL in the web-search provider config (baseURL, trailing slash is trimmed automatically) and restart
- Verify the URL is reachable from the gateway (container DNS, port) once set
- If you meant to use a hosted provider, configure its API key instead
Example fix
# before provider: searxng # no url # after provider: searxng searxng_url: http://searxng:8080
Defensive patterns
Strategy: validation
Validate before calling
searxngURL := strings.TrimSpace(cfg.SearXNGURL)
if searxngURL == "" {
return errors.New("searxng selected but no instance URL configured")
}
p := &integration.SearXNGSearchProvider{BaseURL: searxngURL} Try / catch
result, err := provider.Search(ctx, q, n, rangeCode)
if err != nil {
if err.Error() == "no SearXNG URL provided" {
// configure the instance URL; not retryable
}
return err
} Prevention
- Set the SearXNG instance URL (e.g. http://searxng:8080) whenever the provider is enabled
- Health-check the instance from the gateway network after config load
- Remember SearXNG needs no key — the URL is its only requirement
When it happens
Trigger: Calling Search on a SearXNGSearchProvider constructed with baseURL == "" — searxng selected as provider but the instance URL was never configured.
Common situations: SearXNG chosen to avoid API keys but the self-hosted instance URL (e.g. http://searxng:8080) omitted from config; URL stored in an env var that is unset in the service unit; provider enabled by default without the URL.
Related errors
- no API key provided
- credential: enc:// passphrase required
- credential: enc:// decryption failed (wrong passphrase or SS
- host cannot be empty
- host list contains an empty entry
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/decfc4de2289e876.
Report an issue: GitHub.