Azure Open AI BYOK

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

I’m trying to use an Azure OpenAI deployment in Cursor.

Azure side

  • Base URL: https://<resource>.openai.azure.com/

  • Deployment name: gpt-4o

  • API version: 2025-01-01-preview

  • Azure shows the working endpoint as:

    https://<resource>.openai.azure.com/openai/deployments/gpt-4o/chat/completions?api-version=2025-01-01-preview
    

Problem

  • Cursor asks for Base URL, Deployment/Model, and API key.
  • If I paste the Azure Base URL, Cursor seems to call an OpenAI-style path (/v1/... or /chat/completions) → 404 Resource not found.
  • If Cursor sends its own fields (e.g. extra_body), Azure rejects them → 400 Unrecognized request argument supplied: extra_body.

Confirmed

  • Direct curl to Azure works, so the deployment is fine.

Question

  • How do I configure Cursor so it uses Azure’s path
    /openai/deployments/<deployment>/chat/completions?api-version=...
    and stops adding OpenAI-only fields?

Steps to Reproduce

Trying with Azure will give a lot of problems for users.

Operating System

Windows 10/11

Current Cursor Version (Menu → About Cursor → Copy)

Version:2.0.38
VSCode Version:1.99.3

Does this stop you from using Cursor

No - Cursor works, but with this issue

Hey @Snoop1!

Even if you get it to work with 4o, I’m afraid you will be limited to older non-reasoning models that support the completions API, as the newer models only support the responses API (which is not supported by Cursor’s BYOK).

Not a solution, but feel free to check out this project I created: GitHub - gabrii/Cursor-Azure-GPT-5: A service that allows Cursor to use Azure GPT-5 deployments.

It adapts the Azure “responses” endpoints for GPT-5, to the OpenAI “completions” endpoints for non-reasoning models (which are fully supported by cursor)