fix: GPT-5.6 SSE streams truncated through /v1/responses (chunk framing, raw identity passthrough, gzip window) (#988)

This commit is contained in:
Valentin 2026-07-16 09:23:09 +02:00 committed by GitHub
parent 9015f48c46
commit 80bb044857
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 684 additions and 26 deletions

View file

@ -196,7 +196,11 @@ static_resources:
name: decompress
typed_config:
"@type": "type.googleapis.com/envoy.extensions.compression.gzip.decompressor.v3.Gzip"
window_bits: 9
# Must be >= the window_bits of whatever compressed the response
# (upstreams use 15; our compressor uses 10). A smaller inflate window
# makes zlib silently stop emitting data mid-stream, truncating SSE
# responses after the first few KB. 15 handles any compliant gzip.
window_bits: 15
chunk_size: 8192
# If this ratio is set too low, then body data will not be decompressed completely.
max_inflate_ratio: 1000
@ -361,7 +365,11 @@ static_resources:
name: decompress
typed_config:
"@type": "type.googleapis.com/envoy.extensions.compression.gzip.decompressor.v3.Gzip"
window_bits: 9
# Must be >= the window_bits of whatever compressed the response
# (upstreams use 15; our compressor uses 10). A smaller inflate window
# makes zlib silently stop emitting data mid-stream, truncating SSE
# responses after the first few KB. 15 handles any compliant gzip.
window_bits: 15
chunk_size: 8192
# If this ratio is set too low, then body data will not be decompressed completely.
max_inflate_ratio: 1000
@ -442,7 +450,11 @@ static_resources:
name: decompress
typed_config:
"@type": "type.googleapis.com/envoy.extensions.compression.gzip.decompressor.v3.Gzip"
window_bits: 9
# Must be >= the window_bits of whatever compressed the response
# (upstreams use 15; our compressor uses 10). A smaller inflate window
# makes zlib silently stop emitting data mid-stream, truncating SSE
# responses after the first few KB. 15 handles any compliant gzip.
window_bits: 15
chunk_size: 8192
# If this ratio is set too low, then body data will not be decompressed completely.
max_inflate_ratio: 1000
@ -577,6 +589,12 @@ static_resources:
name: decompress
typed_config:
"@type": "type.googleapis.com/envoy.extensions.compression.gzip.decompressor.v3.Gzip"
# Must be >= the window_bits of whatever compressed the response
# (upstreams use 15; our compressor uses 10; Envoy's default here is
# only 12). A smaller inflate window makes zlib silently stop emitting
# data mid-stream, truncating SSE responses after the first few KB.
# 15 handles any compliant gzip.
window_bits: 15
chunk_size: 8192
# If this ratio is set too low, then body data will not be decompressed completely.
max_inflate_ratio: 1000