feat: add optional You.com search integration - #205
Open
mouse-value-add wants to merge 1 commit into
Open
Conversation
Add optional You.com provider to the Web Search plugin, following the existing search engine provider pattern (Google Custom Search, Microsoft Bing, DuckDuckGo). Uses the You.com MCP server you-search tool via the repo's existing requests dependency - no new dependencies. Works keyless by default (https://api.you.com/mcp?profile=free); an optional API key (youcom_api_key, falls back to YDC_API_KEY env var) switches to the authenticated endpoint with bearer auth. Provider is opt-in via the provider selector in plugin settings - default provider and all existing providers are unchanged.
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.
This adds You.com as an optional web search engine provider for the Web Search plugin, following the existing provider pattern (
GoogleCustomSearch,MicrosoftBingSearch,DuckDuckGoSearchinpygpt_net/provider/web/).What changed
src/pygpt_net/provider/web/youcom_search.py— newYouComSearchprovider implementingBaseProvider, registered alongside the built-in providers inapp.pytests/provider/web/test_youcom_search.py— unit tests (request construction, SSE/JSON response parsing, limit/offset, de-dup, fail-safe on errors,is_configuredbehavior, env var fallback)README.md,docs/source/intro.rst,docs/source/plugins.rstWhy
The docs note the Web Search plugin "can be extended with other search engine providers" — this adds one more option through that existing extension point. The provider calls the You.com MCP server's
you-searchtool over plain HTTPS using the repo's existingrequestsdependency. No new dependencies.Setup
Select
You.comin the Web Search plugin'sProvideroption. It works keyless out of the box — the default endpoint (https://api.you.com/mcp?profile=free) needs no credentials. Optionally, aYou.com API KEYcan be set in the plugin settings (or via theYDC_API_KEYenv var as a fallback); when a key is present, requests switch to the authenticated endpointhttps://api.you.com/mcpwith bearer auth. The endpoint is also overridable in settings, likebing_endpoint.Behavior / fail-safe
google_custom_search) and all existing providers are untouchedis_configuredreturnsTruefor the keyless endpoint; the authenticated endpoint requires the key, otherwise the standard "set API key in plugin settings" flow kicks inValidation
pytest tests/provider/web/ tests/plugin/cmd_web/— 20/20 pass--max-line-length=120)https://api.you.com/mcp?profile=free(returns URLs, offset pagination works)Web.register()path:youcom_searchshows up in the provider combo and settings tabs, defaults unchangedllama_index,speech_recognition) and identical on unmodifiedmasterHappy to adjust the shape if you'd prefer the provider under a different name/id or a different option layout.