Read operations fail during extended streaming transmissions.
Why this happens
Default timeout configurations close the connection before long generations conclude.
Answer 1: Pass custom httpx Timeout parameters
import httpx
from openai import OpenAI
client = OpenAI(timeout=httpx.Timeout(60.0))
