The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(streaming): fall back to non-stream on custom provider SSE order error (#72833)
webtecnicad7aea5b3d61c
diff --git a/agent/anthropic_adapter.py b/agent/anthropic_adapter.pyindex 559af3acc2a..98fc1ba8183 100644--- a/agent/anthropic_adapter.py+++ b/agent/anthropic_adapter.py@@ -715,6 +715,8 @@ def _is_stream_unavailable_error(exc: Exception) -> bool:err_lower = str(exc).lower()if "stream" in err_lower and "not supported" in err_lower:return True+ if "unexpected event order" in err_lower:+ return Trueif "invokemodelwithresponsestream" not in err_lower:return Falsefrom agent.bedrock_adapter import is_streaming_access_denied_error