How to set-up vertex?
Issue
I had installed all it asked me to, and set the variables it requested, still complains about needing to install:
BadRequestError: litellm.BadRequestError: VertexAIException BadRequestError - vertexai import failed
please run pip install -U google-cloud-aiplatform "anthropic[vertex]"
Version and model info
No response
Thanks for trying aider and filing this issue.
Did you do the pip install that the error specified?
Thanks for trying aider and filing this issue.
Did you do the pip install that the error specified?
Yup, and installed the google cloud cli in order to authenticate and so on, and nothing, no idea.
Did you install aider with pip or pipx? You'd need to install the google packages differently if you installed aider with pipx.
Did you install aider with
piporpipx? You'd need to install the google packages differently if you installed aider withpipx.
I did install with pipx how shall I do it?
@adriangalilea , I am using vertex AI and this is all I have to do
pip install google-cloud-aiplatform "anthropic[vertex]"
but additionally - you have to make sure you are logged in with gcloud auth login and is connected to the right project which has Vertex AI by checking gcloud config get-value project and if you need to change it gcloud config set project your-project-name
@adriangalilea , also after doing the above it is sometimes required to close the current terminal window and open a new one so the changes will apply. Try that and I hope this will work for you
@adriangalilea , also after doing the above it is sometimes required to close the current terminal window and open a new one so the changes will apply. Try that and I hope this will work for you
Will test out in a couple weeks, thanks.
For posterity, if your aider install is installed with uv (you can check with cat $(which aider)) you need to use uv's additional tool dependency system using --with:
uv tool install --force --python python3.12 --with google-cloud-aiplatform --with "anthropic[vertex]" aider-chat@latest