Azure OpenAI BYOK in Cursor Agent fails with “model is required” even though the same Azure deployment works with curl

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Cursor Agent fails when using Azure OpenAI BYOK with my Azure deployment.

The same Azure OpenAI deployment works successfully through curl, but inside Cursor Agent it fails with:

ERROR_OPENAI
Unable to reach the model provider
Provider was unable to process your request

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

This suggests Cursor is reaching the provider but the Agent request is not sending the required model/deployment field correctly.

Steps to Reproduce

  1. Open Cursor IDE on macOS.
  2. Go to Cursor Settings → Models.
  3. Enable Azure OpenAI.
  4. Add Azure OpenAI endpoint: https://recogenie.openai.azure.com
  5. Add Azure OpenAI API key.
  6. Use Azure deployment name: gpt-4o.
  7. Add/enable custom model gpt-4o.
  8. Select gpt-4o in Cursor chat/Agent.
  9. Send a simple message such as “hi” or “is it working”.
  10. Cursor Agent fails with ERROR_OPENAI and “model is required”.

The same Azure deployment works from terminal using curl.

Expected Behavior

Cursor Agent should send the selected Azure deployment/model name correctly and return a normal response from the Azure OpenAI deployment.

Since the same deployment works through curl, Cursor should be able to use it when selected in the model dropdown.

Screenshots / Screen Recordings

Operating System

MacOS

Version Information

Version: 3.6.31 (Universal)
VS Code Extension API: 1.105.1
Commit: 81fcf2931d7687b4ff3f3017858d0c6dee7e2a60
Date: 2026-05-31T17:46:29.630Z
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
xterm.js: 6.1.0-beta.220
OS: Darwin arm64 25.5.0

For AI issues: which model did you use?

Azure OpenAI BYOK
Deployment/model selected in Cursor: gpt-4o
Azure deployment name: gpt-4o
Also tested Azure deployment: gpt-5.4_cursor

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report with the screenshot and version info, this is a known bug. When using BYOK (Azure OpenAI, plus the OpenAI Base URL override and Gemini), the model field gets lost on the way to the provider. That’s why you get 400 "model is required", even though the same deployment works fine via curl.

We’re already tracking this issue, but I can’t share an ETA for a fix yet. Unfortunately there’s no working BYOK-side workaround right now, this needs a fix on our side.

I’ve linked your case to the existing report. I’ll post an update here as soon as we have one.

Thank you Dean it was working until yesterday I am using Cursor pro but it credits eixpred 10 days ago since then until today I am using the azure open ai BYOK

Hi Dean,

Thank you for confirming.

That makes sense. Just to clarify, I am still on Cursor Pro, but my Cursor credits expired around 10 days ago. Since then I was using Azure OpenAI BYOK successfully until yesterday/today morning, so I initially thought the issue might be related to expired Cursor credits or some limitation on BYOK usage.

But from your explanation, I understand there are two separate things:

  1. My Cursor credits are exhausted, which may affect Cursor’s own models/Auto usage.
  2. The current failure with Azure OpenAI BYOK is a known Cursor-side bug where the model field is lost before the request reaches the provider.

The Azure deployment itself works fine through curl, so I agree this looks like a Cursor BYOK routing issue rather than an Azure configuration issue.

Please keep my case linked to the existing report. It would be really helpful if you can update me when there is a fix, because I depend on Azure OpenAI BYOK for development while my Cursor credits are exhausted.

Thanks again for checking this.

Yes, you got it right. These are two independent things.

BYOK uses your own Azure key, and requests go directly to your provider. So running out of Cursor credits doesn’t affect BYOK at all. Credits only apply to Models/Auto that run on Cursor infrastructure. So this isn’t a credits issue.

The current model is required error is the known bug I mentioned above. With BYOK, the model field gets dropped on the way to the provider. Since curl works with the same deployment, your Azure config is fine and this is on our side. Unfortunately, there’s no working BYOK workaround right now.

This case is still linked to the existing report. I’ll post an update here as soon as there’s news on the fix.