Not able to use azure api key

Hey

Can anyone please tell me what am I doing wrong here?

I have added my base URL as “https://<base_url>.openai.azure.com”
and deployment name is - “gpt-4o-mini”

Still it is giving me message - Upgrade for more usage. Get more credits on higher plans.

I am on Pro plan as of now!

What should I do?

Can anyone please help? what am i doing wrong here?

Hey, thanks for the report. Your Azure configuration looks correct, and the deployment in Azure is active.

The issue is most likely which model you’re selecting in chat. Azure BYOK doesn’t automatically replace all models. You need to explicitly pick the Azure model from the dropdown.

Please check:

  1. In the model dropdown (where it currently shows Auto), your Azure model gpt-4o-mini should appear. Select that specific one.

  2. Try adding the model manually: Cursor Settings → Models → Add Model → enter gpt-4o-mini (exactly the same name as your Azure deployment).

  3. In Azure Portal, try Azure Portal → Open in playground to confirm the deployment works.

If the Azure model still doesn’t show up in the list after that, restart Cursor.

I changed the Deployment Name - gpt-4.1-mini

Base URL - https://tigestai8810248134.openai.azure.com

and getting this error

{“error”:{“type”:“client”,“reason”:“invalid_input”,“message”:“model is required”,“retryable”:false}}

I added the model and it is showing in place of Auto

I verified in azure playground, this model works, plus it works with other projects , but not in cursor

Request details - Request ID: 05dcfb3d-a8ba-47f8-988e-fdc0bd06951c
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{\"error\":{\"type\":\"client\",\"reason\":\"invalid_input\",\"message\":\"model is required\",\"retryable\":false}}\n\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
ConnectError: [invalid_argument] Error
at dou.$endAiConnectTransportReportError (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12706:475325)
at JXe._doInvokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:23170)
at JXe._invokeHandler (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:22912)
at JXe._receiveRequest (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:21544)
at JXe._receiveOneMessage (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:20361)
at pMt.value (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:13633:18388)
at Ce._deliver (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:2962)
at Ce.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:49:3283)
at jyt.fire (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:12691:12156)
at MessagePort. (vscode-file://vscode-app/Applications/Cursor.app/Contents/Resources/app/out/vs/workbench/workbench.desktop.main.js:15681:18406)

Thanks for the info. Your Azure configuration looks correct, and the gpt-4.1-mini deployment is active.

The “model is required” error is a Cursor-side bug where the model parameter isn’t being passed correctly to the Azure API. Similar issues were fixed in recent versions.

Please check:

  1. Cursor version: Go to Help > About Cursor and share the version. If it’s below 2.3.34, update it (Cursor Settings > Beta > Early Access, then restart).

  2. Try Ask mode: At the bottom of the chat, switch from “Agent” to “Ask”. Agent mode has more issues with Azure BYOK.

If it still doesn’t work after updating and switching to Ask mode, send me your Cursor version and we’ll dig deeper. I already have the Request ID.

Request ID: f5fd9c19-229e-45d3-aa4d-13d8901d1db0
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{\"error\":{\"type\":\"client\",\"reason\":\"invalid_input\",\"message\":\"model is required\",\"retryable\":false}}\n\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

I am on this version - 2.3.41 (Universal)

Tried restarting and also tried Ask
this is not just the issue with Azure but also with the gemini keys, it is also giving me error

Request ID: 04129f73-3ef7-4da2-9f67-a79350a2a159
{“error”:“ERROR_OPENAI”,“details”:{“title”:“Unable to reach the model provider”,“detail”:“We encountered an issue when using your API key: Streaming error\n\nAPI Error:\n\n\n{\"error\":{\"type\":\"client\",\"reason\":\"invalid_input\",\"message\":\"model is required\",\"retryable\":false}}\n\n”,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}

Can you please help me

Hey @deanrie

Can you please check this?

I saw your latest update. The issue is still happening on version 2.3.41, even after switching to Ask mode and restarting. This is clearly more serious than expected, especially since it affects both Azure and Gemini BYOK.

I’ll pass this to the dev team for a deeper investigation.

@deanrie @Kunaal_Dhawan , any updates on this? I’m getting the same error on version 2.4.37, just updated to pro to make my azure api key work instead of auto, but I am blocked here..

Version: 2.4.37
VSCode Version: 1.105.1
Commit: 7b9c34466f5c119e93c3e654bb80fe9306b6cc70
Date: 2026-02-12T23:15:35.107Z
Build Type: Stable
Release Track: Default
Electron: 39.2.7
Chromium: 142.0.7444.235
Node.js: 22.21.1
V8: 14.2.231.21-electron.0
OS: Darwin arm64 25.2.0

I have the same issue. It is shockingly disappointing that this has not been addressed yet. Seem like a clear issue with a malformed /incorrect request format being sent from Cursor to the providers.

Version: 2.6.12 (Universal)
VSCode Version: 1.105.1
Commit: 1917e900a0c4b0111dc7975777cfff60853059d0
Date: 2026-03-04T21:41:18.914Z
Build Type: Stable
Release Track: Default
Electron: 39.6.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Darwin arm64 24.6.0

I have encountered the same problem. Since our company policy restricts us to Azure OpenAI, we are finding it very difficult to proceed. I hope this can be fixed shortly.

Version: 2.6.19 (user setup)
VSCode Version: 1.105.1
Commit: 224838f96445be37e3db643a163a817c15b36060
Date: 2026-03-12T04:07:27.435Z
Build Type: Stable
Release Track: Default
Electron: 39.4.0
Chromium: 142.0.7444.265
Node.js: 22.22.0
V8: 14.2.231.22-electron.0
OS: Windows_NT x64 10.0.26200

Request failed with status code 400: {“error”:{“type”:“client”,“reason”:“invalid_input”,“message”:“model is required”,“retryable”:false}}

Azure OpenAI API configuration is unavailable. Please help resolve this as soon as possible.

Hey everyone following this thread, this is still a known issue. Cursor is sending the model parameter incorrectly to the Azure API, which causes the "model is required" error.

The team is aware and tracking it. Reports that include exact versions help us prioritize. On our side, we can see the bug affects multiple versions from 2.3.x to 2.6.x.

As a temporary workaround, there’s a community proxy that adapts the request format for Azure: GitHub - gabrii/Cursor-Azure-GPT-5: A service that allows Cursor to use Azure GPT-5 deployments. · GitHub

Sadly, there’s no ETA for a fix yet. I’ll update the thread when there’s news.

I am stuck too its happening for me too

Version: 3.0.12

VSCode Version: 1.105.1

Commit: a80ff7dfcaa45d7750f6e30be457261379c29b00

Date: 2026-04-04T00:13:18.452Z (3 days ago)

Layout: editor

Build Type: Stable

Release Track: Default

Electron: 39.8.1

Chromium: 142.0.7444.265

Node.js: 22.22.1

V8: 14.2.231.22-electron.0

OS: Darwin arm64 24.6.0

Is there NO fix for us Azure Open AI users since BYOK does not work

Please fix

Hey @Larry_G, I see you’re hitting the same issue. This is a known bug: Cursor doesn’t pass the model parameter correctly in requests to the Azure API.

I shared a workaround a bit above: a community proxy that adapts the request format for Azure: GitHub - gabrii/Cursor-Azure-GPT-5: A service that allows Cursor to use Azure GPT-5 deployments. · GitHub

Sadly, there’s no fix in Cursor yet. The team is aware.

I’ll post an update here if anything changes.

Hey @deanrie what cursor needs to do is add the ‘api version’ as a field to the config, reason being is that not all deployment uses the same api version, so in effect since they are passing the version # as a one shop fits all it will never work.

They have to fix the config so it takes 4 values Base url, Deployment name, Api key and Api version. I already passed on this info so we should see a fix soon (hopefully)

@Larry_G good point. The api-version issue is really part of the bigger picture. Cursor currently hardcodes api-version, which breaks some deployments.

I’ve passed this feedback to the team, both about making api-version configurable and about the main bug with the model parameter.

For now, the only workaround is still the community proxy I mentioned above. I’ll update the thread when I have news.

Are there any updates on this? I have been trying to use Azure, but I am getting the same error as the people above. I would appreciate a fix soon!

I updated to beta, and it seems to be working. Uploading images comes up with the same error, however