fix: treat GOOGLE_GENAI_USE_VERTEXAI=false as disabled - #4303
yunus25jmi1 wants to merge 1 commit into
Conversation
|
👋 Some commits in this PR are not signed and verified by GitHub. Please sign your commits with a GPG or SSH key registered in your GitHub account, then force-push. Commits that are not verified: See GitHub's guide on signing commits for setup instructions. I've added |
Parse GOOGLE_GENAI_USE_VERTEXAI as a boolean (strconv.ParseBool) in the Gemini client routing, config preflight (gather), and provider auto-detection, so false/0/empty no longer select the Vertex/ADC path where token_key is ignored. Aligns all three with the same semantics and updates the Google provider docs. Fixes docker#4292.
0da4eac to
c0cac39
Compare
aheritier
left a comment
There was a problem hiding this comment.
Code review: the implementation is sound. It correctly treats GOOGLE_GENAI_USE_VERTEXAI=false as disabled, aligns configuration validation with runtime routing, includes regression coverage for the Google custom-provider path using base_url and token_key, and updates the documentation. I found no code-quality issues in the changed lines.
This is not approvable yet because required ci / gate is red at c0cac39dae6d3b1866eaa987a36f916975b17aa0 (test-linux failed in pkg/tools/mcp.TestRemoteClientCallToolAbortsOnContextDeadline, pkg/tools/mcp/remote_test.go:646) and the head commit is still not GitHub-verified (no_user; status/needs-signed-commits remains applied). Once the gate is green and the commit is verified, this is approvable on its code merits.
|
👋 This PR has merge conflicts with the base branch. Please rebase or merge the latest base branch and resolve them. I've moved it to draft and added |
Fixes #4292.
GOOGLE_GENAI_USE_VERTEXAI was enabled by mere presence in pkg/model/provider/gemini/client.go, so =false still routed Google-typed custom providers with base_url + token_key to the Vertex/ADC path where token_key is ignored. It also disagreed with pkg/config/gather.go (non-empty check).
Changes:
Verified: go build ./..., go test ./pkg/model/provider/gemini/ ./pkg/config/, golangci-lint on touched packages, gofmt/go vet clean.