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

   ### Description
   
   Follow-up to the truncated-stream fix: it gated the terminator synthesis in 
both `ai-aws-content-moderation` and `ai-aliyun-content-moderation` on 
`ctx.ai_stream_aborted`, but the regression suite that came with it only 
configured the aliyun plugin. The AWS branch was changed without a test that 
fails before the gate and passes after — the existing AWS suite exercises 
synthesis, never with `ctx.ai_stream_aborted` set.
   
   This adds the AWS counterpart of the aliyun case to 
`t/plugin/ai-proxy-stream-truncated.t`: an upstream that delivers a content 
event and a usage event and then loses the transport, with 
`ai-aws-content-moderation` in `final_packet` mode. It asserts the content is 
annotated and released to the client and that no `[DONE]` is appended to the 
truncated stream. Removing the `not ctx.ai_stream_aborted` gate makes it fail.
   
   The Comprehend stand-in answers one clean verdict per submitted segment, 
which is all the terminator branch needs; the verdict itself is not what is 
under test, so it does not reuse the fixture-driven mock from the AWS suite.
   
   Test-only change; no plugin code is touched.
   
   ### Checklist
   
   - [x] I have explained the need for this PR and the problem it solves
   - [x] I have explained the changes or the new features added to this PR
   - [x] I have added tests corresponding to this change
   - [x] I have verified that this change is backward compatible
   


-- 
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