feat: replace DuckDuckGo web search with Exa/Parallel MCP providers#3
Open
andyzengmath wants to merge 2 commits into
Open
feat: replace DuckDuckGo web search with Exa/Parallel MCP providers#3andyzengmath wants to merge 2 commits into
andyzengmath wants to merge 2 commits into
Conversation
DuckDuckGo Lite has become unreliable due to aggressive CAPTCHA/bot detection on automated requests. This causes web search to silently fail with empty results. Replace with Exa and Parallel MCP endpoints (same approach used by OpenCode) as the primary search backend: - Uses JSON-RPC 2.0 MCP protocol (tools/call method) - Traffic split 50/50 between Exa and Parallel by default - Automatic cross-fallback (if one fails, tries the other) - Works without API keys out of the box - 25-second timeout per request Provider priority chain: 1. Brave Search API (if BRAVE_API_KEY set) 2. Exa/Parallel MCP (primary, free, no key needed) 3. DuckDuckGo Lite (fallback, may hit CAPTCHAs) 4. DuckDuckGo Instant Answer (last resort) New env vars (all optional): - WEBSEARCH_PROVIDER: force "exa" or "parallel" - EXA_API_KEY: optional key for Exa - PARALLEL_API_KEY: optional key for Parallel
Log model mapping, stream mode, token usage, and stop reason for each request to match the detail level of the original proxy.
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.
Problem
DuckDuckGo Lite web search has become unreliable. DDG now aggressively detects and blocks automated requests with CAPTCHAs, causing web search to silently return empty results. The proxy logs show:
This affects all users who don't have a Brave API key configured, since DDG Lite was the default (and only free) provider.
Solution
Replace DuckDuckGo with Exa and Parallel MCP endpoints as the primary search backend — the same approach used by OpenCode (184k stars).
These providers:
tools/callmethod)Provider Priority Chain
How It Works
New Environment Variables (all optional)
WEBSEARCH_PROVIDERexaorparallel(default: auto 50/50 split)EXA_API_KEYPARALLEL_API_KEYTesting
Verified working with
claude-sonnet-4.5through the proxy:No configuration needed — just restart the proxy and web search works immediately.