From ac2ff432ed2b0f4d0b2df4039b243cae0fe2ccca Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sat, 1 Aug 2026 16:57:16 +0800 Subject: [PATCH] fix: remove RC4 decrypt from cockpit_chat, use plaintext api_key --- wwwroot/api/cockpit_chat.dspy | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/wwwroot/api/cockpit_chat.dspy b/wwwroot/api/cockpit_chat.dspy index 3024131..637ebeb 100644 --- a/wwwroot/api/cockpit_chat.dspy +++ b/wwwroot/api/cockpit_chat.dspy @@ -143,12 +143,7 @@ async def _build_context(sor, iteration_id, task_id, max_msgs, system_prompt): async def _call_llm(model_info, messages, temperature): """Call LLM API directly using model config from llm table.""" api_base = model_info.api_base.rstrip('/') - # Try decrypt; DB may have plaintext or RC4-encrypted keys - raw_key = model_info.api_key or '' - try: - api_key = password_decode(raw_key) - except Exception: - api_key = raw_key + api_key = model_info.api_key or '' model_id = model_info.model_id headers = {