diff --git a/routes/claude.py b/routes/claude.py index 706c022..e9c7b25 100644 --- a/routes/claude.py +++ b/routes/claude.py @@ -314,7 +314,7 @@ Remember: Output ONLY the JSON, no other text. The response must start with {{ a deepseek_resp.close() except Exception: pass - cleanup_account(request) + # 注意:不在此处调用 cleanup_account,由外层 finally 统一处理 return StreamingResponse( claude_sse_stream(), diff --git a/routes/openai.py b/routes/openai.py index 5ba60f2..f79283f 100644 --- a/routes/openai.py +++ b/routes/openai.py @@ -435,8 +435,7 @@ IMPORTANT: If calling tools, output ONLY the JSON. The response must start with except Exception as e: logger.error(f"[sse_stream] 异常: {e}") - finally: - cleanup_account(request) + # 注意:不在此处调用 cleanup_account,由外层 finally 统一处理 return StreamingResponse( sse_stream(), diff --git a/webui/src/components/Login.jsx b/webui/src/components/Login.jsx index 2ebe5d6..c06c12e 100644 --- a/webui/src/components/Login.jsx +++ b/webui/src/components/Login.jsx @@ -87,8 +87,8 @@ export default function Login({ onLogin, onMessage }) { checked={remember} onChange={e => setRemember(e.target.checked)} /> -
-