Add Google Vertex AI sign-in with Application Default Credentials through gcloud, so a project that disallows API keys can be used · Issue #3000 · brave/bravebot · GitHub
Skip to content

Add Google Vertex AI sign-in with Application Default Credentials through gcloud, so a project that disallows API keys can be used #3000

Open

Description

@bbondy

What opencode does

opencode's Google Vertex AI provider reads GOOGLE_CLOUD_PROJECT, VERTEX_LOCATION (default global) and GOOGLE_APPLICATION_CREDENTIALS, or uses gcloud auth application-default login.

Sources:

What bravebot does today

A google-vertex entry is reached with an API key sent in x-goog-api-key (BACKEND-49 to BACKEND-51). docs/website/docs/customize/providers/openai-compatible.md says signing in with Google Cloud credentials instead of a key is not supported. A project whose organisation disallows API keys, or a person who only has gcloud signed in, cannot use it.

#1091 (closed) added the key path and listed Application Default Credentials as out of scope. #1093 is the express-mode native API with a key and no project. Neither covers Application Default Credentials.

Read: docs/specs/backends.md BACKEND-1, BACKEND-9, BACKEND-10, BACKEND-49, BACKEND-50, BACKEND-51, crates/config/src/provider.rs

Proposal

Add a clause to docs/specs/backends.md saying that where a google-vertex entry or the environment names a project and no key resolves, bravebot asks the Google Cloud CLI for a token with gcloud auth application-default print-access-token and sends it as a bearer token to the built host. The program is fixed by bravebot and not named by a file (BACKEND-1), as the AWS CLI is for Bedrock. The sign-in is asked for before work starts and only for the service the next request goes to (BACKEND-9), a good session is kept until near its stated expiry and dropped when a request disproves it (BACKEND-10), and GOOGLE_APPLICATION_CREDENTIALS is honoured by the tool and not read by bravebot. The clause confirms the command against Google's current documentation. Tests: no key and a project runs the tool; a key present does not; a refused token is reported and drops the kept answer; the token goes only to the built host.

Constraints

BACKEND-1, BACKEND-9, BACKEND-10, BACKEND-49, BACKEND-51, docs/specs/credential-protection.md, docs/specs/sandboxing.md SANDBOX-30 (the program is started with a reduced PATH).

Where this comes from

A comparison of opencode's provider and model options with docs/specs/backends.md and the pages under docs/website/docs/customize/providers/, at 12854a07.

Gap id: parity-vertex-application-default-credentials

Activity

  1. added
    parityCapability a comparable tool documents that bravebot lacks
    importance/p3Ordinary defect or capability worth having
    size/3A few days: several files, a spec clause, new tests
    urgency/p4No deadline; do it when the area is open
    area/backendsRouting, the roster, bedrock, aichat, effort, prompt caching, request signing
    on Oct 21, 2026
  2. self-assigned this
    on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area/backendsRouting, the roster, bedrock, aichat, effort, prompt caching, request signingimportance/p3Ordinary defect or capability worth havingparityCapability a comparable tool documents that bravebot lackssize/3A few days: several files, a spec clause, new testsurgency/p4No deadline; do it when the area is open

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions