Azure / Azure/azure-sdk-for-python

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

Open
#41,120 5 comments 1 reaction 1 assignee Assigned to @trrwilson View on GitHub
Client customer-reported needs-team-attention OpenAI question Service Attention
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

- **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 oai-assistants@microsoft.com 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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.