This is an automated email from the ASF dual-hosted git repository. nic-6443 pushed a commit to branch feat/ai-proxy-llm-options-and-request-body in repository https://gitbox.apache.org/repos/asf/apisix.git
commit 015f812eb53a1b7d2f44e9f172a282abe2436dbe Author: Nic <[email protected]> AuthorDate: Tue Apr 21 17:02:59 2026 +0800 fix: sort protocol names and fix stale comment in merge.lua --- apisix/plugins/ai-protocols/init.lua | 2 ++ apisix/plugins/ai-proxy/merge.lua | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/apisix/plugins/ai-protocols/init.lua b/apisix/plugins/ai-protocols/init.lua index 045287925..19590bf30 100644 --- a/apisix/plugins/ai-protocols/init.lua +++ b/apisix/plugins/ai-protocols/init.lua @@ -23,6 +23,7 @@ local converters = require("apisix.plugins.ai-protocols.converters") local ipairs = ipairs local pairs = pairs +local table = table local _M = {} @@ -74,6 +75,7 @@ function _M.names() for name in pairs(registered) do names[#names + 1] = name end + table.sort(names) return names end diff --git a/apisix/plugins/ai-proxy/merge.lua b/apisix/plugins/ai-proxy/merge.lua index 561a9f579..edecddabb 100644 --- a/apisix/plugins/ai-proxy/merge.lua +++ b/apisix/plugins/ai-proxy/merge.lua @@ -31,9 +31,9 @@ local getmetatable = getmetatable local _M = {} --- Returns true when tbl is a plain object (string keys only) that we should --- recurse into. Empty tables, arrays, and cjson sentinels are treated as --- "replace wholesale" to avoid ambiguity. +-- Returns true when tbl is a plain object (string keys only, or empty) that +-- we should recurse into. Arrays (cjson array_mt) and cjson sentinels are +-- treated as "replace wholesale". local function is_plain_object(tbl) if type(tbl) ~= "table" then return false
