From c36e5d38fc7cb3d7b814f69e1c739034554b1395 Mon Sep 17 00:00:00 2001 From: kunalpratapsingh Date: Fri, 26 Jun 2026 18:57:39 +0530 Subject: [PATCH] passing proper title fix for openrouter. --- chatbot/celery_tasks/title_tasks.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/chatbot/celery_tasks/title_tasks.py b/chatbot/celery_tasks/title_tasks.py index 94d05ab..1395b7d 100644 --- a/chatbot/celery_tasks/title_tasks.py +++ b/chatbot/celery_tasks/title_tasks.py @@ -73,10 +73,13 @@ def generate_session_title(session_id, language='en'): tool_choice = 'auto' system_msg = {'role': 'system', 'content': company_bot.context} + custom_model = (company_bot.other_params or {}).get('custom_model') + effective_model = custom_model.strip() if isinstance(custom_model, str) and custom_model.strip() else company_bot.llm_model + response = call_llm_gateway( messages=[system_msg] + list(messages), provider=company_bot.provider, - model=company_bot.llm_model, + model=effective_model, params=build_gateway_params(company_bot), tools=tools or None, tool_choice=tool_choice,