From 14e7cc603c5b5a1f1397b98499f16347d0ce36ec Mon Sep 17 00:00:00 2001 From: Christian Gunderman Date: Mon, 2 Mar 2026 14:03:17 -0800 Subject: [PATCH] fix(core): increase default headers timeout to 5 minutes to prevent undici timeouts Fixes an issue introduced in https://github.com/google-gemini/gemini-cli/pull/20441 where the `headersTimeout` was inadvertently lowered from Node's 5 minute default to 60 seconds, which caused nightly evaluations to fail with `HeadersTimeoutError: Headers Timeout Error (UND_ERR_HEADERS_TIMEOUT)`. --- packages/core/src/utils/fetch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/utils/fetch.ts b/packages/core/src/utils/fetch.ts index e0bb1f3378d..b3df0536140 100644 --- a/packages/core/src/utils/fetch.ts +++ b/packages/core/src/utils/fetch.ts @@ -8,7 +8,7 @@ import { getErrorMessage, isNodeError } from './errors.js'; import { URL } from 'node:url'; import { Agent, ProxyAgent, setGlobalDispatcher } from 'undici'; -const DEFAULT_HEADERS_TIMEOUT = 60000; // 60 seconds +const DEFAULT_HEADERS_TIMEOUT = 300000; // 5 minutes const DEFAULT_BODY_TIMEOUT = 300000; // 5 minutes // Configure default global dispatcher with higher timeouts