nic-6443 commented on code in PR #13323:
URL: https://github.com/apache/apisix/pull/13323#discussion_r3166550034


##########
apisix/plugins/ai-providers/base.lua:
##########
@@ -384,6 +385,7 @@ function _M.parse_streaming_response(self, ctx, res, 
target_proto, converter, co
             res._httpc:close()
             res._httpc = nil
         end
+        res._upstream_bytes = bytes_read
         ctx.var.llm_request_done = true
     end

Review Comment:
   Fixed — moved `local bytes_read = 0` above the `abort_on_disconnect` 
function definition so the closure captures the correct local upvalue.



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