Skip to content

fix(brightdata): drop stray $ in f-string search URLs - #7326

Merged
Vidit-Ostwal merged 1 commit into
crewAIInc:mainfrom
simpleqt:fix/brightdata-search-url-dollar-issue
Sep 8, 2026
Merged

fix(brightdata): drop stray $ in f-string search URLs#7326
Vidit-Ostwal merged 1 commit into
crewAIInc:mainfrom
simpleqt:fix/brightdata-search-url-dollar-issue

Conversation

@simpleqt

@simpleqt simpleqt commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Fixes #7325

BrightDataSERPTool.get_search_url interpolated ${query} inside f-strings, so the three engine URLs (yandex/bing/google) carried a literal $ before the query — and the URL goes straight to the SERP request, so every search was malformed. Now interpolates {query} normally, verified by calling get_search_url directly.

(Note: this PR was prepared with AI assistance — happy to see it labeled llm-generated per the contributing guidelines.)

get_search_url interpolated ${query} inside an f-string, producing
URLs like https://www.bing.com/search?q=$test. The URL is passed
straight to the SERP request, so every search carried the malformed
query string.

Fixes crewAIInc#7325
Copilot AI lite review requested due to automatic review settings September 8, 2026 03:32

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 8fc5e28e-1414-40de-9a20-3a386d1a116b

📥 Commits

Reviewing files that changed from the base of the PR and between 1b855b4 and 55d2a4e.

📒 Files selected for processing (1)
  • lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_serp.py

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The BrightData SERP tool now generates Yandex, Bing, and Google search URLs with the raw query value instead of a leading dollar character.

Changes

BrightData search URL correction

Layer / File(s) Summary
Search URL interpolation
lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_serp.py
get_search_url now inserts the raw query value into Yandex, Bing, and Google search URLs.

Priority: ➖ Normal — Impact reflects medium issue severity.

Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to 55d2a

BrightData Yandex, Bing, and Google searches now send the intended query text rather than a dollar-prefixed query. No current merge-blocking risk remains.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 1 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the primary fix: removing the stray dollar sign from BrightData search URLs.
Description check ✅ Passed The description links issue #7325, explains the cause and fix, and records direct verification. It does not include the template's explicit Additional context section or checkbox results, but the requ…
Linked Issues check ✅ Passed The changes satisfy issue #7325 by replacing ${query} with {query} for Yandex, Bing, and Google URLs. This removes the stray dollar sign and prevents malformed SERP requests.
Out of Scope Changes check ✅ Passed The pull request changes only the targeted BrightData search URL interpolation. No unrelated code changes are identified.
  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Vidit-Ostwal Vidit-Ostwal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good — ${query} in those f-strings is a literal $, so every Bright Data SERP URL was malformed. Dropping it on Google/Bing/Yandex is the right fix.

I'll merge this. The older overlapping PR (#5518) is being closed in favor of this one.

@Vidit-Ostwal Vidit-Ostwal self-assigned this Sep 8, 2026
@Vidit-Ostwal
Vidit-Ostwal enabled auto-merge (squash) September 8, 2026 04:55
@Vidit-Ostwal
Vidit-Ostwal merged commit 98c067c into crewAIInc:main Sep 8, 2026
55 checks passed
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.

[Bug]: BrightDataSERPTool search URLs carry a stray $ from ${query} f-string interpolation

3 participants