Files
CLIProxyAPI/internal/runtime/executor/helps
Luis Pater ce38c75c62 fix(claude): drain streamed response body after message_stop to reuse upstream connections
- Add NewDetachableContext in executor helpers so upstream requests follow downstream cancellation until message_stop and detach afterward before the handler cancels the request context.
- Close the output stream channel first and then drain up to 64 KiB of the remaining raw upstream response body to EOF so net/http returns completed streaming connections to the idle pool.
- Treat valid message_stop data lines in the translated streaming path as completion before translation so terminal-event cancellation does not abort connection pooling.

Closes: #7326
2026-11-07 21:39:22 +08:00
..