The SDK reports Connection error before I get an HTTP status code.
Why this happens
The client could not establish or keep an HTTP connection. Common causes are an incorrect base_url, DNS/proxy/VPN configuration, TLS interception, a firewall, or an unrealistically short timeout.
Answer 1: Remove any custom base URL and test the smallest request
from openai import OpenAI
client = OpenAI() # Uses the normal API endpoint
response = client.responses.create(model="gpt-5", input="Say hello.")
print(response.output_text)
If this works, the problem is in the custom endpoint or proxy configuration—not the request body.
