Azure OpenAI API key not working

I am new to Cursor. I configured my Azure OpenAI key.

But it is giving me the following error:

{
  "error": {
    "message": "Unrecognized request arguments supplied: metadata, system",
    "type": "invalid_request_error",
    "param": null,
    "code": null
  }
}

What am I doing wrong? Also, there is no place where I can give the API version.

Additional details (Request Id): f7ffdae1-f661-4e16-b8af-2ca3e36366b9

  1. Ensure you are using the correct values
  2. Ensure your GCP Agents Resource permits network requests from your device’s IP address

Clear step-by-step instructions with images: Struggling with Azure OpenAI setting - #15 by darrensapalo

Apparently, using Azure OpenAI with 01-preview model is not possible either because of the hardcoded old api-version=2023-03-15-preview or temperature, top_p and other non supported parameters.

When I switch my Azure OpenAI from working gpt-4o model to o1-preview I get “invalid credentials” but in the “Network” tab of Developer Tools I can see it’s actually Bad Request 400:
Ms-Azureml-Model-Error-Reason: model_error
Ms-Azureml-Model-Error-Statuscode: 400
Strict-Transport-Security: max-age=31536000;
includeSubDomains; preload
X-Content-Type-Options: nosniff
X-Envoy-Upstream-Service-Time: 130
X-Ms-Rai-Invoked: true
X-Ms-Region: East US
X-Ratelimit-Remaining-Requests: 499
X-Ratelimit-Remaining-Tokens: 2999990

3 Likes