Remove image from the thread, causes the assistant run to fail

Using gpt-4o and OpenAI Python SDK, if you add image to thread, the assistant replies with expected analysis of the image. However, if you then remove the image using client.files.delete(file_id), the conversation thread becomes unusable due to assistant run always will fail with message=‘Failed to fetch image file: file-xxxxx. Check if the file has been deleted.’

I would expect the runs on the thread would still be usable, even if the image has been deleted.

1 Like