From b75509c8a6b56267730e68635a7b910d991deed3 Mon Sep 17 00:00:00 2001 From: Wang Qi Date: Tue, 18 Aug 2026 17:30:47 +0800 Subject: [PATCH] Fix multiple model chat always use the chat model, not using the passing model (#18439) --- api/apps/restful_apis/chat_api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/api/apps/restful_apis/chat_api.py b/api/apps/restful_apis/chat_api.py index 92b32ddc88..cb2643d8bd 100644 --- a/api/apps/restful_apis/chat_api.py +++ b/api/apps/restful_apis/chat_api.py @@ -1304,6 +1304,7 @@ async def session_completion(chat_id_in_arg=""): if not await thread_pool_exec(get_api_key, tenant_id=dia.tenant_id, model_name=chat_model_id): return get_data_error_result(message=f"Cannot use specified model {chat_model_id}.") dia.llm_id = chat_model_id + dia.tenant_llm_id = None dia.llm_setting = chat_model_config elif not dia.llm_id: logging.info("empty chat_model_id in req, use default chat model.")