feat(brave): add http diagnostics flag

This commit is contained in:
Peter Steinberger
2026-05-02 07:45:54 +01:00
parent fa7de46261
commit 286e169a04
6 changed files with 190 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ Multiple flags:
```json
{
"diagnostics": {
"flags": ["telegram.http", "gateway.*"]
"flags": ["telegram.http", "brave.http", "gateway.*"]
}
}
```
@@ -111,6 +111,12 @@ Filter for Telegram HTTP diagnostics:
rg "telegram http error" /tmp/openclaw/openclaw-*.log
```
Filter for Brave Search HTTP diagnostics:
```bash
rg "brave http" /tmp/openclaw/openclaw-*.log
```
Or tail while reproducing:
```bash
@@ -122,6 +128,7 @@ For remote gateways, you can also use `openclaw logs --follow` (see [/cli/logs](
## Notes
- If `logging.level` is set higher than `warn`, these logs may be suppressed. Default `info` is fine.
- `brave.http` logs Brave Search request URLs/query params, response status/timing, and cache hit/miss/write events. It does not log API keys or response bodies, but search queries can be sensitive.
- Flags are safe to leave enabled; they only affect log volume for the specific subsystem.
- Use [/logging](/logging) to change log destinations, levels, and redaction.

View File

@@ -123,6 +123,7 @@ await web_search({
- `llm-context` mode supports `freshness` and bounded `date_after` + `date_before` ranges. It does not support `ui_lang`; `date_before` without `date_after` is rejected because Brave requires custom freshness ranges to include both start and end dates.
- `ui_lang` must include a region subtag like `en-US`.
- Results are cached for 15 minutes by default (configurable via `cacheTtlMinutes`).
- Enable the `brave.http` diagnostics flag to log Brave request URLs/query params, response status/timing, and search-cache hit/miss/write events while troubleshooting. The flag never logs the API key or response bodies, but search queries can be sensitive.
## Related