Baoyuantop commented on code in PR #12795:
URL: https://github.com/apache/apisix/pull/12795#discussion_r2621394011


##########
t/plugin/ai-proxy.t:
##########
@@ -671,3 +671,49 @@ POST /embeddings
 --- error_code: 200
 --- response_body_like eval
 qr/.*text-embedding-ada-002*/
+
+
+
+=== TEST 17: schema accepts 'logging' and ignores unknown 'logging_schema'
+--- config
+    location /t {
+        content_by_lua_block {
+            local plugin = require("apisix.plugins.ai-proxy")
+
+            local ok1, err1 = plugin.check_schema({
+                provider = "openai",
+                auth = { header = { apikey = "token" } },
+                options = { model = "gpt-4" },
+                logging = { summaries = true, payloads = false },
+            })
+
+            local ok2, err2 = plugin.check_schema({
+                provider = "openai",
+                auth = { header = { apikey = "token" } },
+                options = { model = "gpt-4" },
+                logging_schema = { summaries = true },
+            })

Review Comment:
   Shouldn't this be checking for failures? Why is the test result "ok"?



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