httpx.RemoteProtocolError: peer closed connection without sending complete message body (incomplete chunked read)

We are getting a RemoteProtocolError often after running a streaming chat completion call for a long time. It always throws after a few minutes (Python / FastAPI)

Model: o3-mini

Packages:
openai 1.78.1
httpx 0.28.1

1 Like