From 5ff63cc4a83a82d08c396e32a66b48e53cfb76ee Mon Sep 17 00:00:00 2001 From: mason5052 Date: Fri, 22 May 2026 12:50:19 -0400 Subject: [PATCH] docs(llm): clarify Vertex AI configuration options Issue #310 asks how to provide a Google Vertex AI API key in .env for Anthropic Claude. PentAGI currently has no dedicated Vertex AI provider path in code: backend/pkg/config and backend/cmd/installer do not read VERTEX_API_KEY, GOOGLE_APPLICATION_CREDENTIALS, or any vertex_ai variable. The supported routes for Claude today are direct Anthropic (ANTHROPIC_API_KEY / ANTHROPIC_SERVER_URL) and AWS Bedrock (BEDROCK_*). Document this explicitly so users do not assume a hidden Vertex AI configuration path exists: - README.md: add a NOTE callout inside the Anthropic Provider Configuration section listing the supported routes and pointing users who need Vertex AI today at the OpenAI-compatible custom LLM provider path (LLM_SERVER_URL / LLM_SERVER_KEY / LLM_SERVER_MODEL) fronted by a translating gateway, with a caveat that reliability depends on the gateway. - backend/docs/config.md: add a matching Note paragraph under the Anthropic section that points at the AWS Bedrock and custom LLM provider sections, and states that no VERTEX_API_KEY or GOOGLE_APPLICATION_CREDENTIALS variable is wired into provider initialization today. Docs-only change. No runtime Go code, no installer behavior, no generated files, no new environment variables. All env var names cited in the new text already exist in the current PentAGI .env.example, backend/pkg/config, and backend/cmd/installer. --- README.md | 10 ++++++++++ backend/docs/config.md | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/README.md b/README.md index 7ddc15baa..c854d2290 100644 --- a/README.md +++ b/README.md @@ -1567,6 +1567,16 @@ ANTHROPIC_API_KEY=your_anthropic_api_key PROXY_URL=http://your-proxy:8080 ``` +> [!NOTE] +> **Google Vertex AI for Claude models** +> +> PentAGI does not currently expose a dedicated Google Vertex AI configuration path for Anthropic Claude in `.env`. There is no separate Vertex AI API key field at this time, and the existing Anthropic variables (`ANTHROPIC_API_KEY`, `ANTHROPIC_SERVER_URL`) target the direct Anthropic API. Supported routes for Claude are: +> +> - **Direct Anthropic API**: `ANTHROPIC_API_KEY` and `ANTHROPIC_SERVER_URL` (see above). +> - **AWS Bedrock**: `BEDROCK_*` variables (see [AWS Bedrock Provider Configuration](#aws-bedrock-provider-configuration)). +> +> If you need to use Vertex AI today, the safest supported workaround is to expose Vertex AI through an OpenAI-compatible proxy or gateway that translates Vertex AI calls into the Chat Completions format while preserving the chat and tool-call behavior PentAGI relies on, then point the Custom LLM provider at that gateway via `LLM_SERVER_URL`, `LLM_SERVER_KEY`, and `LLM_SERVER_MODEL`. This path is only as reliable as the gateway you choose. + #### Supported Models PentAGI supports 10 Claude models with tool calling, streaming, extended thinking, adaptive thinking, and prompt caching. Models marked with `*` are used in default configuration. diff --git a/backend/docs/config.md b/backend/docs/config.md index 26b2c342e..56016dd1b 100644 --- a/backend/docs/config.md +++ b/backend/docs/config.md @@ -490,6 +490,13 @@ These settings control the integration with various Large Language Model (LLM) p | AnthropicAPIKey | `ANTHROPIC_API_KEY` | *(none)* | API key for Anthropic Claude services | | AnthropicServerURL | `ANTHROPIC_SERVER_URL` | `https://api.anthropic.com/v1` | Server URL for Anthropic API requests | +**Note on Google Vertex AI**: PentAGI does not currently expose a dedicated Vertex AI configuration path for Anthropic Claude in `.env`. The variables above target the direct Anthropic API. To run Claude through a non-Anthropic-hosted backend, use one of: + +- **AWS Bedrock**: see the [AWS Bedrock LLM Provider](#aws-bedrock-llm-provider) section below and configure the `BEDROCK_*` variables. +- **OpenAI-compatible gateway in front of Vertex AI**: expose Vertex AI through a proxy or gateway that translates requests into the Chat Completions format while preserving the chat and tool-call behavior PentAGI requires, then configure it as a [custom LLM provider](#custom-llm-provider) (`LLM_SERVER_URL`, `LLM_SERVER_KEY`, `LLM_SERVER_MODEL`). Reliability of this path depends on the gateway you choose. + +There is no `VERTEX_API_KEY` or `GOOGLE_APPLICATION_CREDENTIALS` variable wired into PentAGI's provider initialization today. + ### Ollama LLM Provider | Option | Environment Variable | Default Value | Description |