Cannot use custom gemini model when only openAI API key is set

When only the OpenAPI custom API key is enabled and using a custom-hosted OpenAI-compatible API (with no Google key provided), the Gemini model won’t work and will raise the error:

Cannot read properties of null (reading ‘toLowerCase’)

guessing because it still trying to read the google API key

screenshot below:

Version info:

Version: 1.0.0
VSCode Version: 1.96.2
Commit: 53b99ce608cba35127ae3a050c1738a959750860
Date: 2025-06-04T19:21:22.523Z (1 day ago)
Electron: 34.5.1
Chromium: 132.0.6834.210
Node.js: 20.19.0
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.5.0

Hey, thanks for the report. We’ll investigate.