#16417: feat(web-search): enable Brave text_decorations by default
agents
size: XS
Cluster:
Web Search Provider Enhancements
## Summary
- feat(web-search): enable Brave text_decorations by default
- Split from our `v2026.2.13` patch train as a single-purpose change for easier review.
## Why
- Keep the diff focused and low-risk so it can be merged or reverted independently.
## Scope
- Branch: `feat/brave-text-decorations-default-en`
- Files changed: 2
- Key files:
- `src/agents/tools/web-search.ts`
- `src/agents/tools/web-tools.enabled-defaults.e2e.test.ts`
## Test Plan
- Suggested local command:
- `./node_modules/.bin/vitest run src/agents/tools/web-tools.enabled-defaults.e2e.test.ts`
- Validation status:
- [ ] CI checks pass
- [ ] Maintainer re-ran local tests
## Risk & Rollback
- Risk: low to medium; impact limited to touched module(s).
- Rollback: revert this PR commit(s) cleanly.
## Co-authorship
- Co-authored by @ciberponk and Codex (GPT-5).
<!-- greptile_comment -->
<h3>Greptile Summary</h3>
This PR enables Brave Search API's `text_decorations` parameter by default, sending `text_decorations=1` on every Brave search request. This causes Brave to return `<b>`/`</b>` HTML tags around query-matching terms in result `title` and `description` fields, giving the LLM richer context about which parts of search snippets are most relevant.
- Single-line production change in `web-search.ts` adds the `text_decorations` query param unconditionally for the Brave provider
- New e2e test verifies the parameter is present in the outgoing request URL, following the same mock-fetch pattern as existing tests
- No stripping of the HTML bold tags occurs downstream — the decorated text is passed directly through `wrapWebContent` to the LLM, which is the intended behavior
<h3>Confidence Score: 5/5</h3>
- This PR is safe to merge — it's a minimal, well-tested, single-parameter addition to an existing API call.
- The change is a single line adding a hardcoded query parameter to the Brave Search API URL. It has a corresponding test. There are no logic changes, no new dependencies, no security implications (the param simply adds HTML bold tags to search snippets), and no risk of breakage. The HTML tags in results are acceptable for LLM consumption and pass through the existing content wrapping pipeline without issue.
- No files require special attention.
<sub>Last reviewed commit: 39672f5</sub>
<!-- greptile_other_comments_section -->
<!-- /greptile_comment -->
Most Similar PRs
#16416: feat(web-search): include Brave structured faq/discussions/infobox ...
by ciberponk · 2026-02-14
80.5%
#16413: feat(web-search): request and merge Brave extra_snippets
by ciberponk · 2026-02-14
78.8%
#19314: feat: add Brave web_search baseUrl override (AI-assisted)
by mrutunjay-kinagi · 2026-02-17
73.4%
#13843: feat(web-search): allow overriding Brave Search base URL
by strelov1 · 2026-02-11
70.8%
#23306: fix(web-search): hint at config validation failure in missing-key e...
by lbo728 · 2026-02-22
70.6%
#19084: fix: Brave Search baseUrl and Inter-session Message Role
by jackjin1997 · 2026-02-17
70.3%
#19031: fix(web-search): normalize ui_lang parameter for Brave Search API
by moxunjinmu · 2026-02-17
70.2%
#19298: feat(tools): add Brave LLM Context API mode for web_search
by RoccoFortuna · 2026-02-17
69.9%
#19042: Security: add URL allowlist for web_search and web_fetch
by smartprogrammer93 · 2026-02-17
69.8%
#19379: feat: increase Brave search MAX_SEARCH_COUNT to 20 (AI-assisted)
by liyishuai · 2026-02-17
69.2%