feat(tools): add Keenable backend to web_search - #1722
Conversation
|
@ilya-bogin-keenable This PR is a Bug fix, Feature, or UI / frontend change but the Demo section is missing or only contains a placeholder. These change types require a screenshot or screen recording so reviewers can see the new behaviour without checking out the branch. Please update the Demo section with:
Use |
Adds a Keenable search backend to the web_search built-in tool, alongside the existing google / perplexity / nimble / tavily backends, giving non-OpenAI models another grounded-search option. Unlike the other backends, Keenable is keyless by default: with no api_key it calls the public endpoint (/v1/search/public), so it works out of the box. Supplying an api_key switches to the authenticated endpoint (/v1/search, X-API-Key header) and lifts rate limits. - New web_search_keenable.py, mirroring the Tavily/Nimble backends: optional api_key, max_results clamped 1-20, X-Keenable-Title: Omnigent attribution header, error-as-string contract, OMNIGENT_KEENABLE_BASE_URL test override. - web_search.py gains a _run_keenable dispatch branch (no required key) plus updated help text and module/_search docstrings. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
39548a0 to
f16c7e4
Compare
|
Thanks Ilya! Rebased this onto main for you and resolved the conflict with the newly-landed Verified the integration end to end: hit the keyless |
|
The selectable search_provider engines were hardcoded in ~5 places (module + class + _search docstrings, the if/elif dispatch, and two error strings), so adding a backend meant editing prose in each spot and the lists had already drifted. Add a `_BACKENDS` registry as the single source of truth: the dispatch and the error hint both derive from it, and adding an engine is now a `_run_*` plus one row.
|
Added a small follow-up commit on top (not a force-push, so the history is preserved): the selectable All 45 web_search tests still pass, ruff + format clean. No behavior change. |
|
Mering this. Thanks again, @ilya-bogin-keenable! |
|
🏷️ Doc impact: Adds a new keyless "keenable" backend to the web_search tool's selectable search_provider options, a user-configurable integration surface that the web_search docs should list. Drafting a docs PR to Auto-classified on merge. Set the label manually before merging to override. · run |
Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com>
* docs: document omnigent-ai/omnigent#1722 (#261) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2018 (#265) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#1386 (#272) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2156 (#278) * docs: document omnigent-ai/omnigent#2156 * Apply suggestion from @serena-ruan * Apply suggestions from code review Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2022 (#268) * docs: document omnigent-ai/omnigent#2022 * docs: add steering gif and simplify message queue section Co-authored-by: Isaac --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> * chore(api): sync openapi.json from omnigent@3c7a558 (#274) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#526 (#279) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: rename hindsight extra to memory (omnigent[memory]) (#282) The memory tools ship under the `memory` extra (omnigent[memory]), not `hindsight`. Update the install instruction and extra name to match. The Hindsight product name and the hindsight_* tool names are unchanged. * docs: document default base branch for new worktrees (#284) * docs: document default base branch for new worktrees * docs: condense worktree branches section and add setting demo gif Co-authored-by: Isaac --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> * chore(api): sync openapi.json from omnigent@7fb779f (#281) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * chore(api): sync openapi.json from omnigent@60e775a (#288) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2152 (#280) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#1859 (#277) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2135 (#276) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> Co-authored-by: Pat Sukprasert <pattara.sk127@gmail.com> Co-authored-by: Dhruv Gupta <dhruv.gupta@databricks.com>
* docs: document omnigent-ai/omnigent#1722 (#261) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2018 (#265) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#1386 (#272) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2156 (#278) * docs: document omnigent-ai/omnigent#2156 * Apply suggestion from @serena-ruan * Apply suggestions from code review Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2022 (#268) * docs: document omnigent-ai/omnigent#2022 * docs: add steering gif and simplify message queue section Co-authored-by: Isaac --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> * chore(api): sync openapi.json from omnigent@3c7a558 (#274) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#526 (#279) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: rename hindsight extra to memory (omnigent[memory]) (#282) The memory tools ship under the `memory` extra (omnigent[memory]), not `hindsight`. Update the install instruction and extra name to match. The Hindsight product name and the hindsight_* tool names are unchanged. * docs: document default base branch for new worktrees (#284) * docs: document default base branch for new worktrees * docs: condense worktree branches section and add setting demo gif Co-authored-by: Isaac --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> * chore(api): sync openapi.json from omnigent@7fb779f (#281) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * chore(api): sync openapi.json from omnigent@60e775a (#288) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2152 (#280) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#1859 (#277) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document omnigent-ai/omnigent#2135 (#276) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> * docs: document official kubernetes server image variant (#285) Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> --------- Co-authored-by: omnigent-ci[bot] <294685417+omnigent-ci[bot]@users.noreply.github.com> Co-authored-by: Serena Ruan <82044803+serena-ruan@users.noreply.github.com> Co-authored-by: Serena Ruan <serena.rxy@gmail.com> Co-authored-by: Pat Sukprasert <pattara.sk127@gmail.com> Co-authored-by: Dhruv Gupta <dhruv.gupta@databricks.com> Co-authored-by: Daniel Lok <daniel.lok@databricks.com>
Summary
Adds a Keenable search backend to the
web_searchbuilt-in tool, alongsidethe existing google / perplexity / nimble / tavily backends, giving non-OpenAI
models another grounded-search option.
Unlike the other backends, Keenable is keyless by default: with no
api_keyit calls the public endpoint (
/v1/search/public), so it works out of the box.Supplying an
api_keyswitches to the authenticated endpoint (/v1/search,X-API-Keyheader) and lifts rate limits.web_search_keenable.py, mirroring the Tavily/Nimble backends: optionalapi_key,max_resultsclamped 1–20,X-Keenable-Title: Omnigentattributionheader, error-as-string contract, and the
OMNIGENT_KEENABLE_BASE_URLtestoverride.
web_search.pygains a_run_keenabledispatch branch (no required key —this is the only keyless backend) plus updated help text and module/
_searchdocstrings.
Test Plan
uv run pytest tests/tools/builtins/test_web_search.py→ 45 passed (8 newKeenable cases: keyed path, keyless-by-default, X-API-Key/endpoint switch,
X-Keenable-Title header, HTTP error, empty results, max_results slice + clamp).
uv run ruff check . && uv run ruff format --check .→ clean on the touched files.OMNIGENT_KEENABLE_BASE_URL; request shape and result formatting confirmed.Demo
This is a core-tool backend with no UI surface, so the user-visible behaviour is
the tool's returned text. Live run through the unified
web_searchtool withsearch_provider: keenableand no API key (keyless public endpoint):Same call with an
api_keyin the spec transparently switches to theauthenticated endpoint (
/v1/search,X-API-Key) and returns the same shape.Type of change
Test coverage