APIConnectionError: Connection error when using web_search_preview tool with GPT-5 models

Getting “APIConnectionError: Connection error.” errors with web search enabled for GPT-5 models.

Example error request:

response = client.responses.parse(
model=“gpt-5-nano”,
text_format=Supplier,
tools=[{“type”: “web_search_preview”}],
reasoning={
“effort”: “medium”
},
instructions=instructions,
input=“sticker suppliers”,
)

Error:
`
RemoteProtocolError: Server disconnected without sending a response.

The above exception was the direct cause of the following exception:
`