avnijainnn opened a new pull request, #14006:
URL: https://github.com/apache/apisix/pull/14006

   ### Description
   
   `ai-prompt-guard` currently returns HTTP 200 when no messages are selected 
for checking. Since returning a status code terminates plugin processing, the 
request does not continue to the upstream and clients receive an empty 200 
response.
   
   This PR changes the empty-message path to use a bare `return`, allowing the 
request to continue upstream as intended.
   
   It also adds regression coverage for:
   - a system-only request when `match_all_roles` is false
   - an OpenAI embeddings request with array `input`
   
   The targeted `ai-prompt-guard` test suite passes with 175 tests.
   
   #### Which issue(s) this PR fixes:
   
   Fixes #13944
   
   ### 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
   - [ ] I have updated the documentation to reflect this change
   - [x] I have verified that this change is backward compatible (If not, 
please discuss on the [APISIX mailing 
list](https://github.com/apache/apisix/tree/master#community) first)
   
   Documentation update is not required because this change only corrects the 
existing pass-through behavior and does not introduce any new configuration or 
user-facing API.


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