diff --git a/aider/website/docs/llms/anthropic.md b/aider/website/docs/llms/anthropic.md index d165f9dce..bf2078c0c 100644 --- a/aider/website/docs/llms/anthropic.md +++ b/aider/website/docs/llms/anthropic.md @@ -33,8 +33,8 @@ aider --models anthropic/ Anthropic has very low rate limits. You can access all the Anthropic models via [OpenRouter](openrouter.md) -without rate limits. -For example: `aider --model openrouter/anthropic/claude-3.5-sonnet` +or [Google Vertex AI](vertex.md) +with more generous rate limits. You can use `aider --model ` to use any other Anthropic model. For example, if you want to use a specific version of Opus diff --git a/aider/website/docs/llms/openrouter.md b/aider/website/docs/llms/openrouter.md index 7467ff38b..167d86b88 100644 --- a/aider/website/docs/llms/openrouter.md +++ b/aider/website/docs/llms/openrouter.md @@ -21,7 +21,7 @@ aider --model openrouter// aider --models openrouter/ ``` -In particular, Llama3 70B works well with aider, at low cost: +In particular, many aider users access Sonnet via OpenRouter: ``` python -m pip install aider-chat @@ -29,7 +29,7 @@ python -m pip install aider-chat export OPENROUTER_API_KEY= # Mac/Linux setx OPENROUTER_API_KEY # Windows, restart shell after setx -aider --model openrouter/meta-llama/llama-3-70b-instruct +aider --model openrouter/anthropic/claude-3.5-sonnet ``` diff --git a/aider/website/docs/llms/vertex.md b/aider/website/docs/llms/vertex.md new file mode 100644 index 000000000..ae7b4b2a1 --- /dev/null +++ b/aider/website/docs/llms/vertex.md @@ -0,0 +1,42 @@ +--- +parent: Connecting to LLMs +nav_order: 550 +--- + +# Vertex AI + +Aider can connect to models provided by Google Vertex AI. +You will need to install the +[gcloud CLI](https://cloud.google.com/sdk/docs/install) and [login](https://cloud.google.com/sdk/docs/initializing) with a GCP account +or service account with permission to use the Vertex AI API. + +With your chosen login method, the gcloud CLI should automatically set the +`GOOGLE_APPLICATION_CREDENTIALS` environment variable which points to the credentials file. + +To configure Aider to use the Vertex AI API, you need to set `VERTEXAI_PROJECT` (the GCP project ID) +and `VERTEXAI_LOCATION` (the GCP region) [environment variables for Aider](/docs/config/dotenv.html). + +Note that Claude on Vertex AI is only available in certain GCP regions, +check [the model card](https://console.cloud.google.com/vertex-ai/publishers/anthropic/model-garden/claude-3-5-sonnet) +for your model to see which regions are supported. + +Example `.env` file: + +``` +VERTEXAI_PROJECT=my-project +VERTEXAI_LOCATION=us-east5 +``` + +Then you can run aider with the `--model` command line switch, like this: + +``` +aider --model vertex_ai/claude-3-5-sonnet@20240620 +``` + +Or you can use the [yaml config](/docs/config/aider_conf.html) to set the model to any of the Anthropic models supported by Vertex AI. + +Example `.aider.conf.yml` file: + +```yaml +model: vertex_ai/claude-3-5-sonnet@20240620 +```