Skip to content

Commit 3415201

Browse files
committed
Merge remote-tracking branch 'origin/main' into danny/aigov-96-record-all-tool-types
2 parents 34c9a19 + d474d68 commit 3415201

3 files changed

Lines changed: 4 additions & 16 deletions

File tree

config/config.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ type Anthropic struct {
3030
type AWSBedrock struct {
3131
Region string
3232
AccessKey, AccessKeySecret string
33-
SessionToken string
3433
Model, SmallFastModel string
3534
// If set, requests will be sent to this URL instead of the default AWS Bedrock endpoint
3635
// (https://bedrock-runtime.{region}.amazonaws.com).

intercept/messages/base.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,9 +270,9 @@ func (i *interceptionBase) withBody() option.RequestOption {
270270
// withAWSBedrockOptions returns request options for authenticating with AWS Bedrock.
271271
//
272272
// When both AccessKey and AccessKeySecret are set in the aibridge config, they are
273-
// used directly as static credentials (with an optional SessionToken for temporary credentials).
274-
// Otherwise, the AWS SDK default credential chain resolves credentials (environment variables,
275-
// shared config/credentials files, IAM roles, IRSA, SSO, IMDS, etc.).
273+
// used directly as static credentials. Otherwise, the AWS SDK default credential chain
274+
// resolves credentials (environment variables, shared config/credentials files, IAM
275+
// roles, IRSA, SSO, IMDS, etc.).
276276
func (*interceptionBase) withAWSBedrockOptions(ctx context.Context, cfg *aibconfig.AWSBedrock) ([]option.RequestOption, error) {
277277
if cfg == nil {
278278
return nil, xerrors.New("nil config given")
@@ -299,7 +299,7 @@ func (*interceptionBase) withAWSBedrockOptions(ctx context.Context, cfg *aibconf
299299
credentials.NewStaticCredentialsProvider(
300300
cfg.AccessKey,
301301
cfg.AccessKeySecret,
302-
cfg.SessionToken, // optional
302+
"",
303303
),
304304
))
305305
// Only one set: misconfiguration.

intercept/messages/base_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,6 @@ func TestAWSBedrockValidation(t *testing.T) {
120120
SmallFastModel: "test-small-model",
121121
},
122122
},
123-
{
124-
name: "static credentials with session token",
125-
cfg: &config.AWSBedrock{
126-
Region: "us-east-1",
127-
AccessKey: "test-key",
128-
AccessKeySecret: "test-secret",
129-
SessionToken: "test-session-token",
130-
Model: "test-model",
131-
SmallFastModel: "test-small-model",
132-
},
133-
},
134123
// Invalid cases.
135124
{
136125
name: "missing region & base url",

0 commit comments

Comments
 (0)