Feature request: Support Vertex AI backend with Application Default Credentials (ADC)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 28/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- gcp, go, google-cloud
- 领域
- authentication, cli, cloud
调研方向
The request describes a behavior, not a location: start by reading how this Go CLI configures its endpoint base URL and credentials for generativelanguage.googleapis.com, and where the --access-token, --user-project flags and config.yaml are parsed. Then check how a request is dispatched to see where a Vertex aiplatform.googleapis.com base URL and an ADC-backed token source would slot in. Done means a documented env/flag switch that selects Vertex AI with ADC (gcloud, GOOGLE_APPLICATION_CREDENTIALS, metadata server), covered by a test; scope parity with Vertex, which the issue itself flags as uncertain.
由索引模型根据 Issue 内容生成。
描述
Description of the feature request:
Add support for using gemini-api against the Vertex AI backend (aiplatform.googleapis.com) authenticated via Google Cloud Application Default Credentials (ADC), in addition to the current Google AI Studio API key (generativelanguage.googleapis.com) flow.
Aligning with the existing google-genai SDK conventions would provide a familiar developer and CI/CD experience, for example:
- Opting into the Vertex AI backend via environment variables or flags (e.g.,
GOOGLE_GENAI_USE_VERTEXAI=true,GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION, or equivalentgemini-apiflags /config.yamlsettings). - Automatically resolving and refreshing credentials via standard ADC (
gcloud auth application-default login,GOOGLE_APPLICATION_CREDENTIALS, or GCE/Cloud Run/GKE metadata servers / Workload Identity), without manually pipinggcloud auth application-default print-access-tokeninto--access-token.
What problem are you trying to solve with this feature?
In enterprise and regulated environments, Cloud Audit Logs (and related GCP governance controls such as IAM and VPC Service Controls) provided by Vertex AI are required for auditing and security governance.
Because of this requirement:
- Issuing and distributing Google AI Studio API keys (
GEMINI_API_KEY) is not permitted. - Even passing an OAuth token with
--access-tokenand--user-projectagainstgenerativelanguage.googleapis.comdoes not satisfy environments that strictly require Vertex AI endpoints and Vertex AI audit logging.
As a result, organizations that depend on Vertex AI audit logging currently cannot adopt gemini-api-cli for coding agents or automation workflows.
Any other information you'd like to share?
I understand that gemini-api-cli is currently generated against the generativelanguage.googleapis.com OpenAPI surface (including the Interactions API, Files API, Environments, etc.), and that Vertex AI has different URL structures and API surface parity.
Even if full feature parity on Vertex AI is not immediately feasible, it would be very helpful to know:
- Whether Vertex AI + ADC support is on the roadmap (even incrementally, e.g., starting with core generation/analysis commands).
- If not planned in the near term, whether there is a recommended alternative for CLI/agent workflows that require Vertex AI audit logging.
- CLI version:
v0.5.0(main)
- 主要语言
- Go
- 星标
- 3k
- 派生
- 219
- 平均合并
- 2 天 2 小时
- 30 天内合并 PR
- 66
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google-gemini/gemini-api-cli 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 73/100
google-gemini/gemini-api-cli#247 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 66/100
google-gemini/gemini-api-cli#231 · 5 个 reaction ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 85/100
google-gemini/gemini-api-cli#227 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
google-gemini/gemini-api-cli#221 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 67/100
google-gemini/gemini-api-cli#246 ·
维护者通常 1 天内回复
查看 google-gemini/gemini-api-cli 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
pg-sharding/spqr#3314 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 80/100
slavakurilyak/awesome-ai-agents#1051 ·
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
zalando/postgres-operator#3257 ·
维护者通常 2 天内回复