Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(providers): Support Google's Gemini via ADC and Workload Identity - #496

Open
bytemare wants to merge 1 commit into
NVIDIA:mainfrom
bytemare:providers/add-gemini
Open

feat(providers): Support Google's Gemini via ADC and Workload Identity#496
bytemare wants to merge 1 commit into
NVIDIA:mainfrom
bytemare:providers/add-gemini

Conversation

@bytemare

@bytemare bytemare commented Sep 8, 2026

Copy link
Copy Markdown

Adds SKILLSPECTOR_PROVIDER=gemini to support Gemini models on Google Cloud via ADC and GKE Workload Identity, resolving #494.

This supersedes stale PR #12 with Google's current v1 OpenAI-compatible endpoint (aiplatform.googleapis.com/v1/.../endpoints/openapi), updated model metadata (gemini-3.x), and full test coverage.

  • Auth: Uses google-auth with ADC / Workload Identity. Requires GOOGLE_CLOUD_PROJECT and fails if unset (no silent OpenAI fallback)
  • Wire format: Applies the google/ prefix strictly with HTTP. The model registry keys, overrides, and CLI parameters stay as is
  • Endpoints: Supports global (default), us, eu, and regional endpoints (e.g. us-central1), with docs on data residency
  • Testing: Added unit tests (45 cases covering auth caching, wire prefixing, fail-closed handling, and URL construction) and live provider test target
  • Headers: Forwards  x-goog-user-project  only when explicitly configured on ADC credentials, preserving standard billing attribution without imposing  serviceusage.services.use  requirements on Workload Identity service accounts

Closes #494

Add support for `SKILLSPECTOR_PROVIDER=gemini` using Google Cloud Application Default Credentials (ADC) and the OpenAI-compatible endpoint.

- Authenticate via ADC or GKE Workload Identity with `GOOGLE_CLOUD_PROJECT`
- Routes global, us, eu, and regional endpoints
- Apply `google/` model prefix while keeping bare registry keys
- Includes unit and live provider test targets
- Fails without OpenAI fallback

Signed-off-by: bytemare <[email protected]>

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[SkillSpector Review]

Approved at head 2f4dd7927ceb3b018943fb6606e1a7563d70c743.

The ADC/Workload Identity provider is integrated consistently with the provider abstraction, validates project/location before URL construction, refreshes cached credentials under a lock, supports current global/multi-region/regional OpenAI-compatible endpoints, forwards quota-project metadata, and has substantive unit and live-provider coverage. Required CI is green.

This functionally supersedes open PR #12 and overlaps its provider registration, dependency, documentation, and test files; the two implementations should not both merge. Merge gate for this PR: it is mergeable but BEHIND, so update it to the protected branch's required head state first.

@rng1995

rng1995 commented Sep 12, 2026

Copy link
Copy Markdown
Collaborator

@bytemare - Please resolve merge conflicts

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.

feat(providers): Support Google Gemini via Application Default Credentials (ADC) and Workload Identity

2 participants