Skip to content

fix: update brave search tool param name#4396

Open
jonathansampson wants to merge 2 commits intocrewAIInc:mainfrom
jonathansampson:fixes-brave-search-api-param-name
Open

fix: update brave search tool param name#4396
jonathansampson wants to merge 2 commits intocrewAIInc:mainfrom
jonathansampson:fixes-brave-search-api-param-name

Conversation

@jonathansampson
Copy link
Contributor

@jonathansampson jonathansampson commented Feb 6, 2026

The Brave Search API web endpoint uses a parameter named search_lang, rather than search_language.

Source: https://api-dashboard.search.brave.com/api-reference/web/search/get


Note

Low Risk
Small, localized parameter rename affecting only Brave Search request construction; main risk is breaking callers still sending search_language.

Overview
Fixes Brave Search web requests to use the API’s expected language parameter name by renaming search_language to search_lang in the tool input schema and in the request payload construction.

This is an API compatibility change; callers must now pass search_lang (not search_language) for language filtering to take effect.

Written by Cursor Bugbot for commit c9ff17f. 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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

This is the final PR Bugbot will review for you during this billing cycle

Your free Bugbot reviews will reset on February 28

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.

description="Country code for geo-targeting (e.g., 'US', 'BR').",
)
search_language: str | None = Field(
search_lang: str | None = Field(
Copy link

Choose a reason for hiding this comment

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

tool.specs.json not updated to match renamed parameter

Medium Severity

The auto-generated tool.specs.json still references the old parameter name search_language, while the schema field was renamed to search_lang in BraveSearchToolSchema. Any downstream consumers of the spec file will see a stale parameter name that doesn't match the actual tool schema. The spec file needs to be regenerated via generate_tool_specs.py to stay in sync.

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