docker / docker/docker-agent

fix: treat GOOGLE_GENAI_USE_VERTEXAI=false as disabled

Open
#4,292 0 comments 0 reactions 1 assignee View on GitHub

@dgageot is already working on this.

Since Sep 14, 2026.

area/config area/providers/gemini
Dominant language
Go
Stars
3.3k
Forks
462
Avg merge
1d 10h
Merged PRs (30d)
273

Description

pkg/model/provider/gemini/client.go currently enables the Vertex AI path when GOOGLE_GENAI_USE_VERTEXAI is merely present, regardless of its value. Therefore GOOGLE_GENAI_USE_VERTEXAI=false can still route a Google-typed custom provider with an explicit base_url and token_key to the Vertex/ADC path, where token_key is not used.

This also disagrees with pkg/config/gather.go, which treats the setting as enabled only when non-empty.

Expected behavior: interpret GOOGLE_GENAI_USE_VERTEXAI as a boolean (or at minimum do not enable Vertex for false), align client routing with configuration validation, and add regression coverage for a custom Google provider using base_url + token_key when the variable is false.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.