fix(core): increase default headers timeout to 5 minutes#20890
fix(core): increase default headers timeout to 5 minutes#20890gundermanc merged 1 commit intomainfrom
Conversation
…ndici timeouts Fixes an issue introduced in #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)`.
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request addresses a critical timeout regression that was causing failures in operations requiring extended response times, such as nightly evaluations and complex model queries. By restoring the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request correctly addresses a timeout issue by increasing the DEFAULT_HEADERS_TIMEOUT from 60 seconds to 5 minutes (300,000 ms). This change, made in packages/core/src/utils/fetch.ts, restores the intended timeout duration that was inadvertently shortened in a previous update, aligning it with the DEFAULT_BODY_TIMEOUT. The fix directly resolves the problem of premature timeouts for long-running model generation requests.
|
Size Change: -2 B (0%) Total Size: 25.8 MB ℹ️ View Unchanged
|

This PR fixes a timeout issue introduced in #20441
Issue:
The previous PR inadvertently set the default
headersTimeoutfor theundiciglobal dispatcher to 60 seconds (60,000 ms). This overridden Node.js's native default of 5 minutes (300,000 ms), causing nightly evaluations and long-running context queries to fail abruptly withHeadersTimeoutError: Headers Timeout Error(UND_ERR_HEADERS_TIMEOUT).Fix:
This PR restores the 5-minute timeout window by increasing
DEFAULT_HEADERS_TIMEOUTto 300,000 ms, ensuring complex model generation requests have sufficient time to return their initial response headers.