Struggling with Azure OpenAI setting

I am struggling with BYOK with Azure Open AI. Seems to validate but nothing happens in the AI chat.

whereareyoucursorai

The settings switch is green and validates.
cursorazureopenai

This seems like a bug! Thank you for reporting. Version 0.12.0, coming today or tomorrow, should improve the error messages here and make it easier to debug.

I’m surprised the UI doesn’t ask for information about deployment / engine names. Azure OpenAI resources can and often do have custom names for deployments “wrapping” individual models.

It used to work like a charm, today suddenly oai gpt doesnt work and in setting there is no endpoint but only KEY to be configured, does cursor drop the support for OAI?

@wey are you using a normal OpenAI key? What error are you seeing? Can you screenshot?

No, sorry I was using Azure OpenAI key for long time, as I recall I somehow configured that Key in cursor, but recently Azure OAI seemed to be removed, right?

If that’s on purpose, I’ll subscribe the pro tier then.

what did yall do to fix this? I started getting this issue all of a sudden today and not sure why. I tested the key and it works, but for some reason azure oai on cursor keeps hitting me w errors

Apologies about this! We had some issues yesterday and today, but it should be back up now.

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?

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

2 Likes

same, did you solve it/?

No, its the same error still. No fixes and no replies from cursor either.

@truell20 and @amanrs: This is still not working, it’s not an issue for a day or two. This has been like this for months now. Is nobody using the Azure OpenAI API key in Cursor? What @dan brings up also makes sense. Can you please give an update?

yeah,i have the same issues:
We encountered an issue when using your phx-eastus-4o.openai.azure.com API key. Please check your API key settings and try again. Error: Request failed with status code 400

API Error: {

“error”: {

“message”: “Unknown parameter: ‘metadata’.”,

“type”: “invalid_request_error”,

“param”: “metadata”,

“code”: “unknown_parameter”

}

}

Two (2) things to double check when it comes to using Azure OpenAI for your LLM usage in Cursor:

1. Ensure you are using the correct parameters

Deployment name

Take note that “Deployment Name” is different from “Model Catalog”. This means that you might have your own Deployment called “MyCompany-OpenAI-o1-preview” which uses model “o1-preview”.

:x: You’re not supposed to use o1-preview which is the model name. You’re supposed to use MyCompany-OpenAI-o1-preview.

On Azure Studio, from the sidebar you can find “Shared resources” > “Deployments” to find the deployment name. Don’t find deployment name under “model catalog”.

Base URL

The Base URL should look like this:

https://<your gcp agents resource name>.openai.azure.com

No other trailing path. It’s just that.

API Key

You can find the API key in OpenAI Studio > Home > API Key or OpenAI Studio > Shared Resources > Deployments > API Key.

2. Verify security restrictions on CIDR/IP

Make sure your GCP Agents Resource allows access from your machine’s IP address. This one you can find in GCP and not in Azure OpenAI Studio.


Afterwards, your Cursor should work correctly. Good luck!