Open tlecomte opened 1 week ago
I realize that, ideally, the AWS .NET SDK would provide a solution out of the box. So I've also created https://github.com/aws/aws-sdk-net/issues/3542 and will suggest a solution there first.
@RogerBarreto - can you take a look at this? @tlecomte - thanks for submitting this, we will take a look at updating this.
Describe the bug The current implementation of the Bedrock connector is using
response.Stream.AsEnumerable()
in BedrockChatCompletionClient.cs#L193, which is keeping the current .NET thread busy while it reads the response stream. This could cause thread exhaustion issues.To Reproduce Steps to reproduce the behavior:
Expected behavior Replace
.AsEnumerable()
with something that would read the response stream in an async manner.Screenshots N/A
Platform
Additional context