Commit Graph

4 Commits

Author SHA1 Message Date
sususu98
7dd360d9a2 fix(codex): preserve Retry-After headers on inferred WebSocket statuses 2026-11-16 17:14:51 +08:00
sususu98
5a373ede5b fix(codex,openai): preserve nested WS error headers and honor explicit SSE event types
- Read nested body/error HTTP status codes in parseCodexWebsocketErrorWithCooling and clearCodexReasoningReplayOnWebsocketError so Retry-After and request headers are preserved on typeless WebSocket errors.
- Guard responsesSSEPayloadHasError and SSE error inference behind explicit event/payload type checks so non-error frames such as response.metadata containing body.error are not rewritten into terminal errors.
2026-11-16 14:09:15 +08:00
sususu98
80e8350c95 fix(openai,codex): build stream errors via ojson.Doc and preserve SSE status
- Build OpenAI Responses stream error and failed chunks directly through ojson.Doc with single-exit serialization, supporting scalar error strings without map mutations.
- Preserve valid top-level and body envelope HTTP error status codes when normalizing typeless Codex SSE failures and Responses SSE frames.
- Normalize scalar and blank WebSocket error fields purely via ojson.Doc.
2026-11-16 13:50:58 +08:00
sususu98
20df0c25b2 fix(codex): preserve string errors and recognize untyped failures
Normalize string websocket errors without discarding their messages. Recognize untyped and body-wrapped failures across SSE, websocket, and duplex paths while retaining status, headers, and sequence numbers.

Cover transport and format combinations, replay invalidation, credential status precedence, and Responses framing with regression tests.
2026-11-16 12:28:56 +08:00