nic-6443 opened a new pull request, #13229:
URL: https://github.com/apache/apisix/pull/13229

   When a protocol converter is active (e.g., Anthropic-to-OpenAI) and the 
upstream returns SSE events in an unexpected format that the target protocol 
parser cannot parse, the gateway crashes with a 500 error in the balancer phase.
   
   **Root cause**: if the target protocol SSE parser skips all upstream events 
(unrecognized format), no output is ever sent to the client via `ngx.print()`. 
The response never gets committed, so nginx falls through to `proxy_pass` → 
balancer phase, which crashes on nil `upstream_conf`.
   
   **Fix**: track whether any output was produced during converter-mode 
streaming in `parse_streaming_response`. If the entire stream is consumed 
without producing any output, return 502 (Bad Gateway) with a descriptive error 
instead of letting nginx fall through to the balancer.
   
   This is scoped to converter mode only — passthrough streaming is not 
affected.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to