feat: add ai-aliyun-content-moderation plugin#12530
Merged
Revolyssup merged 14 commits intoAug 26, 2025
Merged
Conversation
Revolyssup
marked this pull request as draft
August 18, 2025 08:28
Revolyssup
marked this pull request as ready for review
August 21, 2025 07:41
Revolyssup
marked this pull request as draft
August 22, 2025 06:29
Revolyssup
marked this pull request as ready for review
August 22, 2025 07:57
Revolyssup
commented
Aug 22, 2025
| }, | ||
| "auth": {"header": {"Authorization": "Bearer token"}}, | ||
| "options": {"model": "gpt-4"}, | ||
| "override": {"endpoint": "http://localhost:16724"}, |
Contributor
Author
There was a problem hiding this comment.
These changes are to fix this CI which fails due to large inline lua code
https://github.com/apache/apisix/actions/runs/17150713809/job/48659248386?pr=12530
5 tasks
nic-6443
previously approved these changes
Aug 25, 2025
membphis
previously approved these changes
Aug 25, 2025
AlinsRan
reviewed
Aug 25, 2025
AlinsRan
reviewed
Aug 25, 2025
AlinsRan
approved these changes
Aug 26, 2025
nic-6443
approved these changes
Aug 26, 2025
jizhuozhi
pushed a commit
to jizhuozhi/apisix
that referenced
this pull request
Oct 18, 2025
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
lua_response_filterwhich runslua_body_filteras defined by each plugin. We can't usebody_filterdirectly because in case of ai response, the responses are managed directly by apisix, therefore this new phase is introduced.ai-request-rewriteplugin to leverage lua_body_filter for writing response. This way is cleaner to read as all response modification for the ai plugins happens at one placelua_response_filterand each plugin just has a callback to take headers, body and return code,body.