You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix NoSuchMethodError for requestMetadata with older AWS SDK versions
- Add graceful fallback when requestMetadata() method is not available
- Catch NoSuchMethodError and log debug message instead of crashing
- Support both ConverseRequest and ConverseStreamRequest builders
- Add documentation about AWS SDK version requirements (2.32.x+)
Fixes#5063
Signed-off-by: asekka <[email protected]>
Copy file name to clipboardExpand all lines: models/spring-ai-bedrock-converse/src/main/java/org/springframework/ai/bedrock/converse/BedrockProxyChatModel.java
+55-8Lines changed: 55 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -526,15 +526,59 @@ else if (message.getMessageType() == MessageType.TOOL) {
Copy file name to clipboardExpand all lines: spring-ai-docs/src/main/antora/modules/ROOT/pages/api/chat/bedrock-converse.adoc
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,6 +29,21 @@ Refer to https://docs.aws.amazon.com/bedrock/latest/userguide/getting-started.ht
29
29
30
30
* Enable the Models to use: Go to link:https://us-east-1.console.aws.amazon.com/bedrock/home[Amazon Bedrock] and from the link:https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/modelaccess[Model Access] menu on the left, configure access to the models you are going to use.
31
31
32
+
=== AWS SDK Version Requirements
33
+
34
+
[IMPORTANT]
35
+
====
36
+
If your project manages its own AWS SDK dependencies (e.g., via AWS BOM or explicit version overrides), ensure you are using **AWS SDK for Java version 2.32.x or later** for full feature support.
37
+
38
+
Some features like `requestMetadata` (used for filtering invocation logs) require AWS SDK 2.32.x+.
39
+
If you are using an older SDK version, these features will be gracefully disabled with a debug log message, but your application will continue to work.
40
+
41
+
If you encounter a `NoSuchMethodError` related to `requestMetadata`, check your dependency tree for conflicting AWS SDK versions:
0 commit comments