I entered the API Key, and when I tried using the Ctrl + S shortcut to switch tabs, the API Key became an empty string. However, the Base URL didn’t have this problem. Why is this?
Steps to Reproduce
Enabling the OpenAI API Key option and entering a custom API Key, then switching tabs, the API Key will now be an empty string; only the Base URL will be recorded correctly.
Hey, thanks for the report. Everything here is working as intended, let me explain.
The OpenAI API Key field is a write-only secret input. The key is saved to encrypted secret storage as soon as you enter it. There’s no separate Save button, and Ctrl+S doesn’t apply here. For security reasons, Cursor never shows the saved key again, so after you switch tabs the field will always look empty. Base URL is not a secret, so it stays visible, which is the difference you noticed.
Please check by going back to the Models tab:
The key field shows the placeholder “Secret saved. Enter a new key to replace it”
There’s a toggle next to the section title called “Use OpenAI API key”
If that’s what you see, the key is saved and you’re all set.
If it still says “Enter your OpenAI API Key” and the toggle is missing, then the save didn’t go through. Please send a screenshot of that state and we’ll dig in.