GPT5 cannot use web search - please help

When I use the API response end point with web_search_preview enabled, i get:

Error processing project: Error code: 400 - {‘error’: {‘message’: “Hosted tool ‘web_search_preview’ is not supported with GPT-5.”, ‘type’: ‘invalid_request_error’, ‘param’: ‘tools’, ‘code’: None}}

Does anyone know how to fix this?

2 Likes

I am seeing similar with o3, o3-pro, and gpt-5 when using Azure Open AI.
Hosted tool ‘web_search_preview’ is not supported with o3-2025-04-16
Hosted tool ‘web_search_preview’ is not supported with o3-pro-2025-06-10.
Hosted tool ‘web_search_preview’ is not supported with gpt-5-2025-08-07.

But if I use Open AI directly, I don’t have an issue with web tools. Was wondering if you were using Azure Open AI?

Not sure if it has to do with Azure Open AI’s library taking the special parameters and putting them into a separate, secondary extra_json part of the request where direct OpenAI client puts all the parameters, including tools, into the main request body.

No I was using the openai API, the issue went away - i think you just need to wait till they roll it out completely.

I had the issue, but it fixed itself after a few days.