feat: add Keenable as a configurable web search provider

Add Keenable Search alongside the existing DuckDuckGo / Bing / Google /
Tavily / Ollama / Baidu / SearXNG providers.

- internal/infrastructure/web_search/keenable.go: KeenableProvider
  implementing the WebSearchProvider interface, following the Tavily
  provider pattern. Keyless by default: with no API key it calls the
  public endpoint (/v1/search/public, rate-limited); a key switches to
  /v1/search and lifts the cap. Base URL is hardcoded (SSRF-safe), proxy
  is honored.
- Registered "keenable" in the container registry.
- Added the keenable provider type + type metadata (RequiresAPIKey=false)
  and service validation (no required key, like DuckDuckGo).
- Provider-specific empty-results diagnostic (keyless rate-limit hint).
- Frontend: extend the provider union type with 'keenable'.
- Unit tests: keyless vs keyed endpoint, attribution header, maxResults
  trim, result mapping, error status, name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ilya Bogin
2026-07-07 10:17:18 +03:00
committed by lyingbug
parent f7b427009d
commit 8cf9f1c882
7 changed files with 281 additions and 2 deletions
+9
View File
@@ -22,6 +22,7 @@ const (
WebSearchProviderTypeOllama WebSearchProviderType = "ollama"
WebSearchProviderTypeBaidu WebSearchProviderType = "baidu"
WebSearchProviderTypeSearxng WebSearchProviderType = "searxng"
WebSearchProviderTypeKeenable WebSearchProviderType = "keenable"
)
// WebSearchProviderEntity represents a configured web search provider instance for a tenant.
@@ -198,5 +199,13 @@ func GetWebSearchProviderTypes() []WebSearchProviderTypeInfo {
Description: "Baidu AI Search (requires API key from Baidu Cloud)",
DocsURL: "https://cloud.baidu.com/doc/AppBuilder/s/qlvEcai0p",
},
{
ID: "keenable",
Name: "Keenable",
RequiresAPIKey: false,
SupportsProxy: true,
Description: "Keenable web search built for AI agents (keyless by default; an optional API key lifts the rate limit)",
DocsURL: "https://keenable.ai/",
},
}
}