mirror of
https://github.com/vxcontrol/pentagi.git
synced 2026-07-20 23:57:11 -04:00
[GH-ISSUE #310] How to provide Google Vertex AI API key in the .env file #98
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @lethalcyanide on GitHub (May 12, 2026).
Original GitHub issue: https://github.com/vxcontrol/pentagi/issues/310
Hi Team,
I have tried multiple methods of adding Anthropic's Claude models Vertex AI keys but the application couldn't parse it. Please help me on this configuration.
@asdek commented on GitHub (May 29, 2026):
hey @lethalcyanide
Vertext AI is not supported now, to connect this provider try to use LiteLLM a front of PentAGI and custom provider type on PentAGI side to connect to LiteLLM.
@mrigankad commented on GitHub (May 31, 2026):
Hi @lethalcyanide — thanks for the question.
Native Google Vertex AI is not currently a supported provider. The supported provider types are:
openai,anthropic,gemini,bedrock,ollama,custom,deepseek,glm,kimi,qwen(seebackend/pkg/providers/provider/provider.go). A few notes specific to Google/Anthropic:GEMINI_API_KEY/GEMINI_SERVER_URLtarget Google AI Studio (https://generativelanguage.googleapis.com), not Vertex AI — they don't accept Vertex project credentials.ANTHROPIC_API_KEY/ANTHROPIC_SERVER_URLtarget the direct Anthropic API, not Claude-via-Vertex.So there is no
.envkey that takes a Vertex AI key directly today.Recommended workaround: the
custom(OpenAI-compatible) provider via a proxyPentAGI ships a
customprovider that talks to any OpenAI-compatible/chat/completions+/modelsendpoint. Front Vertex AI with a proxy such as LiteLLM (which natively supports both Gemini and Claude on Vertex) and point the custom provider at it:Your Vertex credentials (service-account JSON /
GOOGLE_APPLICATION_CREDENTIALS, project, region) live in the proxy configuration, not in PentAGI. The proxy handles auth and exposes plain OpenAI-style endpoints that PentAGI consumes.If you want native Vertex support
That would be a new provider (
vertex) implementing theprovider.Providerinterface plus registration/config/migration wiring. If that's of interest, it's worth opening a separate enhancement issue so maintainers can scope it — happy to help there.Would the LiteLLM-proxy route work for your setup?
@mrigankad commented on GitHub (May 31, 2026):
Opened #321 to track native Vertex AI provider support as a scoped enhancement (with an implementation plan following the repo's "Adding a New LLM Provider" checklist). The LiteLLM-proxy workaround above remains the path until that lands.