"frontend/src/views/vscode:/vscode.git/clone" did not exist on "10bc7f7042b27fb67c4ef60beb87048bbcce148b"
Commit 9f7ad475 authored by Gemini Wen's avatar Gemini Wen
Browse files

fix(account): clean up stale credentials fields after spreading currentCredentials



When customErrorCodes is disabled or modelMapping is empty, explicitly
delete the fields inherited from currentCredentials spread to avoid
preserving stale values.
Co-Authored-By: default avatarClaude Opus 4.6 <noreply@anthropic.com>
parent 3c83cd8b
......@@ -2275,6 +2275,8 @@ const handleSubmit = async () => {
const modelMapping = buildModelMappingObject(modelRestrictionMode.value, allowedModels.value, modelMappings.value)
if (modelMapping) {
newCredentials.model_mapping = modelMapping
} else {
delete newCredentials.model_mapping
}
} else if (currentCredentials.model_mapping) {
newCredentials.model_mapping = currentCredentials.model_mapping
......@@ -2284,6 +2286,9 @@ const handleSubmit = async () => {
if (customErrorCodesEnabled.value) {
newCredentials.custom_error_codes_enabled = true
newCredentials.custom_error_codes = [...selectedErrorCodes.value]
} else {
delete newCredentials.custom_error_codes_enabled
delete newCredentials.custom_error_codes
}
// Add intercept warmup requests setting
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment