Adam Perry @ OpenAI
44dd77b71e
Honor Retry-After headers in failed Responses events ( #50418 )
...
## Why
Streamed `response.failed` events can carry retry advice in `response.error.headers`. Ignoring it loses server-provided delays or uses a conflicting delay from a rate-limit message.
## What changed
- Parse nested `Retry-After` headers using the existing HTTP header validation and retry parser, and preserve them for rate-limit, overload, and generic retryable failures.
- Prefer valid headers over rate-limit message advice, falling back to the message when the header is absent or invalid. Keep terminal error classifications unchanged.
- Reject unrepresentable plaintext retry durations without panicking.
## Testing
Add regression coverage for header precedence, validation, and terminal errors, plus retry-loop coverage for SSE sampling, remote compaction, and WebSocket failures.
GitOrigin-RevId: 46433c2e9e6d5e804211ef96950fadd70e322b49
2026-10-02 20:19:28 +00:00
..
2026-10-02 04:02:14 +00:00
2026-09-29 22:50:07 +00:00
2026-09-30 17:33:59 +00:00
2026-09-30 05:29:56 +00:00
2026-09-30 00:51:39 +00:00
2026-10-02 17:40:09 +00:00
2026-09-26 23:17:41 +00:00
2026-10-01 18:05:05 +00:00
2026-10-02 18:48:49 +00:00
2026-09-22 06:36:09 +00:00
2026-10-02 16:05:51 +00:00
2026-08-20 08:10:08 +00:00
2026-10-01 15:57:03 +00:00
2026-09-18 00:25:37 +00:00
2026-09-21 22:58:49 +00:00
2026-09-23 00:47:34 +00:00
2026-09-25 00:20:02 +00:00
2026-09-30 18:49:29 +00:00
2026-10-02 06:23:25 +00:00
2026-10-01 22:32:29 +00:00
2026-09-29 13:58:09 +00:00
2026-09-29 03:32:19 +00:00
2026-08-28 19:44:50 +00:00
2026-09-25 16:57:42 +00:00
2026-10-01 15:57:03 +00:00
2026-09-25 15:42:35 +00:00
2026-09-25 20:34:52 +00:00
2026-10-02 20:19:28 +00:00
2026-09-25 00:20:02 +00:00
2026-09-24 01:50:36 +00:00
2026-05-07 15:44:17 -07:00
2026-10-01 17:10:03 +00:00
2026-10-02 16:37:30 +00:00
2026-10-02 20:19:28 +00:00
2026-10-01 03:31:48 +00:00
2026-09-23 22:20:34 +00:00
2026-10-01 15:57:03 +00:00
2026-08-07 11:30:17 +00:00
2026-09-05 12:17:32 +00:00
2026-10-02 16:55:41 +00:00
2026-10-02 04:25:52 +00:00
2026-10-02 04:25:52 +00:00
2026-08-17 04:37:50 +00:00
2026-10-02 10:44:29 +00:00
2026-09-30 11:59:13 +00:00
2026-10-01 21:05:10 +00:00
2026-10-01 04:04:44 +00:00
2026-10-01 09:52:54 +00:00
2026-10-01 00:43:55 +00:00
2026-10-01 15:57:03 +00:00
2026-10-01 14:48:02 +00:00
2026-10-02 16:55:41 +00:00
2026-10-01 11:01:37 +00:00
2026-10-01 22:32:29 +00:00
2026-09-11 21:59:24 +00:00
2026-09-29 22:24:09 +00:00
2026-10-01 18:05:33 +00:00
2026-10-01 15:57:03 +00:00
2026-09-28 14:46:32 +00:00
2026-09-28 06:30:53 +00:00
2026-10-01 15:57:03 +00:00
2026-09-29 18:50:36 +00:00
2026-10-01 01:38:27 +00:00
2026-10-01 18:05:05 +00:00
2026-10-01 18:05:05 +00:00
2026-09-30 17:45:25 +00:00
2026-09-23 22:20:34 +00:00
2026-09-29 01:14:41 +00:00
2026-10-02 18:48:49 +00:00
2026-10-01 15:57:03 +00:00
2026-09-29 01:14:41 +00:00
2026-08-21 16:45:05 +00:00
2026-10-02 05:25:51 +00:00
2026-10-01 11:09:12 +00:00
2026-10-02 18:48:49 +00:00
2026-10-01 15:57:03 +00:00
2026-05-26 20:59:47 -07:00
2026-09-24 18:08:31 +00:00
2026-09-28 15:58:17 +00:00
2026-09-27 03:26:57 +00:00
2026-10-01 19:55:36 +00:00
2026-10-02 00:46:14 +00:00
2026-05-07 15:44:17 -07:00
2026-10-02 06:50:10 +00:00
2026-10-02 18:48:49 +00:00
2026-10-01 06:29:03 +00:00
2026-10-02 20:04:57 +00:00
2026-10-01 18:05:05 +00:00
2026-10-01 18:05:05 +00:00
2026-10-01 15:57:03 +00:00
2026-09-23 04:25:28 +00:00
2026-09-22 23:37:39 +00:00
2026-10-01 18:05:05 +00:00
2026-10-01 18:05:05 +00:00
2026-09-23 00:47:07 +00:00
2026-10-01 15:57:03 +00:00
2026-10-02 04:02:14 +00:00
2026-10-02 04:02:14 +00:00
2026-10-02 04:02:14 +00:00