aider
aider copied to clipboard
Unable to complete ask: ImageFetchError is in litellm but not in aider's exceptions list
Issue
I cd'ed into my code repository and started Aider with aider --model openrouter/openai/gpt-5:
────────────────────────────────────────────────────────────────────────────────────────
Aider v0.86.1
Main model: openrouter/openai/gpt-5 with diff edit format
Weak model: openrouter/openai/gpt-5-nano
Git repo: .git with 3,617 files
Warning: For large repos, consider using --subtree-only and .aiderignore
See: https://aider.chat/docs/faq.html#can-i-use-aider-in-a-large-mono-repo
Repo-map: using 4096 tokens, auto refresh
────────────────────────────────────────────────────────────────────────────────────────
I asked a question with /ask <My elaborate question here>
Got the following output:
Initial repo scan can be slow in larger repos, but only happens once.
Scanning repo: 100%|███████████████████████████████████████████████████████████████████████████| 3617/3617 [00:28<00:00, 126.30it/s]
Unable to complete ask: ImageFetchError is in litellm but not in aider's exceptions list
────────────────────────────────────────────────────────────────────────────────────────
█░ Waiting for openrouter/openai/gpt-5
Aider hangs indefinitely on that Waiting for openrouter/openai/gpt-5 message.
I'm connecting to OpenRouter using OPENROUTER_API_KEY.
Version and model info
- Aider version:
v0.86.1 - Model:
openrouter/openai/gpt-5
I'm not sure it is correct, but adding
ExInfo("ImageFetchError", False, "Error fetching or processing images")
to EXCEPTIONS in exceptions.py causes this error to (silently?!) disappear. I note that https://docs.litellm.ai/docs/exception_mapping contains many more exceptions that don't exist in the EXCEPTIONS array of ExInfo objects.
that solved the problem for me at least