Hello Ayush,
Greetings and Welcome to Microsoft Q&A!
I understand that you're encountering a common issue with the Azure OpenAI API, specifically an Internal Server Error (500) when using the chat.completions.parse
endpoint with the DeepSeek-R1 and Meta-Llama-3.1-8B-Instruct models.
The error may be due to regional dependencies. Certain models may not be fully supported or available in specific Azure regions, leading to backend errors when processing requests.
Also check the below snippet
import os
from azure.ai.inference import ChatCompletionsClient
from azure.core.credentials import AzureKeyCredential
client = ChatCompletionsClient(
endpoint=os.environ["AZURE_INFERENCE_ENDPOINT"],
credential=AzureKeyCredential(os.environ["AZURE_INFERENCE_CREDENTIAL"]),
)
Also kindly refer this Create a client to consume the model.
I hope you understand. And, if you have any further query do let us know.
Thank you!