Repository navigation
fix(tls): cap non-streaming responses at 10 MB - #16769
Merged
diegosouzapw merged 1 commit intoOct 16, 2026
Merged
diegosouzapw merged 1 commit into
diegosouzapw merged 1 commit into
Conversation
maxmad64bis
force-pushed
the
fix/tls-nonstreaming-reponses-sans-borne
branch
from
October 15, 2026 20:24
53a9afc to
9d8e861
Compare
maxmad64bis
marked this pull request as ready for review
October 15, 2026 20:50
diegosouzapw
pushed a commit
that referenced
this pull request
Oct 16, 2026
Local board on origin/release/v3.8.52 (ad37e8f) in `.claude/worktrees/maxmad-wave2`, together with #16759, #16760, #16769, #16773, #16786, and #16793. The combined tree passed `check-file-size` and `check-changelog-integrity`. The health matrix leaves idle models out of the default payload and still counts them in `omittedIdleModelCount`. `includeIdleModels=true` brings the lines back. Focused file: `provider-health-matrix.test.ts`.⚠️ base-red inherited: #15306 Thank you @maxmad64bis.
diegosouzapw
merged commit Oct 16, 2026
47550c4
into
diegosouzapw:release/v3.8.52
44 of 55 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Non-streamed TLS replies buffer with no size cap, so one huge upstream body can exhaust process memory. The reader loop adds each chunk without counting bytes, and it ignores a large declared content length. Buffered bodies now stop at 10 MB with a short JSON error.
Related Issues
Target Branch
release/v3.8.xbranch (the highest openrelease/v*), notmainv4-featurelabel for the v4 channelValidation
npm run lintTests Added Or Updated
tests/unit/tls-nonstreaming-response-limit.test.ts— 12 cases: 11 MB bodies get the bounded error, 1 MB bodies read unchanged, streamed replies pass through, and error statuses keep their status.Coverage Notes
open-sse/services/tlsClientBase.tsis covered bytests/unit/tls-nonstreaming-response-limit.test.ts(12 cases across the late-first-byte, non-2xx, non-SSE, native text and native byte paths).Reviewer Notes