Hey, thanks for the report!
The issue: GPT-5/GPT-5.1 Codex models require OpenAI’s /v1/responses API endpoint, but BYOK (Bring Your Own Key) in Cursor currently only supports /v1/chat/completions. This causes the 404 error you’re seeing.
Workaround: Use GPT-5.1 Codex without a custom OpenAI API key - it works fine with Cursor’s built-in API. You can toggle your API key on/off in Settings > Models > API Keys (or use Cmd+Shift+0).
The team is already tracking this limitation. See the related discussion here: With custom model api key get request error