From 6d8d2c6877b483b5d9885d1e61c09f1e6f298ddb Mon Sep 17 00:00:00 2001 From: kseysh Date: Mon, 15 Dec 2025 11:28:02 +0900 Subject: [PATCH] =?UTF-8?q?modify:=20BedrockRuntimeAsyncClient=EC=9D=98=20?= =?UTF-8?q?Timeout=20=EC=8B=9C=EA=B0=84=20=EC=84=A4=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/mcpclient/config/BedrockConfig.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/mcp-client/src/main/java/core/mcpclient/config/BedrockConfig.java b/mcp-client/src/main/java/core/mcpclient/config/BedrockConfig.java index 0ab589d..494d440 100644 --- a/mcp-client/src/main/java/core/mcpclient/config/BedrockConfig.java +++ b/mcp-client/src/main/java/core/mcpclient/config/BedrockConfig.java @@ -15,6 +15,7 @@ import org.springframework.context.annotation.Profile; import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider; import software.amazon.awssdk.regions.Region; +import software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeAsyncClient; import software.amazon.awssdk.services.bedrockruntime.BedrockRuntimeClient; import java.time.Duration; @@ -50,6 +51,26 @@ public BedrockRuntimeClient bedrockRuntimeClient() { return client; } + @Bean + public BedrockRuntimeAsyncClient bedrockRuntimeAsyncClient() { + log.info("🤔 Creating BedrockRuntimeAsyncClient"); + log.info("📝 Region: {}", awsConnectionProperties.getRegion()); + + Duration timeout = awsConnectionProperties.getTimeout(); + log.info("📝 Timeout: {}", timeout); + + BedrockRuntimeAsyncClient client = BedrockRuntimeAsyncClient.builder() + .region(Region.of(awsConnectionProperties.getRegion())) + .credentialsProvider(DefaultCredentialsProvider.builder().build()) + .overrideConfiguration(config -> config + .apiCallTimeout(timeout) + .apiCallAttemptTimeout(timeout)) + .build(); + + log.info("✅ BedrockRuntimeAsyncClient created\n"); + return client; + } + @Bean public BedrockChatOptions bedrockChatOptions() { log.info("🤔 Creating BedrockChatOptions");