Fix:empty chat model fallback (#15477)

### What problem does this PR solve?

empty chat model fallback

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
buua436
2026-06-02 10:00:57 +08:00
committed by GitHub
parent 1696d4ead6
commit eaa19bdb02

View File

@@ -1203,7 +1203,7 @@ async def session_completion(chat_id_in_arg=""):
return get_data_error_result(message=f"Cannot use specified model {chat_model_id}.")
dia.llm_id = chat_model_id
dia.llm_setting = chat_model_config
else:
elif not dia.llm_id:
logging.info("empty chat_model_id in req, use default chat model.")
_, tenant_info = TenantService.get_by_id(dia.tenant_id)
if not tenant_info or not tenant_info.llm_id: