diff --git a/kong/plugins/ai-response-transformer/handler.lua b/kong/plugins/ai-response-transformer/handler.lua index d4535b37e6d5..cc223a4c0ce8 100644 --- a/kong/plugins/ai-response-transformer/handler.lua +++ b/kong/plugins/ai-response-transformer/handler.lua @@ -116,6 +116,10 @@ function _M:access(conf) res_body = kong_utils.inflate_gzip(res_body) end + if kong.ctx.shared.ai_request then + kong.ctx.shared.parsed_response = res_body + end + -- if asked, introspect the request before proxying kong.log.debug("introspecting response with LLM")