feat: add Tavily as optional search provider for GeeksforGeeks in SmartWebSearcher#2
Open
mani2001 wants to merge 2 commits into
Open
Conversation
added 2 commits
March 22, 2026 23:50
… search fallback in SmartWebSearcher
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.
Summary
SmartWebSearcherTAVILY_API_KEYis set (viaconfig.yamlor environment variable), Tavily'ssearch()API withinclude_domains=["geeksforgeeks.org"]is used instead of fragile Google scrapingFiles changed
models/smart_web_searcher.py— Added Tavily client initialization,_search_geeksforgeeks_tavily()method, and routing logic to prefer Tavily when availablerequirements.txt— Addedtavily-python>=0.5.0config.yaml— Addedtavily.api_keyconfiguration entryDependency changes
tavily-python>=0.5.0torequirements.txtEnvironment variable changes
TAVILY_API_KEY— read fromconfig.yaml(tavily.api_key) or directly from environmentNotes for reviewers
search_depth="advanced"for highest relevance andinclude_domainsto scope results to geeksforgeeks.orgrun_in_executoris used to call the synchronousTavilyClient.search()from async context without blocking the event loop🤖 Generated with Claude Code
Automated Review
include_raw_content=Trueis present in the Tavilysearch()call, enabling the BeautifulSoup code-extraction path. (2)import osis placed alphabetically within the stdlib block (betweenjsonandre), satisfying PEP 8. (3) No GITHUB_TOKEN env-var resolution was added — the change stays in scope. The additive migration preserves the original_search_geeksforgeeksscraper as a fallback,tavily-python>=0.5.0is added torequirements.txt, andTAVILY_API_KEYis documented inconfig.yaml. Tavily SDK call parameters (search_depth,include_domains,include_raw_content,max_results) are all valid. No broken imports, dead code, or unrelated changes detected.