Skip to content

Commit

Permalink
chore(llm): change llm.auth.allow_override option default value to fa…
Browse files Browse the repository at this point in the history
…lse (#13505)

This preserves the previous behaviour
  • Loading branch information
oowl authored Aug 16, 2024
1 parent acbbdf3 commit e61c4dd
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion kong/llm/schemas/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ local auth_schema = {
type = "boolean",
description = "If enabled, the authorization header or parameter can be overridden in the request by the value configured in the plugin.",
required = false,
default = true }},
default = false }},
}
}

Expand Down
3 changes: 3 additions & 0 deletions spec/03-plugins/38-ai-proxy/02-openai_integration_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "Authorization",
header_value = "Bearer openai-key",
allow_override = true,
},
model = {
name = "gpt-3.5-turbo",
Expand Down Expand Up @@ -464,6 +465,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
param_name = "apikey",
param_value = "openai-key",
param_location = "query",
allow_override = true,
},
model = {
name = "gpt-3.5-turbo-instruct",
Expand Down Expand Up @@ -593,6 +595,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
param_name = "apikey",
param_value = "openai-key",
param_location = "body",
allow_override = true,
},
model = {
name = "gpt-3.5-turbo-instruct",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "x-api-key",
header_value = "anthropic-key",
allow_override = true,
},
model = {
name = "claude-2.1",
Expand Down
1 change: 1 addition & 0 deletions spec/03-plugins/38-ai-proxy/04-cohere_integration_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "Authorization",
header_value = "Bearer cohere-key",
allow_override = true,
},
model = {
name = "command",
Expand Down
1 change: 1 addition & 0 deletions spec/03-plugins/38-ai-proxy/05-azure_integration_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "api-key",
header_value = "azure-key",
allow_override = true,
},
model = {
name = "gpt-3.5-turbo",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "Authorization",
header_value = "Bearer mistral-key",
allow_override = true,
},
model = {
name = "mistralai/Mistral-7B-Instruct-v0.1-instruct",
Expand Down
1 change: 1 addition & 0 deletions spec/03-plugins/38-ai-proxy/07-llama2_integration_spec.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ for _, strategy in helpers.all_strategies() do if strategy ~= "cassandra" then
auth = {
header_name = "Authorization",
header_value = "Bearer llama2-key",
allow_override = true,
},
model = {
name = "llama-2-7b-chat-hf",
Expand Down

1 comment on commit e61c4dd

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:e61c4dd77d64d75b91f5dd03c17ffe55586bbdaa
Artifacts available https://github.com/Kong/kong/actions/runs/10420565266

Please sign in to comment.