From 627ba9f8972c43d22ee91d9b0e0937f3126aac71 Mon Sep 17 00:00:00 2001 From: Wangchong Zhou Date: Mon, 24 Jun 2024 15:41:13 +0800 Subject: [PATCH] fix(ai-plugins): remove no_consumer and no_service restriction on AI plugins (#13209) AG-2 --- changelog/unreleased/kong/fix-ai-plugin-no-consumer.yml | 4 ++++ kong/plugins/ai-prompt-template/schema.lua | 1 - kong/plugins/ai-proxy/schema.lua | 2 -- kong/plugins/ai-response-transformer/schema.lua | 1 - 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 changelog/unreleased/kong/fix-ai-plugin-no-consumer.yml diff --git a/changelog/unreleased/kong/fix-ai-plugin-no-consumer.yml b/changelog/unreleased/kong/fix-ai-plugin-no-consumer.yml new file mode 100644 index 00000000000..155500fcc96 --- /dev/null +++ b/changelog/unreleased/kong/fix-ai-plugin-no-consumer.yml @@ -0,0 +1,4 @@ +message: "Fixed certain AI plugins cannot be applied per consumer or per service." +type: bugfix +scope: Plugin + diff --git a/kong/plugins/ai-prompt-template/schema.lua b/kong/plugins/ai-prompt-template/schema.lua index cce3f8be495..0c3615557c2 100644 --- a/kong/plugins/ai-prompt-template/schema.lua +++ b/kong/plugins/ai-prompt-template/schema.lua @@ -23,7 +23,6 @@ return { name = "ai-prompt-template", fields = { { protocols = typedefs.protocols_http }, - { consumer = typedefs.no_consumer }, { config = { type = "record", fields = { diff --git a/kong/plugins/ai-proxy/schema.lua b/kong/plugins/ai-proxy/schema.lua index 06192586308..2aa77c56611 100644 --- a/kong/plugins/ai-proxy/schema.lua +++ b/kong/plugins/ai-proxy/schema.lua @@ -23,8 +23,6 @@ return { name = "ai-proxy", fields = { { protocols = typedefs.protocols_http }, - { consumer = typedefs.no_consumer }, - { service = typedefs.no_service }, { config = this_schema }, }, } diff --git a/kong/plugins/ai-response-transformer/schema.lua b/kong/plugins/ai-response-transformer/schema.lua index c4eb6fe25ac..565d467fe2d 100644 --- a/kong/plugins/ai-response-transformer/schema.lua +++ b/kong/plugins/ai-response-transformer/schema.lua @@ -7,7 +7,6 @@ return { name = "ai-response-transformer", fields = { { protocols = typedefs.protocols_http }, - { consumer = typedefs.no_consumer }, { config = { type = "record", fields = {