Skip to content

feat(search): add Keirolabs as a keyed web search provider - #68

Open
Manasbh wants to merge 1 commit into
modelflare-ai:masterfrom
Manasbh:feat/keirolabs-search
Open

Manasbh wants to merge 1 commit into
modelflare-ai:masterfrom
Manasbh:feat/keirolabs-search

Conversation

@Manasbh

@Manasbh Manasbh commented Nov 8, 2026 •

Copy link
Copy Markdown

I work at Keirolabs, so weigh the suggestion accordingly.

改了什么 · What changed

Adds Keirolabs as an optional keyed web-search provider, following the existing Tavily/Exa/Bocha/Zhipu/Keenable pattern. Default stays auto (free search); nothing changes unless a user picks Keirolabs and enters a key.

  • src/tools/search.ts: keirolabs in SEARCH_PROVIDERS / KEYED; keyedRequest → POST https://api.keirolabs.cloud/api/v2/keiro with Authorization: Bearer <key>, body { query, maxResults } (≤50). Results map title / url / snippet / publishedDate through the existing source() tidy; an empty publishedDate is dropped. Existing fallback to free search on auth/HTTP failure applies unchanged. Also updated the header comment's list of keyed providers (it was missing Keenable too).
  • Settings UI: "Keirolabs" option in the web-search picker; keirolabs added to the settings search keywords (en / zh-CN / ja / ko / ru).
  • Test: new keyed-request case in test/web-search.unit.test.ts.

为什么 · Why

Keirolabs serves queries from its own web index, typically in 100 ms – 1 s, with a free tier (30 req/min). That makes it a low-latency keyed option for the agent's web_search, next to the existing ones.

怎么验证的 · How it was verified

  • npm run typecheck && npm test (typecheck clean; full suite passes, incl. the new case)
  • 改了 README / docs 时跑了 npm run docs:check · not applicable, no README/docs changes
  • 界面改动附了浅色和深色截图 · one new <option> in the existing picker, no layout/style change
  • 新增依赖或移植代码时更新了 THIRD_PARTY_NOTICES.md · no new dependencies

Also checked live against the real API through SearchService (not mocked): a valid key returns results with backend: "keirolabs"; an invalid key returns 401, is classified as auth (so Settings shows the key-rejected hint) and falls back to free search.

Follows the existing Tavily/Exa/Bocha/Zhipu/Keenable pattern. Default
stays `auto`; nothing changes unless a user picks Keirolabs and enters
a key.
@Manasbh
Manasbh force-pushed the feat/keirolabs-search branch from cbcbd48 to e6f7800 Compare November 10, 2026 07:34
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.

1 participant