A bad model does raise a 400 error “bad request” - and shows that they have goofball “allow” logic precedence in the validation.
b'{\n "error": {\n "message": "Hosted tool \'image_generation\' is not supported with gpt-4.o.",\n "type": "invalid_request_error",\n "param": "tools",\n "code": null\n }\n}'
no tool:
b'{\n "error": {\n "message": "The requested model \'gpt-4.o\' does not exist.",\n "type": "invalid_request_error",\n "param": "model",\n "code": "model_not_found"\n }\n}'
The API will gladly repeat back any model sent, giving a false impression that your bad model exists with the error produced…
{
“error”: {
“message”: “Hosted tool ‘image_generation’ is not supported with code as stupid as yours!!.”,
“type”: “invalid_request_error”,
“param”: “tools”,
“code”: null
}
}