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


##########
apisix/plugins/ai-drivers/openai-base.lua:
##########
@@ -45,8 +45,26 @@ local HTTP_INTERNAL_SERVER_ERROR = 
ngx.HTTP_INTERNAL_SERVER_ERROR
 local HTTP_GATEWAY_TIMEOUT = ngx.HTTP_GATEWAY_TIMEOUT
 
 
-function _M.new(opt)
-    return setmetatable(opt, mt)
+local function merge_request_query_params(ctx, query_params)
+    if ctx.var.is_args == "?" and ctx.var.args and #ctx.var.args > 0 then
+        local req_args_tab = core.string.decode_args(ctx.var.args)
+        if type(req_args_tab) == "table" then
+            core.table.merge(query_params, req_args_tab)
+        end
+    end
+end
+
+
+function _M.new(opts)
+    local self = {

Review Comment:
   Is this change necessary? It breaks the original transparent pass-through 
mechanism—now only explicitly listed fields are passed through.



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