fix: decrypt api_key before calling LLM in cockpit_chat

This commit is contained in:
yumoqing 2026-08-01 16:32:46 +08:00
parent 0d6266b088
commit 13c466069f

View File

@ -143,7 +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('/')
api_key = model_info.api_key
api_key = password_decode(model_info.api_key) if model_info.api_key else ''
model_id = model_info.model_id
headers = {