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") {
|
if (typeof patch.model === "string") {
|
||||||
delete config.model
|
delete config.model
|
||||||
delete config.model_name
|
delete config.model_name
|
||||||
|
assignOrRemoveEnv(GEMINI_ENV_KEYS.model, patch.model)
|
||||||
}
|
}
|
||||||
assignOrRemoveEnv(GEMINI_ENV_KEYS.baseUrl, patch.apiBaseUrl)
|
assignOrRemoveEnv(GEMINI_ENV_KEYS.baseUrl, patch.apiBaseUrl)
|
||||||
if (typeof patch.apiBaseUrl === "string") {
|
if (typeof patch.apiBaseUrl === "string") {
|
||||||
@@ -800,6 +801,12 @@ function patchGeminiAuthMode(
|
|||||||
next.googleApiKey = ""
|
next.googleApiKey = ""
|
||||||
return next
|
return next
|
||||||
}
|
}
|
||||||
|
if (mode === "model_provider") {
|
||||||
|
next.googleCloudProject = ""
|
||||||
|
next.googleCloudLocation = ""
|
||||||
|
next.googleApplicationCredentials = ""
|
||||||
|
return next
|
||||||
|
}
|
||||||
next.apiBaseUrl = ""
|
next.apiBaseUrl = ""
|
||||||
next.geminiApiKey = ""
|
next.geminiApiKey = ""
|
||||||
next.googleApiKey = ""
|
next.googleApiKey = ""
|
||||||
|
|||||||
Reference in New Issue
Block a user