Enable automatic web search by default; improve toggle behavior and search planning.
CI / check (22) (push) Successful in 9m35s
CI / check (24) (push) Successful in 9m34s

This commit is contained in:
2026-10-06 08:50:03 +02:00
parent 674abf78f6
commit 7be654af11
17 changed files with 300 additions and 54 deletions
+6 -1
View File
@@ -24,7 +24,12 @@ test("thinking streams separately and survives reload, retry, branch and import"
modelApiBaseUrl: "http://fixture", modelRequestTimeoutMs: 1000, modelUnloadAfterMs: 60000
}, {
fetch: async (_url, options) => {
requests.push(JSON.parse(options.body));
const body = JSON.parse(options.body);
if (body.format?.properties?.search) {
const {message} = JSON.parse(body.messages.at(-1).content);
return new Response(JSON.stringify({message: {content: JSON.stringify({search: message.includes("latest news"), query: message})}, done: true}));
}
requests.push(body);
const chunks = [
'{"message":{"thinking":"Consider "}}\n{"message":{"thi',
'nking":"carefully.","content":""}}\n',