Hello CodeKidz,
Thank you for reaching out to Microsoft Q&A forum!
As I understood that your are encountering a 500 error in a production environment. I tried to repro the scenario in the Sweden central region without any issues below are the screen shot,
I suggest few steps you can take to troubleshoot the issue.
A 500 status code indicates that the server encountered an unexpected condition that prevented it from fulfilling the request. This can occur for various reasons, such as server overload, misconfigurations, or issues with the code itself
Retry the request: If you encounter a 500 Internal Server error, you can try retrying the request after a short period of time. Transient errors can occur, and retrying may result in a successful response.
To ensure a stable and reliable model inference service
Use Application Insights or similar tools to capture detailed logs and identify the root cause of the error.
Please let us know if you have any further questions. Thank you!