httpx.TimeoutException with o3 deepresearch and o3 pro models

I am building a demo with the o3 deepresearch model and my colleague is working on code inside our product with the o3 pro models. Earlier this week, we both started seeing httpx timeouts on every call. I’ll speak about my experience.

I have a fairly straight-forward responses API call:

  response = client.responses.create(
    model="o3-deep-research",
    input=input_text,
    instructions=instructions,
    timeout=7200.0,
    tools=[
      {
        "type": "mcp",
        "server_label": "box",
        "server_url": "https://box-deepresearch-mcp-b3c4fc36032c.herokuapp.com/mcp",
        "require_approval": "never",
        "headers": {
          "x-api-key": f"{box_mcp_api_key}"
        },
      }
    ]
  )

Monday, as I was still working on my deep research MCP server, I was getting responses anywhere from 8 to 40 minutes. Now when I run it, I can see it hitting my MCP server and results being returned and then it goes quiet, indicating to me that it is moving on to other tasks in generating my report.

As you can see above, I’ve tried adjusting the timeout to 2 hours, but its still timing out, and with my retry logic, I even let it run overnight to see if it would breakthrough to no avail.

This is the exception I am seeing:

2025-07-10 08:39:09 - DEBUG - Encountered httpx.TimeoutException
Traceback (most recent call last):
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_transports/default.py", line 101, in map_httpcore_exceptions
    yield
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_transports/default.py", line 250, in handle_request
    resp = self._pool.handle_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 256, in handle_request
    raise exc from None
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/connection_pool.py", line 236, in handle_request
    response = connection.handle_request(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/connection.py", line 103, in handle_request
    return self._connection.handle_request(request)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 136, in handle_request
    raise exc
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 106, in handle_request
    ) = self._receive_response_headers(**kwargs)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 177, in _receive_response_headers
    event = self._receive_event(timeout=timeout)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_sync/http11.py", line 217, in _receive_event
    data = self._network_stream.read(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_backends/sync.py", line 126, in read
    with map_exceptions(exc_map):
  File "/opt/homebrew/Cellar/python@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ReadTimeout: The read operation timed out

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

Traceback (most recent call last):
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/openai/_base_client.py", line 972, in request
    response = self._client.send(
               ^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_client.py", line 914, in send
    response = self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_client.py", line 942, in _send_handling_auth
    response = self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_client.py", line 979, in _send_handling_redirects
    response = self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_client.py", line 1014, in _send_single_request
    response = transport.handle_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_transports/default.py", line 249, in handle_request
    with map_httpcore_exceptions():
  File "/opt/homebrew/Cellar/python@3.11/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/contextlib.py", line 158, in __exit__
    self.gen.throw(typ, value, traceback)
  File "/Users/shurrey/local/box-opemai-deep-research/.venv/lib/python3.11/site-packages/httpx/_transports/default.py", line 118, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ReadTimeout: The read operation timed out

Has any one else experienced this? Testing my MCP server on gpt4.1 works fine.

We have experienced the the same httpx timeout the last three days.

Since wednesday,our RAG application using Azure OpenAI in the northeurope-2 region has experienced httpx.ReadError httpcore.ReadError: BrokenResourceError and delays of up to 5 minutes for queries that usually take bewteen 25-45seconds. Sometimes the delay happens more frequently than other times. The issue occurs with the beta.chat.completions.parse endpoint, API version 2025-01-01-preview, and o3-mini model. No code changes has been since successful stress tests last week, yet queries now stall for up to 5-6 minutes. A week ago it worked flawlessly, so i’m supsecting the cause is external.

Error:
DEBUG:httpcore.connection:close.started
DEBUG:httpcore.connection:close.complete
DEBUG:openai._base_client:Encountered httpx.TimeoutException
Traceback (most recent call last):
File “Lib\site-packages\httpx_transports\default.py”, line 72, in map_httpcore_exceptions
yield
File “Lib\site-packages\httpx_transports\default.py”, line 377, in handle_async_request
resp = await self._pool.handle_async_request(req)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_async\connection_pool.py”, line 256, in handle_async_request
raise exc from None
File “Lib\site-packages\httpcore_async\connection_pool.py”, line 236, in handle_async_request
response = await connection.handle_async_request(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_async\connection.py”, line 103, in handle_async_request
return await self._connection.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_async\http11.py”, line 136, in handle_async_request
raise exc
File “Lib\site-packages\httpcore_async\http11.py”, line 106, in handle_async_request
) = await self._receive_response_headers(**kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_async\http11.py”, line 177, in _receive_response_headers
event = await self._receive_event(timeout=timeout)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_async\http11.py”, line 217, in _receive_event
data = await self._network_stream.read(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpcore_backends\anyio.py”, line 32, in read
with map_exceptions(exc_map):
File “Lib\contextlib.py”, line 155, in exit
self.gen.throw(value)
File “Lib\site-packages\httpcore_exceptions.py”, line 14, in map_exceptions
raise to_exc(exc) from exc
httpcore.ReadTimeout

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

Traceback (most recent call last):
File “Lib\site-packages\openai_base_client.py”, line 1582, in _request
response = await self._client.send(
^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpx_client.py”, line 1674, in send
response = await self._send_handling_auth(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpx_client.py”, line 1702, in _send_handling_auth
response = await self._send_handling_redirects(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpx_client.py”, line 1739, in _send_handling_redirects
response = await self._send_single_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpx_client.py”, line 1776, in _send_single_request
response = await transport.handle_async_request(request)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “Lib\site-packages\httpx_transports\default.py”, line 376, in handle_async_request
with map_httpcore_exceptions():
File “Lib\contextlib.py”, line 155, in exit
self.gen.throw(value)
File “Lib\site-packages\httpx_transports\default.py”, line 89, in map_httpcore_exceptions
raise mapped_exc(message) from exc
httpx.ReadTimeout
DEBUG:openai._base_client:10 retries left
INFO:openai._base_client:Retrying request to /chat/completions in 0.380341 seconds
DEBUG:openai._base_client:Request options: {‘method’: ‘post’, ‘url’: ‘/deployments/o3-mini/chat/completions’,

Here’s suggestions:

  • Use the latest Azure preview API version if on Azure – and report unresolvable issues to Microsoft. They have a new non-preview version after a long time of all monthly versions being “preview”.
  • Set the timeout on the client when instantiating it, client = AsyncOpenAI(timeout=60*60), instead of in the call. (use the azure version for that)
  • use “background” mode instead of keeping a network connection open: https://platform.openai.com/docs/guides/background - then poll or subscribe with webhooks.
  • check the API library version hasn’t changed on you.

For the Azure deployment of mini (that is different than the OP), timeout is instead your friend - retry in parallel if it is taking 3x as long as expected.