Can't Delete Files - Assistant doesn't see files either

Error “There was an error deleting the file: No such File object: file-o60v7l23yy7K196HnFQUfmQX”. I’m trying to delete a file but getting this error. Can anyone please help? Thanks in advance!

I was getting the same, then I realized that when a file is deleted, the reference is not being removed from the assistant.

Files are independent entity and just the ID added to the assistant. So what I did, when I get this error, I update the assistant to remove the reference.

Since the files are something independent, and there’s no endpoint to see where these files are being used, I don’t see another way to keep track of that with the API only.

It would be nice if when a file is deleted, the reference removal was cascaded, or to at least not let a file be deleted if it’s being used somewhere.

1 Like