Inappropriate error message when max_tokens=0 for gpt-4-vision-preview

During a recent operation of the GPT-4-vision-preview for generating chat completions, I inadvertently set the ‘max_tokens’ parameter to 0. As a result, I encountered the following error:

OpenAI API hits BadRequestError: Error code: 400 - {‘error’: {‘message’: “You requested a length 0 completion, but did not specify a ‘logprobs’ parameter to see the probability of each token. Either request a completion with length greater than 1, or set ‘logprobs’ to 0 (to see the probabilities of each token you submitted) or more (to also see the probabilities over alternative tokens).”, ‘type’: ‘invalid_request_error’, ‘param’: None, ‘code’: None}} [Error reference: https://platform.openai.com/docs/guides/error-codes/api-errors]

I have noted that the error message received may not be relevant in this context, considering that the ‘logprobs’ parameter is applicable exclusively within the completion APIs.