Skip to content

[FEATURE REQ] CreateWebSearchTool() support "web_search" #811

@The-Mojoo

Description

@The-Mojoo

Describe the feature or improvement you are requesting

When I use the model gpt-5-chat-latest, the following error is prompted
Image
I tried to modify the source code by adding the following code

private const string WebSearchValue = "web_search";
private const string WebSearchPreviewValue = "web_search_preview";
internal static InternalToolType WebSearch { get; } = new InternalToolType(WebSearchValue);
internal static InternalToolType WebSearchPreview { get; } = new InternalToolType(WebSearchPreviewValue);

I found that the number of classes to be added kept increasing, which made it not concise and elegant enough. I hope the official implementation allows, when using ResponseTool.CreateWebSearchTool(), the option to choose ResponseTool.CreateWebSearchPreviewTool(), or to add a parameter to control whether it is a preview.

Additional context

The reason for using the gpt-5-chat-latest model is that there were organizational verification issues when using gpt-5.
Image
However, even after verification, there is still such a prompt. Refer to Gpt5 400: Your organization must be verified to stream this model. I used gpt-5-chat-latest, so the above error was displayed.I also cannot guarantee that after passing the organization verification, there won't still be an error with ResponseTool.CreateWebSearchTool().

Metadata

Metadata

Assignees

Labels

area: responsesThis item is related to Responsesfeature-requestCategory: A new feature or enhancement to an existing feature is being requested.issue-addressedWorkflow: The OpenAI maintainers believe the issue to be addressed and ready to close.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions