[INVALID MODEL] Composer doesn't work properly with Azure OpenAI key

Hi, thanks for reporting an issue with Cursor.

Before you report this, we’d appreciate if you can search this forum to see if this issue has already been reported.

If you have done so, please check this box.
on

Describe the Bug

When using the Composer feature with an Azure OpenAI model, the Composer returns an “INVALID MODEL” error and fails to produce any output. This issue occurs only when using an Azure OpenAI key with Composer. For reference, using the Azure OpenAI model in the chat interface works correctly, and using other models (e.g., Claude Sonnet or GPT-4) with Composer also functions without problems.

Steps to Reproduce

  1. Set up an Azure OpenAI model using your Azure OpenAI key.
  2. In the Composer, select the configured Azure OpenAI model.
  3. Attempt to run a command or generate content using the Composer.
  4. The Composer returns an “INVALID MODEL” error and does not produce the expected result.

Expected Behavior

When selecting an Azure OpenAI model in the Composer, it should behave consistently with other models, producing the intended completion without errors.

Screenshots / Screen Recordings

Operating System

MacOS

Current Cursor Version (Menu → About Cursor → Copy)

Version: 0.43.6
VSCode Version: 1.93.1
Commit: a846435528b4b760494a836f96f0739889253530
Date: 2024-12-06T05:11:55.168Z
Electron: 30.5.1
Chromium: 124.0.6367.243
Node.js: 20.16.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 24.1.0

Additional Information

Plan: Pro

A similar issue has been reported on GitHub with multiple comments and discussions.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, Composer won’t work with your API keys. You’ll need a Pro subscription to use it.

Hi deanrie, thank you for replying!
I’ve already subscribe Pro plan, and use my own api key for composer, but it doesn’t work… normal chat and tab is still working tho.

Same for me. I have paid subscription but Composer not working with my own OpenAI key

I solved the issue in windows by deleting the folder cursor in %APPDATA%