Files
codex/codex-rs
Charlie Marsh d9446b4b01 Treat invalid access program stream errors as terminal (#60481)
## Why

An `invalid_access_program` or `unsupported_access_program` streaming error should end the stream immediately, even if a later `response.completed` event arrives or the error includes a retry header.

## What changed

Map both error codes to `ApiError::InvalidRequest` and stop processing the response stream on invalid requests. Preserve a nonblank provider message, falling back to an explanation that the requested access program cannot be used with the model.

## Testing

Extend the terminal-error test to cover both codes in `error` and `response.failed` events, verifying that retry headers are ignored and the stream ends before a later completion event.

GitOrigin-RevId: 5431a2babec64eae5cdf6c138b98e91e84778e79
2026-11-10 00:55:01 +00:00
..
…
…
…
…