How to fix 400 model error

Jake Wittman 0 Reputation points
2025-03-06T00:12:40.4966667+00:00

I keep getting 400 error.

User's image

User's image

Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,784 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Manas Mohanty 1,695 Reputation points Microsoft External Staff
    2025-03-07T12:36:29.3066667+00:00

    Hi Jake Wittman

    Sorry for the delay in response.

    Yes, you are correct API version on model deployment and endpoint are different, Please leverage the code from "View code option" for testing in Python SDK, and Rest API documentation for Postman calls.

    Issue in screenshot mentions - it is not able to find a valid metrics named "Processed prompt tokens" but I cross checked from monitoring/metric tab, it is a valid parameter.

    I think either there is an authentication issue with respect to network or permissions or model deployment itself

    1.Remedial for permission issues

    To read the metrics and use the endpoint with Microsoft Entra credentials, Need roles are

    Cognitive Services Usages Reader + Cognitive Services OpenAI Contributor

    Please assign them for yourself on OpenAI resource

    Reference for roles

    2.Remedial for network authentication

    Please make sure you are connected with VPN gateway to be in same virtual network, or some public IPs has been whitelisted accordingly. Also, you have enabled managed identity

    If DNS resolution is not happening when checked with below. you should fix any corrupt or broken virtual networks links or add missing A-records in Host server.

    Virtual network for OpenAI

    Troubleshoot private endpoint connection

    3.Remedial for corrupt/obsolete deployment

    Please re-create a new Azure OpenAI resource to leverage latest features and check from portal UI first whether you are able to see metrics and call/.

    4. Remedial for policy blocks

    Take a network trace or check in activity logs to find policy blocks from org side and create policy exemptions if needed.

    Hope it helps.

    Thank you

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.