Skip to content

fix(openai): classify a rate limit reported mid-stream as transient - #776

Merged
lexoliu merged 1 commit into
mainfrom
fix/775-stream-rate-limit
Nov 12, 2026
Merged

lexoliu merged 1 commit into
mainfrom
fix/775-stream-rate-limit

Conversation

@lexoliu

@lexoliu lexoliu commented Nov 12, 2026

Copy link
Copy Markdown
Collaborator

Responses error and response.failed events now keep their code, read from response.error on response.failed as the API places it, and rate_limit_exceeded is transient wherever it arrives, so the caller's retry policy handles a limit reported after the stream started. A scripted-server test covers both Responses events and the chat-completions error object; aither-openai's clippy and tests pass.

Closes #775

The Responses `error` and `response.failed` events kept only their
message, so every failure they reported was permanent and a rate limit
that resets in seconds ended the run. Both now keep their code (the
failure sits under `response.error` on `response.failed`), and
`rate_limit_exceeded` classifies as transient wherever it arrives.

Closes #775
@lexoliu
lexoliu added this pull request to the merge queue Nov 12, 2026
Merged via the queue into main with commit 766b2d2 Nov 12, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

aither-openai: a rate limit reported mid-stream is classified as permanent

1 participant