Hey, this is a known issue. When you use a custom API provider, Cursor sends a payload in the Responses API format (input instead of messages, flat tools format, etc.) to the /chat/completions endpoint. That’s why you get the error “field messages is required”.
More details here: Cursor Agent sends Responses API format to /chat/completions endpoint
The team is aware. There’s no timeline for a fix yet, but your report helps with prioritization.
For now, the main workaround is to intercept and convert the payload on the proxy side (Responses API to Chat Completions format). If your provider can’t support that, you can try using Cursor’s built-in routing instead of a base URL override.