Azure / Azure/azure-sdk-for-python

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

Aperta
#41,120 5 commenti 1 reazione 1 assegnatario Assegnata a @trrwilson Vedi su GitHub
Client customer-reported needs-team-attention OpenAI question Service Attention
Lingua principale
Python
Stelle
5.6k
Fork
3.4k
Merge medio
2g 2h
PR unite (30g)
213

Descrizione

- **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.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.