An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
Error 500 using Azure OpenAI Responses API
Hello,
I am testing using the Reponses API via python and keep getting "InternalServerError: Error code: 500 - {'error': {'message': 'An error occurred while processing your request. You can retry your request, or contact us through an Azure support request at: https://go.microsoft.com/fwlink/?linkid=2213926 if the error persists. Please include the request ID 1cbeb774-0aee-4ef5-b890-0d9b5e6b3660 in your message.', 'type': 'server_error', 'param': None, 'code': 'server_error'}}"
Sometimes the same code will run with no issue, but more often than not I get this error.
Below is a minimum reproducible example. Please let me know if more info is needed. The error is almost always referring to response2, though sometimes response1 also gets the error. I have confirmed that I am well below any rate limits as well.
Thank you
# Initialize Azure OpenAI client
client = AzureOpenAI(
api_version='2025-03-01-preview',
azure_endpoint=endpoint,
azure_ad_token_provider=token_provider,
)
#First response
response1 = client.responses.create(
model='mymodel_gpt-4o',
instructions = 'This is a system level prompt',
input= [{"role":"user", "content":"This is my initial question"}],
top_p=0.1,
)
#Second response, using the context of the first response
response2 = client.responses.create(
model='mymodel_gpt-4o',
previous_response_id=response1.id,
input = [{"role": "user", "content": 'This is my next question'}],
top_p=0.1,
)