What happened?
Gemini cli breaks down when asked to process long pdf files. It works just fine with short pdfs, but if you ask to process a long one, such as a book, the chain of though shows it is thinking about unrelated stuff (such as funny memes) and eventually the process returns an error. See the following example:
What is the book @Interest-Rate-Models.pdf about?
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ ✔ ReadManyFiles Will attempt to read and concatenate files using patterns: `Interest-Rate-Models.pdf` (wit… │
│ │
│ ### ReadManyFiles Result (Target Dir: │
│ `/Users/nicoloceneda/Library/CloudStorage/Dropbox/University/books`) │
│ │
│ Successfully read and concatenated content from **1 file(s)**. │
│ │
│ **Processed Files:** │
│ - `Interest-Rate-Models.pdf` │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
✕ [API Error: [{
"error": {
"code": 500,
"message": "Internal error encountered.",
"errors": [
{
"message": "Internal error encountered.",
"domain": "global",
"reason": "backendError"
}
],
"status": "INTERNAL"
}
}
]]
What did you expect to happen?
Gemini cli should have processes the pdf correctly.
Client information
Details
│ CLI Version 0.1.1 │
│ Git Commit 852210e1 (local modifications) │
│ Model gemini-2.5-pro │
│ Sandbox no sandbox │
│ OS darwin
Login information
Google Account
Anything else we need to know?
The file size is was 9.2MB, and the same command works just fine in the web interface.
What happened?
Gemini cli breaks down when asked to process long pdf files. It works just fine with short pdfs, but if you ask to process a long one, such as a book, the chain of though shows it is thinking about unrelated stuff (such as funny memes) and eventually the process returns an error. See the following example:
What did you expect to happen?
Gemini cli should have processes the pdf correctly.
Client information
Details
Login information
Google Account
Anything else we need to know?
The file size is was 9.2MB, and the same command works just fine in the web interface.