The option codex5.3 is not available

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Request ID: e28747e7-e1bb-47e2-9eb1-e93005070693
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: {"error":{"message":"Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: {“error”:{“message”:“Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
sqn: Provider Error Provider returned error: {“error”:{“message”:“Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
at Cqk (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36274:27087)
at lOy (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36274:25971)
at Rqk (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36275:6852)
at DNp.run (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36275:11720)
at async rge.runAgentLoop (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47623:65527)
at async _bf.streamFromAgentBackend (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47691:12112)
at async _bf.getAgentStreamResponse (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47691:19276)
at async Zut.submitChatMaybeAbortCurrent (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36407:17835)
at async $s (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:46696:3887)

Steps to Reproduce

Select GPT5.1, ask a question, and then an error is reported

Screenshots / Screen Recordings

Operating System

Linux

Version Information

Version: 3.6.31 (user setup)
VS Code Extension API: 1.105.1
Commit: 81fcf2931d7687b4ff3f3017858d0c6dee7e2a60
Date: 2026-05-31T17:46:29.630Z
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
xterm.js: 6.1.0-beta.220
OS: Windows_NT x64 10.0.26200

For AI issues: which model did you use?

codex5.3

For AI issues: add Request ID with privacy disabled

Request ID: e28747e7-e1bb-47e2-9eb1-e93005070693
{“error”:“ERROR_PROVIDER_ERROR”,“details”:{“title”:“Provider Error”,“detail”:“Provider returned error: {"error":{"message":"Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720","type":"invalid_request_error","param":null,"code":"invalid_request_error"}}”,“isRetryable”:false,“additionalInfo”:{},“buttons”:,“planChoices”:},“isExpected”:true}
Provider Error Provider returned error: {“error”:{“message”:“Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
sqn: Provider Error Provider returned error: {“error”:{“message”:“Failed to deserialize the JSON body into the target type: tools[0]: missing field function at line 1 column 37720”,“type”:“invalid_request_error”,“param”:null,“code”:“invalid_request_error”}}
at Cqk (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36274:27087)
at lOy (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36274:25971)
at Rqk (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36275:6852)
at DNp.run (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36275:11720)
at async rge.runAgentLoop (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47623:65527)
at async _bf.streamFromAgentBackend (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47691:12112)
at async _bf.getAgentStreamResponse (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:47691:19276)
at async Zut.submitChatMaybeAbortCurrent (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:36407:17835)
at async $s (vscode-file://vscode-app/f:/developtools/cursor/resources/app/out/vs/workbench/workbench.desktop.main.js:46696:3887)

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, thanks for the detailed report with the Request ID and stack trace. It really helps.

Looks like you’re using your own OpenAI API key (BYOK) in Settings > Models? The tools[0]: missing field \function`` error comes from OpenAI when sending a request through a user API key. The tools array gets serialized in a format that OpenAI rejects. This is a known issue on our side and it only affects the BYOK setup with this model. I can’t share a fix timeline yet.

Workaround for now:

  • Temporarily disable the custom API key in Settings > Models and use Cursor’s built-in models, or
  • Switch to another model like Auto or Claude. The error is specific to this setup.

Can you confirm this is with your own OpenAI API key? If so, I’ll log it more precisely. If we get an update on the fix, I’ll reply in the thread.