LangChain AWS: Streaming Not Working for Claude Sonnet 4 in Agent Mode (Bedrock) #555
Unanswered
rpetchiappan
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am using LangChain AWS (langchain_aws==0.2.29) with AWS Bedrock to run Anthropic Claude models in agent mode. My agent code streams responses correctly for Claude 3.7 Sonnet (us.anthropic.claude-3-7-sonnet-20250219-v1:0), but does not stream for Claude Sonnet 4 (us.anthropic.claude-sonnet-4-20250514-v1:0).
When I call the Bedrock converse stream API directly, Sonnet 4 streams as expected.
I am not passing the tool_choice parameter for Sonnet 4, per LangChain documentation.
Is there a limitation or bug in LangChain AWS for Sonnet 4 streaming in agent mode?
My agent code is generic and works for both models, but only Sonnet 3.7 streams.
Please advise if there is a workaround or if this is a known issue.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions