fix - #1636
Conversation
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review statusThanks for contributing. This comment tracks the review sequence and the next action. Current step: Fix the failing required CI checks; awaiting-maintainer requires CI and automated review completion. Review-state labels are managed by this workflow; do not edit them manually. |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Related GitHub Issue
Closes: # 1407
Description
This PR fixes the TypeError: terminated / UND_ERR_BODY_TIMEOUT error that occurs when OpenAI-compatible provider requests run longer than 5 minutes (e.g., when the agent writes directly to a file, generating long tool calls, or reasoning chains with large models like Qwen3.8 27B).
VS Code bundles its own internal version of undici with a hardcoded 300-second bodyTimeout default. This silently overrides the user-configured apiRequestTimeout (default 600s) at the Node.js fetch layer, causing requests to be forcefully terminated after exactly 5 minutes of idle body streaming.
Test Procedure
Manual testing:
Pre-Submission Checklist
*.visual.tsxsnapshot inwebview-ui/. Seewebview-ui/AGENTS.md→ "When a UI change needs a snapshot".Documentation Updates
Does this PR necessitate updates to user-facing documentation?
Additional Notes
resolveTimeoutMs()helper ensures backward compatibility: if the setting is unset or0, we fall back toDEFAULT_TIMEOUT_MSrather than letting the OpenAI SDK/undici use their own defaults.openai.ts.Summary by CodeRabbit