You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This project already has a dedicated research bridge, but today it assumes a Playwright-driven Perplexity flow. This keeps the default behavior intact and adds an optional You.com-backed research path for cases where a direct API integration is a better fit.
What changed
added an optional provider setting to the research config
added a You.com Research API path in ResearchBridge
kept Perplexity as the default behavior
documented the new env vars and setup
added config and research-bridge test coverage for the new provider path
Existing usage stays the same. If the provider is set to youcom, research requests go through the You.com Research API instead of the Playwright browser flow.
python3 -m pytest tests/test_research_bridge.py tests/test_config.py -q(blocked during collection in the existing test suite because tests/helpers.py uses float | None, which the local python3 interpreter does not support)
Fallback and error handling
default behavior remains Perplexity unless the provider is explicitly switched
missing YDC_API_KEY returns a clear MISSING_API_KEY error
HTTP, timeout, and parse failures return explicit error codes
Thanks @mouse-value-add — and the You.com team — this is a genuinely clean PR. A few things I appreciated on read-through:
The provider abstraction keeps it fully opt-in: the default stays on the Playwright/Perplexity path unless someone explicitly sets AUTOMATED_LOOP_RESEARCH_PROVIDER=youcom. Zero impact on existing users — exactly the pattern I want for third-party providers.
No new dependencies (stdlib urllib), explicit error codes that match the existing Result pattern, and you added both config and research-bridge test coverage. That's the bar.
One thing I want to get right before merging: the Research API returns a sources array alongside output.content, and content carries inline citation markers like [[1, 2]]. Right now the integration reads content and drops sources — so anyone who opts in gets research text with dangling [[1,2]] references that resolve to nothing. Since citation-backed answers are the whole value of the Research API, that's a user-visible gap worth closing.
Ask: surface sources (even a simple appended Sources: list works) — or, if you'd rather keep it minimal, strip the [[…]] markers before returning the text. Your call, since you know the response schema best.
Optional, only if you're already in there: you flagged the provider field living under the perplexity config block — I'd happily take you up on moving it to a neutral research section, but that's a nice-to-have, not a blocker.
Once the citations are handled I'm ready to merge, and I'll credit you and the You.com team in the changelog. Really appreciate the quality here — this is a great template for how integrations should land in the toolkit. 🙌
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
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.
Why
This project already has a dedicated research bridge, but today it assumes a Playwright-driven Perplexity flow. This keeps the default behavior intact and adds an optional You.com-backed research path for cases where a direct API integration is a better fit.
What changed
providersetting to the research configResearchBridgeSetup
Optional config:
{ "perplexity": { "provider": "youcom" } }Usage
Existing usage stays the same. If the provider is set to
youcom, research requests go through the You.com Research API instead of the Playwright browser flow.Validation performed
python3 -m pytest tests/test_config.py -qpython3 -m py_compile research_bridge.py loop_driver.py config.pypython3 -m pytest tests/test_research_bridge.py tests/test_config.py -q(blocked during collection in the existing test suite becausetests/helpers.pyusesfloat | None, which the localpython3interpreter does not support)Fallback and error handling
YDC_API_KEYreturns a clearMISSING_API_KEYerrorTracking issue: youdotcom-oss/integration-tracking#39
Happy to adjust the shape if you'd prefer this setting to live under a more generic
researchsection instead.