You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 00:50:51 UTC

[I] [BUG] AiProxy stream retry replays the whole upstream, duplicating SSE content [shenyu]

Aias00 opened a new issue, #6647:
URL: https://github.com/apache/shenyu/issues/6647

   - severity: High
   - files: `shenyu-plugin/shenyu-plugin-ai/shenyu-plugin-ai-proxy/src/main/java/org/apache/shenyu/plugin/ai/proxy/enhanced/service/AiProxyExecutorService.java:88-115`; consumption at `AiProxyPlugin.java:171-182`
   - description: `executeStream` wraps `doChatStream` in `Retry.max(1)` then `.onErrorResume(NonTransientAiException.class, handleFallbackStream)`. When the upstream stream errors AFTER emitting some chunks, Reactor `retryWhen` re-subscribes, issuing a brand-new upstream call emitting from the beginning. Those first-attempt chunks were already written to the client SSE response, so the client receives `[partial attempt-1][full attempt-2]`.
   - impact: Corrupted/duplicated AI completions for streaming calls that hit a mid-stream error; non-idempotent streaming calls are replayed.
   - suggested_fix: For streaming, do not blanket-retry mid-stream; retry only before any emission (buffer-first) or fail and let the client reconnect.
   - confidence: High
   - related_existing: none — #6575/#6583 concern the generic retry plugin, not the AI-proxy `executeStream` Flux replay.
   
   ---
   _Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/00-consolidated-critical-high.md`](docs/scan2-2026-08-02/00-consolidated-critical-high.md)._


-- 
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: notifications-unsubscribe@shenyu.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] AiProxy stream retry replays the whole upstream, duplicating SSE content [shenyu]

Posted by "Aias00 (via GitHub)" <gi...@apache.org>.
Aias00 closed issue #6647: [BUG] AiProxy stream retry replays the whole upstream, duplicating SSE content
URL: https://github.com/apache/shenyu/issues/6647


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [BUG] AiProxy stream retry replays the whole upstream, duplicating SSE content [shenyu]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6647:
URL: https://github.com/apache/shenyu/issues/6647#issuecomment-5161210820

   👋 Hello @Aias00
   
   A new issue has been opened by @Aias00:
   - **Title**: [BUG] AiProxy stream retry replays the whole upstream, duplicating SSE content
   - **Link**: https://github.com/apache/shenyu/issues/6647
   
   Please review when you have time. Thank you! 🙏


-- 
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: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org