Repository navigation
fix(core): honor configured request timeout for response headers - #259
Merged
Merged
Conversation
This was referenced Oct 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When
--timeoutexceeds 300 seconds, Node fetch's independent response-header timeout can abort a request before the CLI deadline. Disable that lower-level header timer only for common HTTP requests already protected by the CLI timeout signal.Wrap the current dispatcher per request to preserve proxy and custom-dispatcher behavior. Keep body idle timeouts and unrelated fetch requests unchanged. Add five regression cases for delayed headers, deadline cancellation, dispatcher compatibility, body idle timeout, and bare-fetch isolation. Core reuses the existing Undici catalog version.
Validation
vp check: passed, with 3 existing warnings.pnpm --filter bailian-cli-core build: passed.The reported Token Plan failure has not been reproduced in live tests on CLI 2.1.0 or 2.3.0. This fixes the independently reproduced client timeout mismatch without claiming the reported service scenario is resolved.
Refs #239