Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b65c6a

Browse files
committed
feat: AWS Bedrock support
Signed-off-by: Danny Kopping <danny@coder.com>
1 parent5a3ceb3 commit9b65c6a

File tree

10 files changed

+210
-5
lines changed

10 files changed

+210
-5
lines changed

‎cli/testdata/server-config.yaml.golden‎

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,3 +730,21 @@ aibridge:
730730
# The key to authenticate against the Anthropic API.
731731
# (default: <unset>, type: string)
732732
key: ""
733+
# The AWS Bedrock API region.
734+
# (default: <unset>, type: string)
735+
bedrock_region: ""
736+
# The access key to authenticate against the AWS Bedrock API.
737+
# (default: <unset>, type: string)
738+
bedrock_access_key: ""
739+
# The access key secret to use with the access key to authenticate against the AWS
740+
# Bedrock API.
741+
# (default: <unset>, type: string)
742+
bedrock_access_key_secret: ""
743+
# The model to use when making requests to the AWS Bedrock API.
744+
# (default: global.anthropic.claude-sonnet-4-5-20250929-v1:0, type: string)
745+
bedrock_model: global.anthropic.claude-sonnet-4-5-20250929-v1:0
746+
# The small fast model to use when making requests to the AWS Bedrock API. Claude
747+
# Code uses Haiku-class models to perform background tasks. See
748+
# https://docs.claude.com/en/docs/claude-code/settings#environment-variables.
749+
# (default: global.anthropic.claude-haiku-4-5-20251001-v1:0, type: string)
750+
bedrock_small_fast_model: global.anthropic.claude-haiku-4-5-20251001-v1:0

‎coderd/apidoc/docs.go‎

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎coderd/apidoc/swagger.json‎

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎codersdk/deployment.go‎

Lines changed: 67 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3280,18 +3280,73 @@ Write out the current server config as YAML to stdout.`,
32803280
Value:&c.AI.BridgeConfig.Anthropic.BaseURL,
32813281
Default:"https://api.anthropic.com/",
32823282
Group:&deploymentGroupAIBridge,
3283-
YAML:"base_url",
3283+
YAML:"base_url",// TODO: this needs to be namespaced to Anthropic, but may cause BC breaks.
32843284
Hidden:true,
32853285
},
32863286
{
3287-
Name:"AIBridge AnthropicKEY",
3287+
Name:"AIBridge AnthropicKey",
32883288
Description:"The key to authenticate against the Anthropic API.",
32893289
Flag:"aibridge-anthropic-key",
32903290
Env:"CODER_AIBRIDGE_ANTHROPIC_KEY",
32913291
Value:&c.AI.BridgeConfig.Anthropic.Key,
32923292
Default:"",
32933293
Group:&deploymentGroupAIBridge,
3294-
YAML:"key",
3294+
YAML:"key",// TODO: this needs to be namespaced to Anthropic, but may cause BC breaks.
3295+
Hidden:true,
3296+
},
3297+
{
3298+
Name:"AIBridge Bedrock Region",
3299+
Description:"The AWS Bedrock API region.",
3300+
Flag:"aibridge-bedrock-region",
3301+
Env:"CODER_AIBRIDGE_BEDROCK_REGION",
3302+
Value:&c.AI.BridgeConfig.Bedrock.Region,
3303+
Default:"",
3304+
Group:&deploymentGroupAIBridge,
3305+
YAML:"bedrock_region",
3306+
Hidden:true,
3307+
},
3308+
{
3309+
Name:"AIBridge Bedrock Access Key",
3310+
Description:"The access key to authenticate against the AWS Bedrock API.",
3311+
Flag:"aibridge-bedrock-access-key",
3312+
Env:"CODER_AIBRIDGE_BEDROCK_ACCESS_KEY",
3313+
Value:&c.AI.BridgeConfig.Bedrock.AccessKey,
3314+
Default:"",
3315+
Group:&deploymentGroupAIBridge,
3316+
YAML:"bedrock_access_key",
3317+
Hidden:true,
3318+
},
3319+
{
3320+
Name:"AIBridge Bedrock Access Key Secret",
3321+
Description:"The access key secret to use with the access key to authenticate against the AWS Bedrock API.",
3322+
Flag:"aibridge-bedrock-access-key-secret",
3323+
Env:"CODER_AIBRIDGE_BEDROCK_ACCESS_KEY_SECRET",
3324+
Value:&c.AI.BridgeConfig.Bedrock.AccessKeySecret,
3325+
Default:"",
3326+
Group:&deploymentGroupAIBridge,
3327+
YAML:"bedrock_access_key_secret",
3328+
Hidden:true,
3329+
},
3330+
{
3331+
Name:"AIBridge Bedrock Model",
3332+
Description:"The model to use when making requests to the AWS Bedrock API.",
3333+
Flag:"aibridge-bedrock-model",
3334+
Env:"CODER_AIBRIDGE_BEDROCK_MODEL",
3335+
Value:&c.AI.BridgeConfig.Bedrock.Model,
3336+
Default:"global.anthropic.claude-sonnet-4-5-20250929-v1:0",// See https://docs.claude.com/en/api/claude-on-amazon-bedrock#accessing-bedrock.
3337+
Group:&deploymentGroupAIBridge,
3338+
YAML:"bedrock_model",
3339+
Hidden:true,
3340+
},
3341+
{
3342+
Name:"AIBridge Bedrock Small Fast Model",
3343+
Description:"The small fast model to use when making requests to the AWS Bedrock API. Claude Code uses Haiku-class models to perform background tasks. See https://docs.claude.com/en/docs/claude-code/settings#environment-variables.",
3344+
Flag:"aibridge-bedrock-small-fastmodel",
3345+
Env:"CODER_AIBRIDGE_BEDROCK_SMALL_FAST_MODEL",
3346+
Value:&c.AI.BridgeConfig.Bedrock.SmallFastModel,
3347+
Default:"global.anthropic.claude-haiku-4-5-20251001-v1:0",// See https://docs.claude.com/en/api/claude-on-amazon-bedrock#accessing-bedrock.
3348+
Group:&deploymentGroupAIBridge,
3349+
YAML:"bedrock_small_fast_model",
32953350
Hidden:true,
32963351
},
32973352
{
@@ -3316,6 +3371,7 @@ type AIBridgeConfig struct {
33163371
Enabled serpent.Bool`json:"enabled" typescript:",notnull"`
33173372
OpenAIAIBridgeOpenAIConfig`json:"openai" typescript:",notnull"`
33183373
AnthropicAIBridgeAnthropicConfig`json:"anthropic" typescript:",notnull"`
3374+
BedrockAIBridgeBedrockConfig`json:"bedrock" typescript:",notnull"`
33193375
}
33203376

33213377
typeAIBridgeOpenAIConfigstruct {
@@ -3328,6 +3384,14 @@ type AIBridgeAnthropicConfig struct {
33283384
Key serpent.String`json:"key" typescript:",notnull"`
33293385
}
33303386

3387+
typeAIBridgeBedrockConfigstruct {
3388+
Region serpent.String`json:"region" typescript:",notnull"`
3389+
AccessKey serpent.String`json:"access_key" typescript:",notnull"`
3390+
AccessKeySecret serpent.String`json:"access_key_secret" typescript:",notnull"`
3391+
Model serpent.String`json:"model" typescript:",notnull"`
3392+
SmallFastModel serpent.String`json:"small_fast_model" typescript:",notnull"`
3393+
}
3394+
33313395
typeAIConfigstruct {
33323396
BridgeConfigAIBridgeConfig`json:"bridge,omitempty"`
33333397
}

‎docs/reference/api/general.md‎

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎docs/reference/api/schemas.md‎

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎enterprise/cli/aibridged.go‎

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,19 @@ func newAIBridgeDaemon(coderAPI *coderd.API) (*aibridged.Server, error) {
2020

2121
// Setup supported providers.
2222
providers:= []aibridge.Provider{
23-
aibridge.NewOpenAIProvider(aibridge.ProviderConfig{
23+
aibridge.NewOpenAIProvider(aibridge.OpenAIConfig{
2424
BaseURL:coderAPI.DeploymentValues.AI.BridgeConfig.OpenAI.BaseURL.String(),
2525
Key:coderAPI.DeploymentValues.AI.BridgeConfig.OpenAI.Key.String(),
2626
}),
27-
aibridge.NewAnthropicProvider(aibridge.ProviderConfig{
27+
aibridge.NewAnthropicProvider(aibridge.AnthropicConfig{
2828
BaseURL:coderAPI.DeploymentValues.AI.BridgeConfig.Anthropic.BaseURL.String(),
2929
Key:coderAPI.DeploymentValues.AI.BridgeConfig.Anthropic.Key.String(),
30+
},&aibridge.AWSBedrockConfig{
31+
Region:coderAPI.DeploymentValues.AI.BridgeConfig.Bedrock.Region.String(),
32+
AccessKey:coderAPI.DeploymentValues.AI.BridgeConfig.Bedrock.AccessKey.String(),
33+
AccessKeySecret:coderAPI.DeploymentValues.AI.BridgeConfig.Bedrock.AccessKeySecret.String(),
34+
Model:coderAPI.DeploymentValues.AI.BridgeConfig.Bedrock.Model.String(),
35+
SmallFastModel:coderAPI.DeploymentValues.AI.BridgeConfig.Bedrock.SmallFastModel.String(),
3036
}),
3137
}
3238

‎go.mod‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ require (
509509
github.com/aquasecurity/trivyv0.61.1-0.20250407075540-f1329c7ea1aa// indirect
510510
github.com/aquasecurity/trivy-checksv1.11.3-0.20250604022615-9a7efa7c9169// indirect
511511
github.com/aws/aws-sdk-gov1.55.7// indirect
512+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstreamv1.6.11// indirect
512513
github.com/bahlo/generic-list-gov0.2.0// indirect
513514
github.com/bgentry/go-netrcv0.0.0-20140422174119-9fd32a8b3d3d// indirect
514515
github.com/buger/jsonparserv1.1.1// indirect

‎go.sum‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,8 @@ github.com/aws/aws-sdk-go v1.55.7 h1:UJrkFq7es5CShfBwlWAC8DA077vp8PyVbQd3lqLiztE
764764
github.com/aws/aws-sdk-gov1.55.7/go.mod h1:eRwEWoyTWFMVYVQzKMNHWP5/RV4xIUGMQfXQHfHkpNU=
765765
github.com/aws/aws-sdk-go-v2v1.39.2 h1:EJLg8IdbzgeD7xgvZ+I8M1e0fL0ptn/M47lianzth0I=
766766
github.com/aws/aws-sdk-go-v2v1.39.2/go.mod h1:sDioUELIUO9Znk23YVmIk86/9DOpkbyyVb1i/gUNFXY=
767+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstreamv1.6.11 h1:12SpdwU8Djs+YGklkinSSlcrPyj3H4VifVsKf78KbwA=
768+
github.com/aws/aws-sdk-go-v2/aws/protocol/eventstreamv1.6.11/go.mod h1:dd+Lkp6YmMryke+qxW/VnKyhMBDTYP41Q2Bb+6gNZgY=
767769
github.com/aws/aws-sdk-go-v2/configv1.31.3 h1:RIb3yr/+PZ18YYNe6MDiG/3jVoJrPmdoCARwNkMGvco=
768770
github.com/aws/aws-sdk-go-v2/configv1.31.3/go.mod h1:jjgx1n7x0FAKl6TnakqrpkHWWKcX3xfWtdnIJs5K9CE=
769771
github.com/aws/aws-sdk-go-v2/credentialsv1.18.7 h1:zqg4OMrKj+t5HlswDApgvAHjxKtlduKS7KicXB+7RLg=

‎site/src/api/typesGenerated.ts‎

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp