feat: support custom bedrock base url (#21582)

Closes https://github.com/coder/aibridge/issues/126
Depends on https://github.com/coder/aibridge/pull/131

---------

Signed-off-by: Danny Kopping <danny@coder.com>
This commit is contained in:
Danny Kopping
2026-01-21 12:48:56 +00:00
committed by GitHub
parent 6ef9670384
commit a14a22eb54
14 changed files with 78 additions and 16 deletions
+21 -8
View File
@@ -3394,14 +3394,26 @@ Write out the current server config as YAML to stdout.`,
Annotations: serpent.Annotations{}.Mark(annotationSecretKey, "true"),
},
{
Name: "AI Bridge Bedrock Region",
Description: "The AWS Bedrock API region.",
Flag: "aibridge-bedrock-region",
Env: "CODER_AIBRIDGE_BEDROCK_REGION",
Value: &c.AI.BridgeConfig.Bedrock.Region,
Default: "",
Group: &deploymentGroupAIBridge,
YAML: "bedrock_region",
Name: "AI Bridge Bedrock Base URL",
Description: "The base URL to use for the AWS Bedrock API. Use this setting to specify an exact URL to use. Takes precedence " +
"over CODER_AIBRIDGE_BEDROCK_REGION.",
Flag: "aibridge-bedrock-base-url",
Env: "CODER_AIBRIDGE_BEDROCK_BASE_URL",
Value: &c.AI.BridgeConfig.Bedrock.BaseURL,
Default: "",
Group: &deploymentGroupAIBridge,
YAML: "bedrock_base_url",
},
{
Name: "AI Bridge Bedrock Region",
Description: "The AWS Bedrock API region to use. Constructs a base URL to use for the AWS Bedrock API in the form of " +
"'https://bedrock-runtime.<region>.amazonaws.com'.",
Flag: "aibridge-bedrock-region",
Env: "CODER_AIBRIDGE_BEDROCK_REGION",
Value: &c.AI.BridgeConfig.Bedrock.Region,
Default: "",
Group: &deploymentGroupAIBridge,
YAML: "bedrock_region",
},
{
Name: "AI Bridge Bedrock Access Key",
@@ -3727,6 +3739,7 @@ type AIBridgeAnthropicConfig struct {
}
type AIBridgeBedrockConfig struct {
BaseURL serpent.String `json:"base_url" typescript:",notnull"`
Region serpent.String `json:"region" typescript:",notnull"`
AccessKey serpent.String `json:"access_key" typescript:",notnull"`
AccessKeySecret serpent.String `json:"access_key_secret" typescript:",notnull"`