Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions crates/goose/src/providers/bedrock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ impl ProviderDef for BedrockProvider {
BEDROCK_DOC_LINK,
vec![
ConfigKey::new("AWS_PROFILE", false, false, Some("default")),
ConfigKey::new("AWS_REGION", false, false, None),
ConfigKey::new("AWS_REGION", true, false, Some("us-east-1")),
ConfigKey::new("AWS_BEARER_TOKEN_BEDROCK", false, true, None),
],
)
Expand Down Expand Up @@ -384,11 +384,18 @@ mod tests {
.iter()
.find(|k| k.name == "AWS_REGION")
.expect("AWS_REGION config key should exist");
assert!(!aws_region.required, "AWS_REGION should not be required");
assert!(
aws_region.required,
"AWS_REGION is required for Bedrock to be marked as configured"
);
assert!(
!aws_region.secret,
"AWS_REGION should not be marked as secret"
);
assert!(
aws_region.default.is_some(),
"AWS_REGION should have a default value"
);

let bearer_token = meta
.config_keys
Expand Down
6 changes: 3 additions & 3 deletions crates/goose/src/providers/sagemaker_tgi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ impl ProviderDef for SageMakerTgiProvider {
vec![SAGEMAKER_TGI_DEFAULT_MODEL],
SAGEMAKER_TGI_DOC_LINK,
vec![
ConfigKey::new("SAGEMAKER_ENDPOINT_NAME", false, false, None),
ConfigKey::new("AWS_REGION", true, false, Some("us-east-1")),
ConfigKey::new("AWS_PROFILE", true, false, Some("default")),
ConfigKey::new("SAGEMAKER_ENDPOINT_NAME", true, false, None),
ConfigKey::new("AWS_REGION", false, false, Some("us-east-1")),
ConfigKey::new("AWS_PROFILE", false, false, Some("default")),
],
)
}
Expand Down