Re: [PR] fix(ai-proxy-multi): dead loop when retrying [apisix]

2025-03-02 Thread via GitHub


shreemaan-abhishek merged PR #12012:
URL: https://github.com/apache/apisix/pull/12012


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



Re: [PR] fix(ai-proxy-multi): dead loop when retrying [apisix]

2025-03-01 Thread via GitHub


membphis commented on code in PR #12012:
URL: https://github.com/apache/apisix/pull/12012#discussion_r1976529890


##
apisix/plugins/ai-proxy-multi.lua:
##
@@ -215,7 +215,7 @@ local function proxy_request_to_llm(conf, request_table, 
ctx)
 local ai_driver = require("apisix.plugins.ai-drivers." .. provider)
 local res, err, httpc = ai_driver:request(conf, request_table, extra_opts)
 if not res then
-if (ctx.balancer_try_count or 0) < 1 then
+if (ctx.ai_balancer_try_count or 0) < 2 then

Review Comment:
   we can implement this feature later



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



Re: [PR] fix(ai-proxy-multi): dead loop when retrying [apisix]

2025-03-01 Thread via GitHub


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


##
apisix/plugins/ai-proxy-multi.lua:
##
@@ -215,7 +215,7 @@ local function proxy_request_to_llm(conf, request_table, 
ctx)
 local ai_driver = require("apisix.plugins.ai-drivers." .. provider)
 local res, err, httpc = ai_driver:request(conf, request_table, extra_opts)
 if not res then
-if (ctx.balancer_try_count or 0) < 1 then
+if (ctx.ai_balancer_try_count or 0) < 2 then

Review Comment:
   @membphis Do we need to make the number of retries a plugin configuration?



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



[PR] fix(ai-proxy-multi): dead loop when retrying [apisix]

2025-03-01 Thread via GitHub


shreemaan-abhishek opened a new pull request, #12012:
URL: https://github.com/apache/apisix/pull/12012

   ### Description
   
   
   
   
   Fixes # (issue)
   
   ### Checklist
   
   - [ ] I have explained the need for this PR and the problem it solves
   - [ ] I have explained the changes or the new features added to this PR
   - [ ] I have added tests corresponding to this change
   - [ ] I have updated the documentation to reflect this change
   - [ ] 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)
   
   
   


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