feat(web-search): support configurable search providers - #2740
Merged
Conversation
wsp1911
force-pushed
the
1.0.0-explore
branch
from
September 2, 2026 04:38
6ed72cb to
a9b1887
Compare
wsp1911
marked this pull request as ready for review
September 2, 2026 04:38
wsp1911
force-pushed
the
1.0.0-explore
branch
2 times, most recently
from
September 2, 2026 05:19
6e2aa75 to
ba3e91e
Compare
Send only the query and result count supported by the hosted Exa MCP tool, with a default of 10 results and a valid range of 1 to 20. - Keep only title, URL, publication date, and author metadata - Exclude snippets and highlights from model context - Surface authentication, quota, permission, and rate-limit failures - Handle MCP tool errors and JSON-RPC errors as actual failures Refs: GCWing#2684
wsp1911
force-pushed
the
1.0.0-explore
branch
from
September 2, 2026 06:14
ba3e91e to
7250cd9
Compare
Introduce a provider-neutral WebSearch runtime while keeping the model-facing query and maxResults contract stable. - Support free Exa MCP, Exa Search API, Tavily, and BitFun Search HTTP Protocol v1 through normalized result and error contracts - Store provider settings separately from device-local encrypted credentials and expose credential operations across hosts - Add provider settings, credential status, protocol documentation, save actions, and notification feedback to the Web UI - Preserve unknown configuration fields, omit default values on disk, and fail unsupported or misconfigured providers without fallback - Normalize and validate responses and use 60-second search timeouts - Extend desktop, CLI peer-host, and app-server configuration paths Refs: GCWing#2684
wsp1911
force-pushed
the
1.0.0-explore
branch
from
September 2, 2026 06:26
7250cd9 to
9af8269
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
queryandnum_results, while translating provider-specific request fields atruntime boundaries.
MCP, Exa Search API, Tavily, and BitFun Search HTTP Protocol v1.
for Desktop, CLI peer host, app server, and Web UI.
credential status, protocol documentation, and localized copy.
from persisted configuration, and fail invalid providers without fallback.
optional author, with bounded responses and 60-second timeouts.
Fixes #2684
Type and Areas
Type:
Feature / bug fix / UI/UX
Areas:
Rust contracts and core, services integrations, desktop/Tauri, CLI peer host,
app server, Web UI, i18n, repository boundary checks
Motivation / Impact
WebSearch was previously tied to the hosted free Exa MCP endpoint. Users could
not select an official API service, supply their own credentials, or connect a
compatible private search endpoint.
This PR keeps the model-visible tool schema stable while allowing the runtime
host to select one of four search providers. Existing installations continue
to use free Exa MCP by default, while users can configure Exa Search API,
Tavily, or a BitFun Search HTTP Protocol v1 endpoint.
Secrets are stored in the encrypted credential vault on the execution host and
are not written to or synchronized with normal configuration. Provider errors
are normalized and surfaced directly; an unavailable or invalid provider does
not silently fall back to another service.
Verification
Passed:
cargo test -p bitfun-services-integrations --no-default-features --features web-tools --lib web_tools::tests::cargo test -p tool-runtime --lib web_search::tests::cargo test -p bitfun-core --no-default-features --features agent-runtime,git,tools-browser-web,tools-computer-use --lib websearch_cargo test --locked -p bitfun-core --no-default-features --lib service::config::manager::tests::persistence_pnpm run fmt:rscargo fmt --check -p bitfun-coregit diff --checkgit diff --cached --checkNot run in the final verification pass:
runtime verification
Reviewer Notes
queryplus optionalnum_results, with adefault of 10 and a range of 1–20.
maxResultswhere required without changing themodel-visible schema.
exa_mcp_free; no migration is required.cross-version compatibility, but unsupported selections fail explicitly.
rejects redirects, limits response bodies, and supports no authentication,
bearer authentication, or one custom credential header.
were not exercised end to end.
Checklist