Files
codex/codex-rs/skills
Konstantine Kahadze 37594ab7cc Handle response body failures in OpenAI docs downloads (#55379)
## Why

Response body reads could outlive the manual download timeout or fail outside the existing fallback and retry handlers.

## What changed

- Read successful manual response bodies within the fetch timeout and transport fallback so stalled or failed reads fall back to `curl`. Leave `HEAD` responses unconsumed.
- Await model metadata response bodies inside the retry handler so read failures use the existing three-attempt retry loop.

## Testing

Add regression tests for manual body timeouts and truncated bodies falling back to `curl` before caching, plus model metadata body failures succeeding on retry or stopping after three attempts. All four tests pass with `node --test codex-rs/skills/tests/openai_docs_downloads.test.mjs`.

GitOrigin-RevId: 528595307ef86ad2522dc8ae488baadc001ad961
2026-10-19 21:01:44 +00:00
..