VERTEX AI Claude stopped working
Issue
It was working perfectly just two days ago, and I haven't made any changes to the configuration on my end. Now, I'm encountering this:
litellm.APIConnectionError: No module named 'anthropic'
Traceback (most recent call last):
File "/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/main.py", line 2123, in
completion
model_response = vertex_ai_anthropic.completion(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio
/vertex_ai_anthropic.py", line 277, in completion
from anthropic import AnthropicVertex
ModuleNotFoundError: No module named 'anthropic'
Retrying in 0.2 seconds...
litellm.APIConnectionError: No module named 'anthropic'
Traceback (most recent call last):
File "/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/main.py", line 2123, in
completion
model_response = vertex_ai_anthropic.completion(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio
/vertex_ai_anthropic.py", line 277, in completion
from anthropic import AnthropicVertex
ModuleNotFoundError: No module named 'anthropic'
Retrying in 0.5 seconds...
litellm.APIConnectionError: No module named 'anthropic'
Traceback (most recent call last):
File "/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/main.py", line 2123, in
completion
model_response = vertex_ai_anthropic.completion(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Users/robot/.local/share/virtualenvs/notion-tGL3aRXJ/lib/python3.12/site-packages/litellm/llms/vertex_ai_and_google_ai_studio
/vertex_ai_anthropic.py", line 277, in completion
from anthropic import AnthropicVertex
ModuleNotFoundError: No module named 'anthropic'
Version and model info
Aider v0.58.1
Main model: vertex_ai/claude-3-5-sonnet@20240620 with architect edit format,
infinite output
Editor model: vertex_ai/claude-3-5-sonnet@20240620 with diff edit format
Weak model: vertex_ai/claude-3-haiku@20240307
Git repo: .git with 12 files
Repo-map: using 1024 tokens, files refresh
VSCode terminal detected, pretty output has been disabled.
Use /help
Thank you for filing this issue.
Can you please try to install or reinstall aider in a separate Python environment? Either with venv or pipx?
Please remove the existing environment/aider installation first, e.g. with pipx:
$ pipx uninstall aider-chat
uninstalled aider-chat! ✨ 🌟 ✨
$ pipx install aider-chat
installed package aider-chat 0.58.1, installed using Python 3.12.6
These apps are now globally available
- aider
done! ✨ 🌟 ✨
This document may be helpful -> https://aider.chat/docs/troubleshooting/imports.html
I'm closing this issue for now.
If any new related concerns arise, please feel free to comment, and I'll reopen the issue.