Gpt-4-turbo-2024-04-09 not accepting images in thread history

Hi, I’ve been using the gpt-4-turbo-2024-04-09 model via a custom Assistant for a while, but all of a sudden, I get this error:

Error code: 400 - {'error': {'message': 'Invalid model: `gpt-4-turbo-2024-04-09` does not support image message content types.', 'type': 'invalid_request_error', 'param': 'model', 'code': 'invalid_type'}}

The issue happens if I ask the model to generate a plot and return it as an image. First time it works and it successfully returns the image, but then on the next query I get the above error. Worth noting, I am not sending any image in the query, just text. And as far as I am aware, this model should support images.

Thanks!

3 Likes

I’m getting a similar error with gpt-3.5-turbo-1106 overnight, was working well for the past few months

{'error': {'message': 'Invalid model: `gpt-3.5-turbo-1106` does not support image message content types.', 'type': 'invalid_request_error', 'param': 'model', 'code': 'invalid_type'}}
1 Like

I’m having the same issue as the OP.

i have thread history with image output from code_interpreter, and the next message posted on the thread throws this error:

'Invalid model: `gpt-4-turbo-2024-04-09` does not support image message content types.'

2 Likes

i was able to solve this by specifying that the type of generated images must be in “svg” format, so the assistant wouldn’t be able to use them in the thread behind the scenes.

1 Like

encountering this issue too :frowning:

this is via prompting?

Same issue here it seems that when asking the assistant to generate an image file it creates the following message in the system. As you can see it generates teh image file using code interpreter and then causes an issue for any other run requests after that.

Tried to modify the message using https://platform.openai.com/docs/api-reference/messages/modifyMessage but get a bad request when trying to remove it.

{
“id”: “[Removed]”,
“object”: “thread.message”,
“created_at”: 1714403089,
“assistant_id”: “[Removed]”,
“thread_id”: “[Removed]”,
“run_id”:“[Removed]”,
“role”: “assistant”,
“content”: [
{
“type”: “image_file”,
“image_file”: {
“file_id”: “[Removed]”,
}
},
{
“type”: “text”,
“text”: {
“value”: “Here’s a chart showing AT&T’s revenue over the last three years. As you can see, there was a significant drop from 2021 to 2022, followed by a slight increase in 2023. If you have any other requests or need further clarification, feel free to ask.”,
“annotations”:
}
}
],
“file_ids”: ,
“metadata”: {}
}

2 Likes

Small update the turbo models work but just not the standard GPT-4-Turbo works GPT-3.5 and GPT-3.5 Turbo does not work

Thanks for the insight, could you please mention which model did you find to work?

If OpenAI has blindly altered the assistants to place an image into a special format assistant chat history message for computer vision as an experiment on you - where you pay another 1000+ plus tokens every following call to the thread for the AI to unnecessarily look at what it made in code interpreter - then the only model that would be fully compatible is gpt-4-turbo-2024-04-09.

1 Like

I’m using gpt-4-turbo-2024-04-09 and still getting this error : \

BadRequestError: Error code: 400 - {'error': {'message': 'Invalid model: `gpt-4-turbo-2024-04-09` does not support image message content types.', 'type': 'invalid_request_error', 'param': 'model', 'code': 'invalid_type'}}

hopefully this is fixed soon!

4 Likes

Same issue here. After the assistant has created an image in the thread, no other messages can be added.
BadRequestError: Error code: 400 - {'error': {'message': 'Invalid model: gpt-4-turbo-2024-04-09 does not support image message content types.', 'type': 'invalid_request_error', 'param': 'model', 'code': 'invalid_type'}}

2 Likes

Hi folks – we’re really sorry about this breakage and our slow detection of this issue. We just rolled out a fix. Please let me know if things work as expected now. Thank you for reporting this here.

1 Like

@nikunj Does the fix apply to the gpt-3.5 models as well?
See my thread here:


Yeah, my gpt4 is still having problems outputting images.

thanks! I’m able to continue the thread after code interpreter creates an image~

If using GPT-4 Vision, does the model also take in the images created in the thread as part of the input context?

ah, this thread is specifically referring to code interpreter and OpenAI’s assistant API, and not the code interpreter on chatgpt.

i have same error when i use python sdk ,model=‘gpt-4-turbo’

Error in chat completion: Error code: 400 - {'error': {'message': 'Invalid content type. image_url is only supported by certain models.', 'type': 'invalid_request_error', 'param': 'messages.[1].content.[1].type', 'code': None}}