Add "Cache-Control: no-cache" header to brave api web search requests.

This commit is contained in:
Kuzey Cimen 2026-01-27 01:37:15 +00:00 committed by Kuzey Cimen
parent 3f83afe4a6
commit 0dc7b8bfc0

View File

@ -67,8 +67,8 @@ const WebSearchSchema = Type.Object({
type WebSearchConfig = NonNullable<MoltbotConfig["tools"]>["web"] extends infer Web
? Web extends { search?: infer Search }
? Search
: undefined
? Search
: undefined
: undefined;
type BraveSearchResult = {
@ -375,6 +375,7 @@ async function runWebSearch(params: {
method: "GET",
headers: {
Accept: "application/json",
"Cache-Control": "no-cache",
"X-Subscription-Token": params.apiKey,
},
signal: withTimeout(undefined, params.timeoutSeconds * 1000),