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


##########
t/plugin/ai-request-rewrite.t:
##########
@@ -668,7 +592,7 @@ passed
                             },
                             "provider": "openai",
                             "override": {
-                                "endpoint": 
"http://localhost:6724/internalservererror";
+                                "endpoint": 
"http://127.0.0.1:1980/internalservererror";
                             },
                             "ssl_verify": false,

Review Comment:
   Already added internalservererror handler to t/lib/server.lua in previous 
commit.



##########
t/plugin/ai-rate-limiting.t:
##########
@@ -423,6 +316,7 @@ X-AI-RateLimit-Reset-ai-proxy-openai: 60
 ]
 --- more_header
 Authorization: Bearer token
+X-AI-Fixture: openai/chat-model-echo.json
 --- error_code eval

Review Comment:
   Good catch! Fixed in dc1b00e - changed to more_headers.



##########
t/plugin/ai-rate-limiting.t:
##########
@@ -528,6 +424,7 @@ X-AI-RateLimit-Reset-ai-proxy-openai: 45
 ]
 --- more_header
 Authorization: Bearer token
+X-AI-Fixture: openai/chat-model-echo.json
 --- error_code eval

Review Comment:
   Same fix applied in dc1b00e.



##########
t/plugin/ai-proxy-multi.t:
##########
@@ -250,9 +164,11 @@ passed
 --- request
 POST /anything
 { "messages": [ { "role": "system", "content": "You are a mathematician" }, { 
"role": "user", "content": "What is 1+1?"} ] }
---- error_code: 401
---- response_body
-Unauthorized
+--- more_headers
+X-AI-Fixture: openai/chat-basic.json
+--- error_code: 200
+--- response_body eval
+qr/\{ "content": "1 \+ 1 = 2\.", "role": "assistant" \}/

Review Comment:
   Good catch! Fixed in dc1b00e - now uses X-AI-Fixture-Status: 401 with 
openai/unauthorized.json to properly simulate upstream auth rejection.



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