Skip to content

fix(sse): scope type-only context errors in combo streams - #15597

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
insoln:fix/combo-context-length-scoped
Oct 6, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.52from
insoln:fix/combo-context-length-scoped

Conversation

@insoln

@insoln insoln commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor

Problem

Responses SSE response.failed events can report context exhaustion in error.type without an error.code. The stream normalizer maps these events to HTTP 400, but the combo quality classifier previously checked only error.code when deciding whether the failure was request-scoped. As a result, a deterministic input error could be treated as retryable, sent to another connection for the same model, or counted as a model failure.

Change

Recognize context_length_exceeded and context_window_exceeded in either error.type or error.code as request-scoped failures. This keeps combo classification aligned with the existing HTTP status normalization; transient upstream errors retain their existing retry behavior. The regression covers both type-only Responses SSE error variants and asserts HTTP 400, requestScoped: true, and retryable: false.

Fixes #15584

⚠️ base-red inherited: #15306

Responses SSE failures can report context exhaustion in error.type without error.code. Treat those values as request-scoped, matching the stream normalizer.

Fixes diegosouzapw#15584
@insoln
insoln requested a review from diegosouzapw as a code owner October 5, 2026 22:21
@diegosouzapw
diegosouzapw merged commit 3bb5259 into diegosouzapw:release/v3.8.52 Oct 6, 2026
51 of 97 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.

fix(resilience): classify type-only context errors in Responses SSE as request-scoped

2 participants