From 02c1ee8aa84c67d159add094c64cf8ca92e59ceb Mon Sep 17 00:00:00 2001 From: opsx Date: Sun, 1 Nov 2026 02:01:37 +0800 Subject: [PATCH] =?UTF-8?q?docs(ai):=20TestConfig=20key=20=E8=A7=A3?= =?UTF-8?q?=E6=9E=90=E6=B3=A8=E9=87=8A=E7=B2=BE=E7=A1=AE=E5=8C=96(?= =?UTF-8?q?=E4=BB=85=E6=B3=A8=E9=87=8A,=E6=97=A0=E9=80=BB=E8=BE=91?= =?UTF-8?q?=E5=8F=98=E6=9B=B4)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/controllers/ai.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/controllers/ai.go b/backend/controllers/ai.go index 1514fc0..0a8e9f8 100644 --- a/backend/controllers/ai.go +++ b/backend/controllers/ai.go @@ -57,7 +57,7 @@ func (ctrl *AIController) TestConfig(c *gin.Context) { if req.Model != "" { cfg.Model = req.Model } - // 传了新的 key 就用新的(掩码/空则沿用已保存的) + // key 解析:传新值才覆盖;掩码/空一律沿用已保存的真实 key(GetAIConfig 返回的是解密后的真值) if req.APIKey != "" && !containsMask(req.APIKey) { cfg.APIKey = req.APIKey }