diff --git a/internal/lua/plugins/channels.lua b/internal/lua/plugins/channels.lua index 842862e..feb5fc3 100644 --- a/internal/lua/plugins/channels.lua +++ b/internal/lua/plugins/channels.lua @@ -5671,6 +5671,17 @@ function plugin.account_delete(req) dropAccountSource(plat.id, acct.id) __llmsproxy_secrets.delete(acct.credentialRef) poolRemove(plat.id, acct.id) + -- ⚠️ 删完最后一个账号时,必须**清掉旧版单账号源** `channels-`。 + -- + -- 真实缺陷(本次实测抓到):旧代码建的 `channels-` 源的 base_url 是 + -- **旧口径**(buddy 缺 `/v2/chat/completions` 前缀)。它不随账号删除而消失, + -- 于是以同名模型对外服务,但打的是**错的 URL** —— + -- 症状是推理返回**空内容**(HTTP 200 但没有正文),而列表里模型看着正常。 + -- 我在这上面绕了很久(一会儿 'OK' 一会儿 '',因为内核在多个源之间轮转)。 + -- ⚠️ 只在池**已空**时清:还有账号时不该动它(它可能是运维手工配的兼容源)。 + if #poolList(plat.id) == 0 then + __llmsproxy_kernel.call("remove_source", { name = "channels-" .. plat.id }) + end logEvent("账号删除 " .. plat.id .. "/" .. acct.id) return { status = 200, json = { ok = true } } end