fix(settings): fix Gemini CLI model edit resetting provider fields and not persisting
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -676,6 +676,7 @@ function patchGeminiConfigText(
|
||||
if (typeof patch.model === "string") {
|
||||
delete config.model
|
||||
delete config.model_name
|
||||
assignOrRemoveEnv(GEMINI_ENV_KEYS.model, patch.model)
|
||||
}
|
||||
assignOrRemoveEnv(GEMINI_ENV_KEYS.baseUrl, patch.apiBaseUrl)
|
||||
if (typeof patch.apiBaseUrl === "string") {
|
||||
@@ -800,6 +801,12 @@ function patchGeminiAuthMode(
|
||||
next.googleApiKey = ""
|
||||
return next
|
||||
}
|
||||
if (mode === "model_provider") {
|
||||
next.googleCloudProject = ""
|
||||
next.googleCloudLocation = ""
|
||||
next.googleApplicationCredentials = ""
|
||||
return next
|
||||
}
|
||||
next.apiBaseUrl = ""
|
||||
next.geminiApiKey = ""
|
||||
next.googleApiKey = ""
|
||||
|
||||
Reference in New Issue
Block a user