diff --git a/backend/cmd/server/VERSION b/backend/cmd/server/VERSION index 1734876e..1fb19d78 100644 --- a/backend/cmd/server/VERSION +++ b/backend/cmd/server/VERSION @@ -1 +1 @@ -0.1.74.5 +0.1.74.6 diff --git a/frontend/src/components/account/EditAccountModal.vue b/frontend/src/components/account/EditAccountModal.vue index 8299b72b..8986a350 100644 --- a/frontend/src/components/account/EditAccountModal.vue +++ b/frontend/src/components/account/EditAccountModal.vue @@ -1823,6 +1823,7 @@ const handleSubmit = async () => { if (props.account.platform === 'openai' && (props.account.type === 'oauth' || props.account.type === 'apikey')) { const currentExtra = (props.account.extra as Record) || {} const newExtra: Record = { ...currentExtra } + const hadCodexCLIOnlyEnabled = currentExtra.codex_cli_only === true if (openaiPassthroughEnabled.value) { newExtra.openai_passthrough = true } else { @@ -1830,10 +1831,15 @@ const handleSubmit = async () => { delete newExtra.openai_oauth_passthrough } - if (props.account.type === 'oauth' && codexCLIOnlyEnabled.value) { - newExtra.codex_cli_only = true - } else { - delete newExtra.codex_cli_only + if (props.account.type === 'oauth') { + if (codexCLIOnlyEnabled.value) { + newExtra.codex_cli_only = true + } else if (hadCodexCLIOnlyEnabled) { + // 关闭时显式写 false,避免 extra 为空被后端忽略导致旧值无法清除 + newExtra.codex_cli_only = false + } else { + delete newExtra.codex_cli_only + } } updatePayload.extra = newExtra