diff --git a/kong/clustering/compat/removed_fields.lua b/kong/clustering/compat/removed_fields.lua index 4b0ac6e48631..a91b8a6cecdc 100644 --- a/kong/clustering/compat/removed_fields.lua +++ b/kong/clustering/compat/removed_fields.lua @@ -167,5 +167,23 @@ return { "traces_endpoint", "logs_endpoint", }, + ai_proxy = { + "max_request_body_size", + }, + ai_prompt_decorator = { + "max_request_body_size", + }, + ai_prompt_guard = { + "max_request_body_size", + }, + ai_prompt_template = { + "max_request_body_size", + }, + ai_request_transformer = { + "max_request_body_size", + }, + ai_response_transformer = { + "max_request_body_size", + }, }, } diff --git a/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua b/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua index 8473bdf3b528..d5a3c9626c2e 100644 --- a/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua +++ b/spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua @@ -543,16 +543,22 @@ describe("CP/DP config compat transformations #" .. strategy, function() upstream_path = "/anywhere", -- becomes nil }, }, + max_request_body_size = 8192, }, } -- ]] - local expected_ai_proxy_prior_37 = cycle_aware_deep_copy(ai_proxy) - expected_ai_proxy_prior_37.config.response_streaming = nil - expected_ai_proxy_prior_37.config.model.options.upstream_path = nil - expected_ai_proxy_prior_37.config.route_type = "llm/v1/chat" + local expected = cycle_aware_deep_copy(ai_proxy) - do_assert(uuid(), "3.6.0", expected_ai_proxy_prior_37) + expected.config.max_request_body_size = nil + + do_assert(uuid(), "3.7.0", expected) + + expected.config.response_streaming = nil + expected.config.model.options.upstream_path = nil + expected.config.route_type = "llm/v1/chat" + + do_assert(uuid(), "3.6.0", expected) -- cleanup admin.plugins:remove({ id = ai_proxy.id }) @@ -584,14 +590,19 @@ describe("CP/DP config compat transformations #" .. strategy, function() }, }, }, + max_request_body_size = 8192, }, } -- ]] - local expected_ai_request_transformer_prior_37 = cycle_aware_deep_copy(ai_request_transformer) - expected_ai_request_transformer_prior_37.config.llm.model.options.upstream_path = nil + local expected = cycle_aware_deep_copy(ai_request_transformer) + expected.config.max_request_body_size = nil + + do_assert(uuid(), "3.7.0", expected) - do_assert(uuid(), "3.6.0", expected_ai_request_transformer_prior_37) + expected.config.llm.model.options.upstream_path = nil + + do_assert(uuid(), "3.6.0", expected) -- cleanup admin.plugins:remove({ id = ai_request_transformer.id }) @@ -621,14 +632,19 @@ describe("CP/DP config compat transformations #" .. strategy, function() }, }, }, + max_request_body_size = 8192, }, } -- ]] - local expected_ai_response_transformer_prior_37 = cycle_aware_deep_copy(ai_response_transformer) - expected_ai_response_transformer_prior_37.config.llm.model.options.upstream_path = nil + local expected = cycle_aware_deep_copy(ai_response_transformer) + expected.config.max_request_body_size = nil + + do_assert(uuid(), "3.7.0", expected) + + expected.config.llm.model.options.upstream_path = nil - do_assert(uuid(), "3.6.0", expected_ai_response_transformer_prior_37) + do_assert(uuid(), "3.6.0", expected) -- cleanup admin.plugins:remove({ id = ai_response_transformer.id })