Skip to content

Conversation

@NormallyGaussian
Copy link

@NormallyGaussian NormallyGaussian commented Dec 1, 2025

This adds docs for ParallelSearchTool and updates the existing implementation to use the official parallel-web SDK instead of using requests directly. I've also updated the API based on recent changes to the search API.

This is my first PR in this repo, so please let me know if I've missed any steps. Happy to make updates. Thanks!

Note: I did not make any changes to tool.specs.json as the script to generate it made a lot of unrelated changes. Let me know if there's another way to run it.

Tested locally successfully.
image


Note

Adds docs for ParallelSearchTool and rewrites the tool to use the parallel-web SDK with new config options, updated API, tests, and dependency extras.

  • Tools:
    • ParallelSearchTool: Reimplemented to use parallel-web SDK (Parallel.beta.search), with init options api_key, mode, max_results, excerpts, fetch_policy, source_policy and runtime overrides for max_results/source_policy.
    • Deprecates processor and max_chars_per_result (now handled via mode and excerpts), adds robust client/env checks, dotenv load, and JSON response formatting.
  • Docs:
    • Adds en/tools/search-research/parallelsearchtool page with installation, config, examples, and tips.
    • Updates search tools overview to include Parallel Search card and usage snippet; updates docs/docs.json navigation.
  • Tests:
    • New tests mocking SDK client, validating env/package requirements, input validation, happy path, and runtime overrides.
  • Dependencies:
    • Adds optional extra parallel-web>=0.3.4 in pyproject.toml and uv.lock.

Written by Cursor Bugbot for commit 4b69a2c. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

return_value=mock_parallel_client,
):
with pytest.raises(ValueError, match="PARALLEL_API_KEY"):
ParallelSearchTool()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Test fails when parallel-web package not installed

The test_requires_env_var test patches crewai_tools.tools.parallel_tools.parallel_search_tool.Parallel, but unlike the other tests that patch Parallel, it's missing the @pytest.mark.skipif(not PARALLEL_AVAILABLE, ...) decorator. When parallel-web is not installed, the Parallel class is never defined in the module's namespace (since the import is wrapped in a try/except). Attempting to patch a non-existent attribute causes an AttributeError, making the test fail in environments where the optional dependency isn't installed.

Fix in Cursor Fix in Web

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant