← Back to PRs

#16417: feat(web-search): enable Brave text_decorations by default

by ciberponk open 2026-02-14 18:43 View on GitHub →
agents size: XS
## 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