Commit 554258f
committed
bug #1170 [Agent][Brave] Make field
This PR was merged into the main branch.
Discussion
----------
[Agent][Brave] Make field `description` optional
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no <!-- please update src/**/CHANGELOG.md files -->
| Docs? | no <!-- required for new features -->
| Issues | not applicable <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
The `Brave` tool fails when the Brave Search API returns results without a `description` field. According to the [Brave API documentation](https://api-dashboard.search.brave.com/app/documentation/web-search/responses), the `description` field is **optional**, but the current implementation assumes it's always present.
**Error**: `Undefined array key "description"` wrapped in `ToolExecutionException`
**User-visible error**: `"An error occurred while executing tool \"brave_search\"."`
Commits
-------
6582ae2 fix(brave): make field 'description' nullabledescription optional (daFish)2 files changed
+28
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
67 | 89 | | |
0 commit comments