aider icon indicating copy to clipboard operation
aider copied to clipboard

Unable to complete ask: ImageFetchError is in litellm but not in aider's exceptions list

Open rubin55 opened this issue 2 months ago • 2 comments

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

rubin55 avatar Oct 18 '25 09:10 rubin55

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.

rubin55 avatar Oct 18 '25 12:10 rubin55

that solved the problem for me at least

yennor avatar Oct 22 '25 02:10 yennor