From 475ecfe7ca88952cbe8e832c4c95a943b227f6fc Mon Sep 17 00:00:00 2001 From: samugi Date: Fri, 10 May 2024 16:31:59 +0200 Subject: [PATCH] chore(clustering): cleanup redundant checkers some logic in checkers is made redundant by the fact the same fields exist in removed_fields, so it would never be reached. This commit removes the redundant logic --- kong/clustering/compat/checkers.lua | 34 ----------------------------- 1 file changed, 34 deletions(-) diff --git a/kong/clustering/compat/checkers.lua b/kong/clustering/compat/checkers.lua index b33fcd5726d9..3c9828f56e97 100644 --- a/kong/clustering/compat/checkers.lua +++ b/kong/clustering/compat/checkers.lua @@ -30,26 +30,6 @@ local compatible_checkers = { for _, plugin in ipairs(config_table.plugins or {}) do if plugin.name == 'ai-proxy' then local config = plugin.config - if config.model and config.model.options then - if config.response_streaming then - config.response_streaming = nil - log_warn_message('configures ' .. plugin.name .. ' plugin with' .. - ' response_streaming == nil, because it is not supported' .. - ' in this release', - dp_version, log_suffix) - has_update = true - end - - if config.model.options.upstream_path then - config.model.options.upstream_path = nil - log_warn_message('configures ' .. plugin.name .. ' plugin with' .. - ' upstream_path == nil, because it is not supported' .. - ' in this release', - dp_version, log_suffix) - has_update = true - end - end - if config.route_type == "preserve" then config.route_type = "llm/v1/chat" log_warn_message('configures ' .. plugin.name .. ' plugin with' .. @@ -59,20 +39,6 @@ local compatible_checkers = { has_update = true end end - - if plugin.name == 'ai-request-transformer' or plugin.name == 'ai-response-transformer' then - local config = plugin.config - if config.llm.model - and config.llm.model.options - and config.llm.model.options.upstream_path then - config.llm.model.options.upstream_path = nil - log_warn_message('configures ' .. plugin.name .. ' plugin with' .. - ' upstream_path == nil, because it is not supported' .. - ' in this release', - dp_version, log_suffix) - has_update = true - end - end end return has_update