fix: treat GOOGLE_GENAI_USE_VERTEXAI=false as disabled
@dgageot is already working on this.
Since Sep 14, 2026.
- 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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.