Skip to content

Commit ad49b9b

Browse files
committed
Don't log AWS SDK stack trace, updates documentation
Signed-off-by: Christopher Miles <twitch@nervestaple.com>
1 parent 506ccfe commit ad49b9b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

models/spring-ai-bedrock-converse/src/main/java/org/springframework/ai/bedrock/converse/BedrockProxyChatModel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ private Builder() {
807807
this.region = DefaultAwsRegionProviderChain.builder().build().getRegion();
808808
}
809809
catch (SdkClientException e) {
810-
logger.warn("Failed to load region from DefaultAwsRegionProviderChain, using US_EAST_1", e);
810+
logger.warn("Failed to load region from DefaultAwsRegionProviderChain, using {}}", this.region);
811811
}
812812
}
813813

spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock-converse.adoc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ The prefix `spring.ai.bedrock.aws` is the property prefix to configure the conne
7373
|====
7474
| Property | Description | Default
7575

76-
| spring.ai.bedrock.aws.region | AWS region to use. | us-east-1
76+
| spring.ai.bedrock.aws.region | AWS region to use. | AWS SDK value or us-east-1
7777
| spring.ai.bedrock.aws.timeout | AWS timeout to use. | 5m
7878
| spring.ai.bedrock.aws.access-key | AWS access key. | -
7979
| spring.ai.bedrock.aws.secret-key | AWS secret key. | -
@@ -89,6 +89,8 @@ To enable, spring.ai.model.chat=bedrock-converse (It is enabled by default)
8989
To disable, spring.ai.model.chat=none (or any value which doesn't match bedrock-converse)
9090
9191
This change is done to allow configuration of multiple models.
92+
93+
The AWS SDK checks several places for the region, if none of these are set then "us-east-1" is used.
9294
====
9395

9496
The prefix `spring.ai.bedrock.converse.chat` is the property prefix that configures the chat model implementation for the Converse API.

0 commit comments

Comments
 (0)