Assistant cannot access to attached file in thread message when using file_search as tool

Repro steps

  1. Upload file for assistant.
  2. Create attachments list containing uploaded file id and use file_search as tool type
  • [{‘file_id’: 'file-xxxxxxxxxxxxxxxx, ‘tools’: [{‘type’: ‘file_search’}]}]
  1. Create message to thread with attachments and query something that should trigger assistant to retrieve information from the attached file.


Assistant cannot see/access the uploaded file. All retrieval requests fail.

Additional information

I checked in playground that file has been uploaded successfully and I see vector store with the file attached to thread.

When using code interpreter as tool for attachments seems to work, problem looks to be specific for file search


Could you share a thread ID that I can use to take a deeper look?


Thanks! Here is newly created thread with attached file for file_search


Let me know if more information needed.

I just tested this on my end and it seems to be working. Are you trying this out in the playground? Is the file_search tool enabled?

You may want to include something like “Answer questions based on documents provided” in the assistant instructions and then, ask a question about something inside your file, instead of asking if the assistant can see the file or not.

1 Like

I am testing with OpenAI Python SDK

Today there is new problem when “file_search” tool is enabled, the run stays in incomplete state.
2024-05-01 12:05:04,004 - INFO - _process_messages_non_streaming - Processing run: run_sdXgpSFJDmNhPEUtOlac1dUY with status: incomplete

When I cancel the run, I get error back

2024-05-01 11:57:47,537 - ERROR - process_input - An error occurred while processing the input: Error occurred during processing messages: Error occurred during non-streaming processing run: Error code: 400 - {‘error’: {‘message’: “Cannot cancel run with status ‘incomplete’.”, ‘type’:

So I cannot really test the original issue at the moment due to whole file_search functionality seems looping in incomplete state.

Do you see this problem with Python SDK?

I am having the same issue. My files are not being read properly through the API I set up. As I am new to this I assumed it was my prompt and my code. But when I ask the assistant to list the contents of the reference document it just makes it up.

This is the thread ID: thread_x7UDFy0N7OwrMSvrK22JSvpE

Update - I have tested all of the models with the API calling the assistant. The only one that searches the file is the grpt 4 turbo. ( I only did one test per model). However - with further testing I have found that to be inconsistent also. I’ve tried txt files, Pdf’s and word documents - all have the same issue. Looks like file search broke!


I used Assistant Playground and found the same issue too. The assistant is just not reading the attached file in the thread as is. It often outputs data that doesn’t exist in the attached file.