fix(web-search): polish Keenable provider integration after #1946

Expose optional API key in settings UI, map longer API snippets into Content
for RAG, align maxResults fallback with other providers, sync Swagger enum,
and add follow-up unit tests.
This commit is contained in:
wizardchen
2026-07-07 17:06:56 +08:00
committed by lyingbug
parent 8cf9f1c882
commit 77cf6a5789
13 changed files with 104 additions and 14 deletions
+10 -6
View File
@@ -128,6 +128,9 @@ type WebSearchProviderTypeInfo struct {
Name string `json:"name"`
// Whether the provider requires an API key
RequiresAPIKey bool `json:"requires_api_key"`
// Whether the provider accepts an optional API key (keyless by default, but a
// key unlocks higher limits — e.g. Keenable). Mutually exclusive with RequiresAPIKey.
SupportsOptionalAPIKey bool `json:"supports_optional_api_key,omitempty"`
// Whether the provider requires an engine ID (e.g., Google CSE)
RequiresEngineID bool `json:"requires_engine_id"`
// Whether the provider requires a user-supplied base URL (e.g., self-hosted SearXNG instance)
@@ -200,12 +203,13 @@ func GetWebSearchProviderTypes() []WebSearchProviderTypeInfo {
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/",
ID: "keenable",
Name: "Keenable",
RequiresAPIKey: false,
SupportsOptionalAPIKey: true,
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/",
},
}
}