nic-6443 commented on issue #13447:
URL: https://github.com/apache/apisix/issues/13447#issuecomment-4676897245
This is confirmed and already fixed on master, though the fix hasn't shipped
in a release yet. The regression came in via #12530 (first released in 3.14.0),
which moved ai-request-rewrite onto the shared ai-driver response path — that
path ends in `plugin.lua_response_filter`, which sends the LLM output straight
to the client, so the upstream was never contacted. The `{"data":"..."}` body
you saw is the plugin's own wrapper from `parse_llm_response`, not your
upstream's response.
The AI proxy refactor in #13170 restored the documented behavior: on current
master, `apisix/plugins/ai-request-rewrite.lua` extracts the LLM content and
calls `ngx.req.set_body_data()` again, so the rewritten body is forwarded to
your configured upstream. Affected releases are 3.14.0 through 3.16.0; until
the next release you can stay on 3.13.x or build from master. The code on
master is already correct, so this can probably be closed once a maintainer
confirms.
--
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]