Gpt-5 calls web_seach_preview tool 10x more than before after 5th of September

I’m using the openai-go package to call the Response API with the GPT-5 model and the web_search tool. I’m trying to find images for some products in our application.

Recently, I noticed a strange increase in cost in our OpenAI platform related to web_search. Without any code changes, after around the 5th of September, GPT-5 is calling the web_search tool 10 times more aggressively than before. When I tried to limit the number of calls in the response API request by the MaxToolCalls parameter, the results degraded so much.

1 Like

After checking logs, I noticed most of these web_search calls are actually empty!

This is a sample of an empty query to web_search:

"payload": {

    "action": {

"button": "",

"command": null,

"env": null,

"keys": null,

"path": null,

"pattern": "",

"query": "",

"scroll_x": 0,

"scroll_y": 0,

"sources": null,

"text": "",

"timeout_ms": 0,

"type": "search",

"url": "",

"user": "",

"working_directory": "",

"x": 0,

"y": 0

    },

"arguments": "",

"call_id": "",

"code": "",

"container_id": "",

"content": null,

"encrypted_content": "",

"error": "",

"id": "ws_08a832d9160501f80068ca80816d6481a29464660123bba1d1",

"input": "",

"name": "",

"output": "",

"outputs": null,

"pending_safety_checks": null,

"queries": null,

"result": "",

"results": null,

"role": "assistant",

"server_label": "",

"status": "completed",

"summary": null,

"tools": null,

"type": "web_search_call"

  },

I also checked how many of these tool calls are empty for 5 random items:

  • 3 out of 10
  • 6 out of 11
  • 8 out of 9
  • 9 out of 16
  • 5 out of 6
1 Like

I’m facing a similar issue. Could you tell me how to set MaxToolCalls?

1 Like

If you’re using openai-go, You need to set this parameter in the ResponseNewParams
Like this:

params := responses.ResponseNewParams{
		Model: openai.ChatModelGPT5,
		Input: responses.ResponseNewParamsInputUnion{
			OfString: param.Opt[string]{
				Value: prompt,
			},
		},
		Tools: []responses.ToolUnionParam{
			{
				OfWebSearch: &responses.WebSearchToolParam{
					Type:              responses.WebSearchToolTypeWebSearch,
					SearchContextSize: responses.WebSearchToolSearchContextSizeLow,
				},
			},
		},
		Instructions: param.Opt[string]{Value: searchSystemPrompt},
		Reasoning: shared.ReasoningParam{
			Effort: shared.ReasoningEffortLow,
		},
		MaxToolCalls: param.Opt[int64]{Value: c.maxToolCalls},
	}
2 Likes