Repository navigation
feat: add optional you.com search integration - #548
Open
brainsparker wants to merge 1 commit into
Open
brainsparker wants to merge 1 commit into
brainsparker wants to merge 1 commit into
Conversation
2 of 6 tasks
This branch has not been deployed
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.
I work at You.com. This follows up on #534 and @xhd0728's note there: Tavily stays the default, and this adds
youcomas one more opt-inwebsearch_backend, keyed only (YDC_API_KEY). It is modeled on the Serply backend from #531.What changes
servers/retriever/src/websearch_backends/youcom_backend.py: newYoucomWebSearchBackend. It sendsPOST https://ydc-index.io/v1/searchwithX-API-Key, mapsresults.web[]to passages (snippets joined,descriptionas fallback, empty results dropped), and trims totop_k.ToolError(bad key), 402 raisesToolError(out of credits), 429 retries and waits forRetry-Afterwhen the server sends it, otherwise the usual exponential backoff. Other failures retry like the other backends and return[]at the end.websearch_backends/__init__.py: registersyoucom.servers/retriever/parameter.yaml: addsyoucomto the options comment and ayoucomblock with the same fields Serply uses.websearch_backendstaystavily..env.dev: addsYDC_API_KEY=.AGENTS.md: listsyoucomamong the backends.youdotcom-integration/openbmb-ultrarag, so we can see on our side how much traffic comes from UltraRAG. Happy to change it toUltraRAGlike Serply if you prefer.To use it: set
YDC_API_KEYandwebsearch_backend: youcom. Keys come from https://you.com/platform?utm_source=openbmb-ultrarag&utm_medium=oss_integration&utm_campaign=2026-10-oss-integrations&utm_content=pr_bodyTests
tests/servers/retriever/test_youcom_websearch_backend.pyruns against a local aiohttp server, the same way the Serply test does. It covers:top_k, and emptyresults;Retry-After;ruff formatis clean.ruff checkreports the same rule groups it already reports onserply_backend.py(typing aliases, broadexcept). I kept the file's style matching the other backends instead of changing it.On keyless mode: I left it out because #534 said keyed-only was fine. If you want it later, it would be a small follow-up.