Add a You.com web search backend (works with no key)
I work at You.com, so treat the recommendation accordingly. Asking here before opening a PR.
中文摘要:先说明,我在 You.com 工作。建议为 retriever 增加 You.com 联网搜索后端:设置 YDC_API_KEY 时使用正式 Search API;不设置时可免费使用(每天 100 次),方便零配置跑通 web search 流程。默认后端不变。
Is your feature request related to a problem? Please describe.
The retriever's web search backends (exa, tavily, zhipuai) all need an API key. Someone trying a web search pipeline for the first time has to sign up for a provider before it runs.
Describe the solution you'd like
A you backend in servers/retriever/src/websearch_backends/you_backend.py, following tavily_backend.py:
- With
YDC_API_KEY(orapi_keyin the config): the Search API athttps://ydc-index.io/v1/search. - Without a key: the free endpoint
https://api.you.com/v1/agents/search(100 searches a day, no account). Enough to try a pipeline, not for large runs. - Uses
httpx(already a dependency) and_parallel_searchwith the same retry settings, and returns passage strings.search_kwargspasses through options likecountry,language, andfreshness. "you"added to_WEBSEARCH_BACKENDS, ayou:block inparameter.yaml, and a test.
tavily stays the default. For transparency: requests to You.com would send User-Agent: youdotcom-integration/openbmb-ultrarag so we can attribute the traffic. It's only on You.com requests.
Describe alternatives you've considered
Not adding it. If you'd rather keep the backend list as it is, say so and I'll close this without fuss.
Additional context
API reference: https://you.com/specs/openapi_search_v1.yaml. Happy to open the PR if this fits.
Thanks for the proposal and for disclosing your affiliation. An optional You.com backend sounds reasonable; we'd welcome a PR that keeps Tavily as the default.
Could you first share official documentation for https://api.you.com/v1/agents/search, including its request/response format and how the daily quota is enforced? The authentication docs describe keyless access via the free MCP profile, so we'd like to clarify the REST API contract.
Please include mocked tests for both modes, result handling, and authentication/rate-limit errors. If the free REST endpoint isn't a supported public API, a backend that requires an API key would still be welcome.
Seems like adding a You.com backend could make it easier for folks to get started without needing an API key right away. I'd check how it integrates with existing backends, especially around the search options and retry settings.
Thanks for the review and the clear test list.
On the docs: the request and response format for /v1/agents/search is in the Search OpenAPI spec, https://you.com/specs/openapi_search_v1.yaml. The keyless path is documented today through the free MCP profile (https://api.you.com/mcp?profile=free), not as a standalone REST page, so I understand wanting a firmer contract before relying on it.
On the quota: it's 100 searches a day, no key, counted per IP. Past that the API returns a 429.
So here's what I'd propose for the PR:
- Tavily stays the default. You.com is opt-in.
- With
YDC_API_KEYset, it calls the keyed Search API. That path is fully supported. - If you'd rather not depend on the keyless REST path until it has its own docs page, I'll ship the key-required version only and leave keyless out.
- Mocked tests for keyed and keyless modes (or keyed only, per 3), result parsing, and auth and rate-limit errors (401/403/429).
Tell me which way you want 3 and I'll open the PR.
Thank you for proposing this integration and following up with #548. We previously welcomed it, and we take responsibility for that guidance and the subsequent merge.
We've now decided to narrow the set of built-in search providers we maintain. The proposed revert and clearer contribution criteria are in #562 (https://github.com/OpenBMB/UltraRAG/pull/562); this is a project maintenance decision. We're closing this feature request as not planned under the revised direction.
After the revert is merged, configurations selecting websearch_backend: youcom will need to use another configured backend or a separately maintained MCP integration/adapter. We're sorry for the change in direction after your contribution.