Skip to content

Commit

Permalink
fix(ai-transformers): fix compat with LT 3.8.0 (#13564)
Browse files Browse the repository at this point in the history
(cherry picked from commit 846f222)

Co-authored-by: Jack Tysoe <jack.tysoe@konghq.com>
  • Loading branch information
team-gateway-bot and tysoekong authored Aug 24, 2024
1 parent e967fe2 commit 8d3acd3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions kong/clustering/compat/removed_fields.lua
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ return {
"llm.model.options.bedrock",
"llm.auth.aws_access_key_id",
"llm.auth.aws_secret_access_key",
"llm.auth.allow_override",
},
ai_response_transformer = {
"max_request_body_size",
Expand All @@ -206,6 +207,7 @@ return {
"llm.model.options.bedrock",
"llm.auth.aws_access_key_id",
"llm.auth.aws_secret_access_key",
"llm.auth.allow_override",
},
prometheus = {
"ai_metrics",
Expand Down
14 changes: 10 additions & 4 deletions spec/02-integration/09-hybrid_mode/09-config-compat_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -706,8 +706,9 @@ describe("CP/DP config compat transformations #" .. strategy, function()

local expected = cycle_aware_deep_copy(ai_request_transformer)

-- max body size
-- shared
expected.config.max_request_body_size = nil
expected.config.llm.auth.allow_override = nil

-- gemini fields
expected.config.llm.auth.gcp_service_account_json = nil
Expand Down Expand Up @@ -770,8 +771,9 @@ describe("CP/DP config compat transformations #" .. strategy, function()

local expected = cycle_aware_deep_copy(ai_response_transformer)

-- max body size
-- shared
expected.config.max_request_body_size = nil
expected.config.llm.auth.allow_override = nil

-- gemini fields
expected.config.llm.auth.gcp_service_account_json = nil
Expand Down Expand Up @@ -869,6 +871,7 @@ describe("CP/DP config compat transformations #" .. strategy, function()
auth = {
header_name = "header",
header_value = "value",
allow_override = true,
},
model = {
name = "any-model-name",
Expand All @@ -890,8 +893,9 @@ describe("CP/DP config compat transformations #" .. strategy, function()

local expected = cycle_aware_deep_copy(ai_request_transformer)

-- max body size
-- shared
expected.config.max_request_body_size = nil
expected.config.llm.auth.allow_override = nil

-- gemini fields
expected.config.llm.auth.gcp_service_account_json = nil
Expand Down Expand Up @@ -925,6 +929,7 @@ describe("CP/DP config compat transformations #" .. strategy, function()
auth = {
header_name = "header",
header_value = "value",
allow_override = true,
},
model = {
name = "any-model-name",
Expand All @@ -944,8 +949,9 @@ describe("CP/DP config compat transformations #" .. strategy, function()

local expected = cycle_aware_deep_copy(ai_response_transformer)

-- max body size
-- shared
expected.config.max_request_body_size = nil
expected.config.llm.auth.allow_override = nil

-- gemini fields
expected.config.llm.auth.gcp_service_account_json = nil
Expand Down

0 comments on commit 8d3acd3

Please sign in to comment.