Skip to content

feat(drivers): add Vertex AI driver with OAuth authentication#22

Open
zamal-db wants to merge 1 commit intoRightNow-AI:mainfrom
zamal-db:feat/vertex-ai-oauth
Open

feat(drivers): add Vertex AI driver with OAuth authentication#22
zamal-db wants to merge 1 commit intoRightNow-AI:mainfrom
zamal-db:feat/vertex-ai-oauth

Conversation

@zamal-db
Copy link

Adds a new vertex-ai provider that authenticates using GCP service account credentials via OAuth 2.0 bearer tokens. This enables enterprise deployments with existing GCP subscriptions instead of requiring separate API keys.

Features:

  • VertexAIDriver with full streaming support
  • Token caching (50 min) with auto-refresh via gcloud CLI
  • Auto-detection of project_id from service account JSON
  • Security: tokens stored with Zeroizing
  • Provider aliases: vertex-ai, vertex, google-vertex
  • 8 unit tests

Usage:
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json # Set provider=vertex-ai, model=gemini-2.0-flash in config.toml

Closes #11

@zamal-db
Copy link
Author

zamal-db commented Feb 27, 2026

fwiw, tested end-to-end with a GCP service account + Vertex AI (gemini-2.0-flash). All 8 unit tests pass, clippy is clean, and the streaming path works. Happy to squash/rebase if anything needs adjustment.

@zamal-db zamal-db force-pushed the feat/vertex-ai-oauth branch from 4ef0f75 to 2bf9f6c Compare February 27, 2026 00:20
Adds a new vertex-ai provider that authenticates using GCP service account
credentials via OAuth 2.0 bearer tokens. This enables enterprise deployments
with existing GCP subscriptions instead of requiring separate API keys.

Features:
- VertexAIDriver with full streaming support
- Token caching (50 min) with auto-refresh via gcloud CLI
- Auto-detection of project_id from service account JSON
- Security: tokens stored with Zeroizing<String>
- Provider aliases: vertex-ai, vertex, google-vertex
- 8 unit tests

Usage:
  export GOOGLE_APPLICATION_CREDENTIALS=/path/to/sa.json
  # Set provider=vertex-ai, model=gemini-2.0-flash in config.toml

Closes RightNow-AI#11
@zamal-db zamal-db force-pushed the feat/vertex-ai-oauth branch from 2bf9f6c to 34b0e7a Compare February 27, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Support “bring-your-subscription” logins (e.g., OpenAI Codex) in addition to API-key/token billing

1 participant