feat: allow overriding bedrock provider endpoint (#2540)
This commit is contained in:
@@ -127,11 +127,18 @@ function M:parse_curl_args(prompt_opts)
|
|||||||
session_token = awsCreds.session_token
|
session_token = awsCreds.session_token
|
||||||
end
|
end
|
||||||
|
|
||||||
local endpoint = string.format(
|
local endpoint
|
||||||
|
if provider_conf.endpoint then
|
||||||
|
-- Use custom endpoint if provided
|
||||||
|
endpoint = provider_conf.endpoint
|
||||||
|
else
|
||||||
|
-- Default to AWS Bedrock endpoint
|
||||||
|
endpoint = string.format(
|
||||||
"https://bedrock-runtime.%s.amazonaws.com/model/%s/invoke-with-response-stream",
|
"https://bedrock-runtime.%s.amazonaws.com/model/%s/invoke-with-response-stream",
|
||||||
region,
|
region,
|
||||||
provider_conf.model
|
provider_conf.model
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
|
||||||
local headers = {
|
local headers = {
|
||||||
["Content-Type"] = "application/json",
|
["Content-Type"] = "application/json",
|
||||||
|
|||||||
Reference in New Issue
Block a user