Web_search tool frequently timing out, other issues

I’ve been using the web_search tool since just about the first release. It has worked well enough for the most part, but lately, it has been timing out on nearly every request. I am using this with the official Typescript library, latest version. Here’s how I’m calling it:

    const response = await this.client.responses.create({
      input,
      instructions: systemPrompt,
      max_output_tokens: 5000,
      model: 'gpt-5.4',
      parallel_tool_calls: false,
      prompt_cache_key: `generate_response_${userId.toString()}`,
      prompt_cache_retention: '24h',
      reasoning: {
        effort: 'medium',
        summary: 'auto',
      },
      safety_identifier: `user_${userId.toString()}`,
      store: false,
      text: {
        format: {
          type: 'text',
        },
        verbosity: 'low',
      },
      tools: {
        search_context_size: 'low',
        type: 'web_search',
      },
    });

Input is maybe 4-6K tokens max. Using whatever the default request timeout is, which appears to be 2-3m. Here are some queries I can recall failing recently:

  • What is today’s public itinerary for [public official]
  • What is the unemployment rate in Australia?
  • What is the current price of VTSAX and VBTLX?

Nothing too complex. It doesn’t seem to matter what the query is, it times out the request most of the time. Happens with gpt-5.2 as well.

I also noticed that it can return so many tokens that the request fails because it hits max_output_tokens, so I had to increase that considerably. Even for really simple web searches.

One other thing I happened to just stumble on: enabling the web_search tool appears to increase the number of input tokens by 4500+! Granted, these are quickly cached, but that’s definitely something that should be noted in the docs.

Here is the same input without web_search:

  usage: {
    input_tokens: 101,
    input_tokens_details: { cached_tokens: 0 },
    output_tokens: 81,
    output_tokens_details: { reasoning_tokens: 0 },
    total_tokens: 182
  },

And with web_search:

  usage: {
    input_tokens: 4615,
    input_tokens_details: { cached_tokens: 0 },
    output_tokens: 65,
    output_tokens_details: { reasoning_tokens: 0 },
    total_tokens: 4680
  },

Ultimately I ended up moving to a custom service based on Exa (which is incredible btw) but I wanted to provide some feedback for anyone else seeing this issue, and for the team working on this because it is nice having a built in search tool. It just needs some work to be usable.