fix: remove RC4 decrypt from cockpit_chat, use plaintext api_key

This commit is contained in:
yumoqing 2026-08-01 16:57:16 +08:00
parent 328798f5a7
commit ac2ff432ed

View File

@ -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): async def _call_llm(model_info, messages, temperature):
"""Call LLM API directly using model config from llm table.""" """Call LLM API directly using model config from llm table."""
api_base = model_info.api_base.rstrip('/') api_base = model_info.api_base.rstrip('/')
# Try decrypt; DB may have plaintext or RC4-encrypted keys api_key = model_info.api_key or ''
raw_key = model_info.api_key or ''
try:
api_key = password_decode(raw_key)
except Exception:
api_key = raw_key
model_id = model_info.model_id model_id = model_info.model_id
headers = { headers = {