Skip to content

feat(web-search): add Keenable Search provider - #3686

Closed
ilya-bogin-keenable wants to merge 2 commits into
openBitFun:mainfrom
keenableai:feat/keenable-web-search
Closed

ilya-bogin-keenable wants to merge 2 commits into
openBitFun:mainfrom
keenableai:feat/keenable-web-search

Conversation

@ilya-bogin-keenable

Copy link
Copy Markdown
Contributor

Summary

Adds Keenable Search as an opt-in WebSearch provider next to free Exa MCP, Exa Search API, Tavily and DeepSeek. Like free Exa MCP it needs no API key: without one it calls Keenable's public endpoint. A key saved in the existing encrypted credential vault is optional and switches to the keyed endpoint for higher rate limits. The default provider stays exa_mcp_free; nothing changes unless a user selects Keenable.

Related: #2673 (configurable search backends, delivered by #2740).

Type and Areas

Type:

Feature

Areas:

Rust services integrations and core WebSearch runtime, config contracts, web UI settings, i18n, interactive capability catalog

Motivation / Impact

WebSearch has one keyless provider, the shared free Exa MCP endpoint, and #2673 shows what happens when its quota runs out. Keenable gives users a second keyless option they can switch to in Settings > Web Search without creating an account.

  • KeenableSearchProvider in services-integrations/src/web_tools/keenable.rs, following the DeepSeek and Tavily providers: POST https://api.keenable.ai/v1/search/public with {"query", "max_results"}, or /v1/search with X-API-Key when a key is saved. Results go through the shared validation, deduplication and truncation; published_at is kept when it is a date string, page snippets are dropped (WebFetch reads content), as Tavily's content is.
  • resolve_provider reads the Keenable credential as optional, so a missing key is not a configuration error. read_credential now wraps a new read_optional_credential.
  • WebSearchProviderId::KEENABLE, providers.keenable.credentialId (default keenable-search-api) in config contracts; older configs load unchanged.
  • Settings page: a "Keenable Search API" option, and the existing credential section shown for it as optional, with a status line saying searches use the keyless tier when no key is saved. en-US, zh-CN and zh-TW strings; catalog and generated artifacts regenerated with pnpm run capabilities:generate.

What is sent to Keenable: the search query and result count, with the header X-Keenable-Title: OpenBitFun; the API key only if the user saved one.

Verification

  • cargo test --locked -p openbitfun-services-integrations --no-default-features --features web-tools --lib web_tools::tests: 24 passed (5 new Keenable tests: keyless path and headers, saved and blank keys, request validation, empty vs invalid responses, HTTP error and Retry-After mapping)
  • cargo test --locked -p openbitfun-core --no-default-features --features web-tools --lib service::web_search::tests: 5 passed (new optional-credential test; Keenable added to the credential lifecycle test)
  • cargo test --locked -p openbitfun-config-contracts --lib: 145 passed (new legacy-payload test for the Keenable config)
  • cargo test --locked -p openbitfun-runtime-ports --lib: 8 passed
  • cargo clippy on the touched crates: no warnings in the changed files; pnpm run fmt:rs, git diff --check
  • pnpm --dir src/web-ui exec node scripts/run-vitest.mjs run on ConfigAPI.test.ts, WebSearchSettingsPage.presentation.test.ts, settingsRegistry.test.ts: 49 passed
  • pnpm run type-check:web: passed
  • eslint on the touched web UI files: clean
  • pnpm run i18n:audit: passed, 0 warnings; pnpm run capabilities:check: verified; node scripts/check-core-boundaries.mjs: passed
  • Live keyless call through KeenableSearchProvider::new(None) (temporary local test, not committed): "Rust 1.0 release date" returned 10 results in 391 ms, "tokio runtime spawn_blocking" 10 results in 599 ms, all with titles and HTTP(S) URLs

Not run: the desktop app itself (no screenshot), and a live call with a saved key (the keyed request is covered by a fixture test).

Reviewer Notes

  • The UI change is one more option in the existing provider select plus the existing credential section, shown as optional for Keenable.
  • Keyless limits are per IP (10 requests/second, 1,000/hour); an unavailable or rate-limited Keenable fails explicitly like the other providers, with no fallback.
  • AI-assisted; fully tested as listed above.

Disclosure: I work at Keenable, which runs this API.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

Add Keenable Search as an opt-in provider that works without an API
key through its public endpoint, with an optional host-local encrypted
key that switches to the keyed endpoint for higher rate limits.

Expose the provider in Web Search settings and capability discovery.
Cover request routing, optional credentials, and legacy config loading.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants