Better error message when the account doesn’t have access to a model

When attempting to use gpt-4 with an API key of an account that does not have early access, the API returns an error claiming that the model doesn’t exist. This makes it look like there is a problem with my UI wrapper application. I think the API error message should say that the user doesn’t have access, since gpt-4 is mentioned in the public documentation.

Current error message:

The model: gpt-4 does not exist

My suggestion for the error message:

You don’t have access to the model: gpt-4. You can request early access at hxxps://openai.com/waitlist/gpt-4-api.

(https is replaced with hxxps due to the limit of 2 links per message for new users.)

The link would follow a similar convention as in the error message when you provide an incorrect key:

Incorrect API key provided: x. You can find your API key at hxxps://platform.openai.com/account/api-keys.

Screenshot from my UI with the current API error message:

The application in question can be found at https://assistant.bloat.app. The public version does not yet have the model selection dropdown – I think the current error message will be confusing for most of the users, and I’ll publish the dropdown after this has been fixed.