feat(web): Parallel-backed web search & extract — free Search MCP when keyless, v1 REST when keyed - #34971
Conversation
…n keyless, v1 REST when keyed Make Parallel the web search/extract backend with a zero-setup free tier: - Keyless (no PARALLEL_API_KEY): web_search/web_extract work out of the box via Parallel's free hosted Search MCP (search.parallel.ai/mcp), and parallel becomes the default backend when no other web credentials are configured (ahead of ddgs, which is search-only). A small hand-rolled Streamable-HTTP JSON-RPC client speaks the MCP's web_search/web_fetch tools; the existing web_search/web_extract tools are the only tools registered. - Keyed (PARALLEL_API_KEY set): uses the Parallel v1 REST endpoints (client.search / client.extract with advanced_settings.full_content) — no beta. Bumps parallel-web 0.4.2 -> 0.6.0. - Attribution: on the free path only, results carry provider/attribution and the CLI tool line reads "Parallel search" / "Parallel fetch"; the paid path is unbranded. - Selection/registration: web tools register unconditionally (free MCP backstop) while check_web_api_key remains a real usability probe; explicit per-capability backends are honored (so misconfig surfaces) rather than masked by the fallback. Tested: live web_search/web_extract against search.parallel.ai in keyless and keyed modes; unit suites for the MCP client, backend selection, and display labeling; full agent run shows the "Parallel search" label on the free path.
0be63e3 to
a2c13e4
Compare
|
Thanks for this, Matt — the keyless MCP client is cleanly built and the "broken no-key install" problem it targets is real. We're going to park this rather than merge it right now, for two reasons: 1. Outbound attribution / telemetry. The keyless path attaches a 2. Default-backend change. Separately, making Parallel the silent zero-config default for every keyless install (with Parallel branding on the tool line) is a product/default decision rather than a contributor merge — we'd want to own that call independently of the attribution question. The substantive win here — fixing the no-key fall-through so web tools work out of the box — is something we want. When the opt-in telemetry gating is in place, this is a prime candidate to rebase and re-land with your authorship intact, attribution wired behind the gate. Appreciate the contribution. |
|
Merged via #43798 — your commit was cherry-picked onto current main with your authorship preserved in git log (rebase-merge). Thanks for an excellent contribution: the hand-rolled Streamable-HTTP client, the registration/usability split, and the explicit-config-wins semantics all survived review intact, and we live-verified the keyless path end-to-end (anonymous search + fetch both work with zero setup). Keyless Parallel is now the default web backend on fresh installs. One adjustment on top: per project telemetry policy (no third-party usage attribution without explicit user opt-in), the free-MCP clientInfo/User-Agent/session-id prefix was genericized from |
|
Get this spam out of Hermes. This organization should be banned for trying to put this product into hermes and other open source software. Moreover, trying to make it a default setting is ridiculous! |
|
Malicious merge, ban these accounts |
What does this PR do?
Makes Parallel the web search/extract backend with a zero-setup free tier:
PARALLEL_API_KEY):web_search/web_extractwork out of the box via Parallel's free hosted Search MCP (search.parallel.ai/mcp), andparallelbecomes the default backend when no other web credentials are configured. Previously a keyless install fell through to a backend it couldn't authenticate.PARALLEL_API_KEYset): uses the Parallel v1 REST endpoints (client.search/client.extract) — no beta.The free path uses a small hand-rolled Streamable-HTTP JSON-RPC client to the Search MCP (
web_search/web_fetch). No new tool and no MCP server is registered — the existingweb_search/web_extracttools are the only ones registered; the MCP is just their wire protocol on the keyless path.Type of Change
Changes Made
plugins/web/parallel/provider.py— v1search/extract; hand-rolled MCP JSON-RPC client (handshake + negotiatedMCP-Protocol-Version+ id-matched SSE/array parsing) for the keylessweb_search/web_fetchpath; per-call session ids; free-tier attribution.tools/web_tools.py— keylessparallelas the credential-less default in_get_backend()(ahead ofddgs, which is search-only);web_tools_registered()(always on) vscheck_web_api_key()(real usability probe) split; explicit per-capability backends honored; free-extractprovider/attributioninweb_extract_tool.agent/display.py— "Parallel search"/"Parallel fetch" verb on the free path only.hermes_cli/tools_config.py— web setup prompt gated on actual usability instead of presence ofweb.backend.pyproject.toml,tools/lazy_deps.py,uv.lock— bumpparallel-web0.4.2 → 0.6.0.tests/plugins/web/test_parallel_keyless_mcp.py+ updates to display, web-provider, web-tools-config, and tools-config suites.How to Test
Live web tools (no model required):
env -u PARALLEL_API_KEY -u EXA_API_KEY -u FIRECRAWL_API_KEY -u TAVILY_API_KEY uv run --extra dev --extra parallel-web python tests/integration/test_web_tools.py --no-llm→ "Using parallel backend"; search + extract pass.export PARALLEL_API_KEY=… && uv run --extra dev --extra parallel-web python tests/integration/test_web_tools.py --no-llm.uv run --extra dev --extra parallel-web pytest -q tests/plugins/web tests/agent/test_display.py tests/tools/test_web_providers.py tests/tools/test_web_tools_config.py tests/hermes_cli/test_tools_config.py.uv run --extra parallel-web hermes -z "look up the latest news about parallel web systems" -t web→ tool line shows🔍 Parallel search …on the free path.Checklist
Code
feat(web): …)pytest tests/ -q— the web/display/config suites all pass; the full run has pre-existing, unrelated failures in this environment (browser tests require optional deps not installed here)Documentation & Housekeeping
docs/cli-config.yaml.example— N/A (no new config keys; reuses existingweb.backend/search_backend/extract_backendand the existingPARALLEL_SEARCH_MODE)httpxtransport; no platform-specific codeweb_search/web_extractschema descriptions to mention the free tier if preferredScreenshots / Logs
Keyless live run:
Web Backend API Key: Using parallel backend→ 3/3 searches valid, extract 2/2 pages. Agent run renders🔍 Parallel search [query]on the free path and surfaces the Parallel attribution in its answer.