Consistent file read issue. Token limit?

I am consistently encountering
“An internal error has occurred. Please retry or report in Troubleshooting guide  |  Gemini API  |  Google AI for Developers
when gemini-2.5-pro-preview-05-06 in Firebase Studio is trying to read any file over about 5000 tokens.

The interesting thing is if i go over to aistudio.google.com it has no problem reading and updating the same files. Perhaps there is some hidden token limit in Firebase that is preventing the models from working with larger inputs?

1 Like

I have the same issue with reading and updating files of even a modest size. Anything over a few hundred lines. Its making it impossible to continue with my project because your codebase will not stay small forever. I will try the aistudio work around but it doesn’t sound ideal.