Where does the bug appear (feature/product)?
Cursor IDE
Describe the Bug
I’m trying to use a custom openai compatible provider.
This looks like a bug in how Cursor is constructing the request to send to the AI provider
The error is saying that the API request being sent is malformed. Specifically:
-
Missing
messagesarray: The request is supposed to include amessagesfield (the conversation history to send to the AI), but it’sundefined- it’s not being included at all. -
18 broken tool definitions: All the tools being sent have issues:
- They’re missing a required
functionobject - The
typefield has invalid values (showing “function” or “custom” when the API only accepts “web_search” or “web_search_preview”)
- They’re missing a required
Steps to Reproduce
Setup OpenAi apikey with a custom base url.
Operating System
MacOS
Version Information
Version: 3.1.17
VSCode Version: 1.105.1
Commit: fce1e9ab7844f9ea35793da01e634aa7e50bce90
Date: 2026-04-19T19:33:58.189Z
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 25.3.0
For AI issues: which model did you use?
GPT 5.4
For AI issues: add Request ID with privacy disabled
Request ID: 4012efee-db83-494c-a919-bbffed5aff25
Does this stop you from using Cursor
Yes - Cursor is unusable