Hello, OpenAI API Key in cursor doesnt work right now, when you ask any OpenAI model after providing your own working API Key it outputs:
Request failed with status code 400: {
“error”: {
“message”: “Item ‘xxxxxxxxxxxx’ of type ‘reasoning’ was provided without its required following item.”,
“type”: “invalid_request_error”,
“param”: “input”,
“code”: null
}
}
Steps to Reproduce
Set OpenAI API key and chat with any OpenAI reasoning model like GPT 5.1 Codex
Expected Behavior
The OpenAI models should work properly after provoding the correct api key.
Operating System
MacOS
Current Cursor Version (Menu → About Cursor → Copy)
Hey, thanks for the report. The error “Item of type ‘reasoning’ was provided without its required following item” suggests that Cursor might be sending an invalid payload format to OpenAI’s reasoning models.
To help us look into this, please share:
Request ID: chat menu → Copy Request ID
The exact model name you’re using from the model dropdown
Where this happens: Ask, Agent, or Inline Edit (CMD+K)?
Your OpenAI API key setup: Settings → Models → OpenAI API Key section - any custom configuration there?
You also mentioned that “regular chat works” - does this mean Chat (CMD+L) works but Agent mode doesn’t, or did you mean something else?
Hi, not original author but getting same error. My request ID is ad746c8f-c3a8-4f41-b1ab-4f66036d947b.
Not using anything specific other than custom openAI key. Using the Agent mode with postgres MCP. Happens with GPT-5.1, GPT-5.1 High, gpt-5-high-fast (custom added). Max and non max modes.
My version is 2.1.49 (arm64 mac) and seems like it happens more in that version than in 2.0.XX versions.