diff --git a/src/components/ProviderForm.tsx b/src/components/ProviderForm.tsx index 09867a5..3d499cf 100644 --- a/src/components/ProviderForm.tsx +++ b/src/components/ProviderForm.tsx @@ -216,14 +216,8 @@ const ProviderForm: React.FC = ({ setSelectedCodexPreset(index); - // 同步 API Key 输入框 - try { - const auth = JSON.parse(authString); - const key = typeof auth.api_key === "string" ? auth.api_key : ""; - setCodexApiKey(key); - } catch { - setCodexApiKey(""); - } + // 清空 API Key,让用户重新输入 + setCodexApiKey(""); }; // 处理 API Key 输入并自动更新配置