[BUG]: Files uploaded to thread aren't recognised as files by the LLM #2990

Open
opened 2026-02-28 06:26:13 -05:00 by deekerman · 6 comments
Owner

Originally created by @scottybo on GitHub (Nov 19, 2025).

Originally assigned to: @timothycarambat on GitHub.

How are you running AnythingLLM?

Docker (local)

What happened?

If a user uploads a file to the thread (not the workspace), then talks about "the file", the LLM will respond saying it doesn't have a file.

See example conversation below:

Image

Are there known steps to reproduce?

No response

Originally created by @scottybo on GitHub (Nov 19, 2025). Originally assigned to: @timothycarambat on GitHub. ### How are you running AnythingLLM? Docker (local) ### What happened? If a user uploads a file to the thread (not the workspace), then talks about "the file", the LLM will respond saying it doesn't have a file. See example conversation below: <img width="1051" height="525" alt="Image" src="https://github.com/user-attachments/assets/c70bc4ed-650a-41b8-bff7-bbf109b760b9" /> ### Are there known steps to reproduce? _No response_
Author
Owner

@angelplusultra commented on GitHub (Nov 20, 2025):

If possible, can you provide the file you are using so we can reproduce the bug? Also, what model and provider are you using?

@angelplusultra commented on GitHub (Nov 20, 2025): If possible, can you provide the file you are using so we can reproduce the bug? Also, what model and provider are you using?
Author
Owner

@timothycarambat commented on GitHub (Nov 20, 2025):

Is this reproduction incorrect? Made a new thread, dropped in a file and ran a chat, even cleared and re-ran the prompt. It knew there was a file?

https://github.com/user-attachments/assets/ad22e4ca-e9a5-45fc-96f6-ca90409d2ed5

@timothycarambat commented on GitHub (Nov 20, 2025): Is this reproduction incorrect? Made a new thread, dropped in a file and ran a chat, even cleared and re-ran the prompt. It knew there was a file? https://github.com/user-attachments/assets/ad22e4ca-e9a5-45fc-96f6-ca90409d2ed5
Author
Owner

@scottybo commented on GitHub (Nov 24, 2025):

@timothycarambat the issue happens if the file isn't uploaded in the initial message.

So if you start a chat "Hey, I'd like your help with a putting together a report", and then the AI responds, and then you reply with "Here's the file" it responds saying it doesn't know about the file.

In the screenshot below, I didn't include any files in my first message, but did in the second.

Image
@scottybo commented on GitHub (Nov 24, 2025): @timothycarambat the issue happens if the file isn't uploaded in the initial message. So if you start a chat "Hey, I'd like your help with a putting together a report", and then the AI responds, and then you reply with "Here's the file" it responds saying it doesn't know about the file. In the screenshot below, I didn't include any files in my first message, but did in the second. <img width="821" height="896" alt="Image" src="https://github.com/user-attachments/assets/bc9f46c3-b5ea-42bd-a262-534f5f641e3f" />
Author
Owner

@timothycarambat commented on GitHub (Nov 24, 2025):

The way I was able to reproduce this was to ask a qualifying question, then upload the document as seen above.

  • Specifically, I was using Gemini for this
  • Additionally, the context is 100% injected into the system prompt - so it is present and available
  • When I force the context into the user prompt it acts as if the file was "attached"

Seems the context in the system prompt is seemingly ignored by Gemini in this instance. I was able to reproduce this with OpenAI models as well

@timothycarambat commented on GitHub (Nov 24, 2025): The way I was able to reproduce this was to ask a qualifying question, then upload the document as seen above. - Specifically, I was using Gemini for this - Additionally, the context is 100% injected into the system prompt - so it is present and available - When I force the context into the user prompt it acts as if the file was "attached" Seems the context in the system prompt is seemingly ignored by Gemini in this instance. I was able to reproduce this with OpenAI models as well
Author
Owner

@priyanksperidian commented on GitHub (Nov 26, 2025):

I have the same issue. I have faced it multiple times now. I am using Azure openai model.

@priyanksperidian commented on GitHub (Nov 26, 2025): I have the same issue. I have faced it multiple times now. I am using Azure openai model.
Author
Owner

@dundunn commented on GitHub (Feb 11, 2026):

The way I was able to reproduce this was to ask a qualifying question, then upload the document as seen above.

  • Specifically, I was using Gemini for this
  • Additionally, the context is 100% injected into the system prompt - so it is present and available
  • When I force the context into the user prompt it acts as if the file was "attached"

Seems the context in the system prompt is seemingly ignored by Gemini in this instance. I was able to reproduce this with OpenAI models as well

This seems to be the case with nearly all models. gpt-5 itself can't read any attachments beyond the first one, but gpt-5.1 can most of the time. gemini-2.5-flash can't read any attachments, but gemini-3-flash-preview can read attachments nearly all the time. However if the thread gets long enough they suddenly lose the ability to read attachments again. This is very weird behavior. I was used to using the feature in Open-WebUI where it simply works with every model I tested.

Also one would think the agent should at least be able to do this, since summarizing documents is a default agent skill, but it even performs worse by never being able to read any attachments.

@dundunn commented on GitHub (Feb 11, 2026): > The way I was able to reproduce this was to ask a qualifying question, then upload the document as seen above. > > * Specifically, I was using Gemini for this > * Additionally, the context is 100% injected into the system prompt - so it is present and available > * When I force the context into the user prompt it acts as if the file was "attached" > > Seems the context in the system prompt is seemingly ignored by Gemini in this instance. I was able to reproduce this with OpenAI models as well This seems to be the case with nearly all models. gpt-5 itself can't read any attachments beyond the first one, but gpt-5.1 can most of the time. gemini-2.5-flash can't read any attachments, but gemini-3-flash-preview can read attachments nearly all the time. However if the thread gets long enough they suddenly lose the ability to read attachments again. This is very weird behavior. I was used to using the feature in Open-WebUI where it simply works with every model I tested. Also one would think the agent should at least be able to do this, since summarizing documents is a default agent skill, but it even performs worse by never being able to read any attachments.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/anything-llm#2990
No description provided.