feat(web-search): add optional youcom search provider - #413
Open
mouse-value-add wants to merge 1 commit into
Open
mouse-value-add wants to merge 1 commit into
mouse-value-add wants to merge 1 commit into
Conversation
Add You.com as an opt-in web_search provider alongside brave, tavily, searxng, jina, kagi, and olostep. Requests go to the You.com Search API (POST https://ydc-index.io/v1/search) with the X-API-Key header, reusing the existing WebSearchConfig apiKey / formatResults plumbing. - falls back to DuckDuckGo when no key is configured (same as the other key-based providers), so default behavior is unchanged - surfaces You.com in the desktop settings provider list - documents the full provider list (en + zh-CN)
mouse-value-add
requested review from
Wang-Daoji and
ZongYue99
as code owners
September 14, 2026 04:29
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.
What
Adds You.com as an opt-in
web_searchprovider, following the exact same pattern as the existing brave / tavily / kagi / olostep providers inWebSearchTool.Why
Memmy's agent runtime leans on
web_searchfor anything current β docs lookups, research tasks, fresh context for the memory-driven workflows. The built-in DuckDuckGo path works but is HTML-scraped and rate-limit-prone (the code already defends against bot challenges), and the current keyed providers don't include a citation-first web search option. You.com's Search API returns ranked web results with snippets via a plain JSON endpoint, which slots cleanly into the existing provider switch.Changes
src/core/agent-runtime/tools/web.ts: newyoucomprovider βPOST https://ydc-index.io/v1/searchwith theX-API-Keyheader, results mapped through the existingformatResultshelper. Key resolution follows the other providers:tools.web.search.apiKeyfirst, thenYDC_API_KEY. Without a key it falls back to DuckDuckGo, so default behavior is completely unchanged.src/entrypoints/frontend-bridge/settings-api.ts: addsYou.comtoWEB_SEARCH_PROVIDER_OPTIONSso it shows up in the desktop settings provider list (credential: "api_key").tests/core/agent-runtime/tools/web-search-tool.test.ts: 5 new cases mirroring the Brave/Tavily tests β request shape (endpoint,X-API-Key, body), snippet-over-description preference, description fallback, error reporting, and the no-key β DuckDuckGo fallback.docs/en/tools/mcp.mdx+docs/cn/tools/mcp.mdx: documents the full provider list and where keys come from (the provider list wasn't written down anywhere before).Setup
API keys are available at you.com/platform/api-keys. I kept this entirely opt-in β no new dependencies, no config migration, nothing changes unless you explicitly set
provider: youcom.Validation
npx vitest runon the touched suites: 112 tests passing (30 inweb-search-tool.test.ts, 10 insettings-api.test.ts, plus tool-loader / searchusage / build-status).npm run typecheckclean.Notes
For anyone who'd rather use You.com through MCP than the REST API, You.com also exposes a hosted MCP server (
https://api.you.com/mcp) that works with Memmy's existingtools.mcpServersstreamableHttp config β the provider here is just the lighter path when you want results inline inweb_search.Happy to adjust the shape if you'd prefer a different provider name or want the key env var renamed.