Skip to content

BedrockRuntimeClient can't seem to set the read time and connect time #6267

Open
@ryu6

Description

@ryu6

Background story

image
It seems impossible to set the connection time and read timeout using BedrockRuntimeClient. I have tried using apiCallTimeout and apiCallAttemptTimeout and given a large enough time. When Claude does not return content for more than 30s, the read time out will be thrown. In addition, I did not see where. There are settings for connection time and read time

What does this example accomplish?

I set the reading time to avoid ending early while waiting for Claude to return content. The reading time of 30s is too little.Furthermore, the descriptions of these two methods are too confusing.

Which AWS service(s)?

aws bedrock

Which AWS SDKs or tools?

  • All languages
  • .NET
  • C++
  • Go (v2)
  • Java
  • Java (v2)
  • JavaScript
  • JavaScript (v3)
  • Kotlin
  • PHP
  • Python
  • Ruby
  • Rust
  • Swift
  • Not applicable

Are there existing code examples to leverage?

BedrockRuntimeClient client = BedrockRuntimeClient.builder()
.region(Region.US_EAST_1)
.credentialsProvider(ProfileCredentialsProvider.create())
.overrideConfiguration(c -> c.retryPolicy(RetryPolicy.none())
.apiCallAttemptTimeout(Duration.ofMillis(5))
.apiCallAttemptTimeout(Duration.ofMillis(6)))
.build();

Do you have any reference code?

BedrockRuntimeClient client = BedrockRuntimeClient.builder()
                .region(Region.US_EAST_1)
                .credentialsProvider(ProfileCredentialsProvider.create())
                .overrideConfiguration(c -> c.retryPolicy(RetryPolicy.none())
                        .apiCallAttemptTimeout(Duration.ofMillis(5))
                        .apiCallAttemptTimeout(Duration.ofMillis(6)))
                .build();

Metadata

Metadata

Assignees

Labels

BugAn update to fix incorrect code or typos.Java-v2This issue relates to the AWS SDK for Java V2

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions