Skip to content

Azure throws an irrelevant error when using OpenAI ResponseAPI with web search #41120

Open
@jayashankargs

Description

@jayashankargs
  • Package Name: openai
  • Package Version: 1.76.2
  • Operating System: Windows 11
  • Python Version: Python 3.11.9

Describe the bug

When trying to use web search in response API with below inputs.

{
"model":"gpt-4.1-mini",
"input": "Using web search, tell me today's date and 1 random / cool bit of news which happened within the past 12 hours.",
"tools": [
{
"type": "web_search_preview",
"search_context_size": "low"
}
]
}

Sdk giving below error

{
"error": {
"message": "An error occurred while processing your request. You can retry your request, or contact us through our help center at [email protected] if the error persists. Please include the request ID e57eb9dd-14d5-41fd-9ef1-1558e91d31a1 in your message.",
"type": "server_error",
"param": null,
"code": "server_error"
}
}

This makes there is something wrong with server side, but actually as per the documentation the web search is not currently supported.

To Reproduce

Below is the input request made.

{
"model":"gpt-4.1-mini",
"input": "Using web search, tell me today's date and 1 random / cool bit of news which happened within the past 12 hours.",
"tools": [
{
"type": "web_search_preview",
"search_context_size": "low"
}
]
}

Expected behavior

Expected output should the error with message the web search feature is currently not supported.

Please check and update regarding this.

Metadata

Metadata

Assignees

Labels

ClientThis issue points to a problem in the data-plane of the library.OpenAIService AttentionWorkflow: This issue is responsible by Azure service team.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions