Hi Wenjun Che,
The OpenAI SDK (openai package) does not support DeepSeek-V3 in AI Foundry, which is why you're seeing the "Backend returned unexpected response" error.
To resolve this, use the Azure AI Inference SDK (@azure-rest/ai-inference) instead. This SDK is designed for AI Foundry models like DeepSeek-V3, and it does not require specifying an apiVersion.
For more information: Azure AI Inference SDK Documentation
I hope this information helps. Thank you!