This commit is contained in:
Desktop
2025-11-10 20:24:51 +05:00
parent 4277c93e44
commit 316b320c30
3 changed files with 57 additions and 40 deletions

View File

@@ -158,6 +158,15 @@ class AICore:
# Step 2: Determine model
active_model = model or self._default_model
# Debug logging: Show model from settings vs model used
model_from_settings = self._default_model
model_used = active_model
logger.info(f"[AICore] Model Configuration Debug:")
logger.info(f" - Model from IntegrationSettings: {model_from_settings}")
logger.info(f" - Model parameter passed: {model}")
logger.info(f" - Model actually used in request: {model_used}")
tracker.ai_call(f"Model Debug - Settings: {model_from_settings}, Parameter: {model}, Using: {model_used}")
# Validate model is available and supported
if not active_model:
error_msg = 'No AI model configured. Please configure a model in Integration Settings or Django settings.'

View File

@@ -92,6 +92,11 @@ class AIEngine:
model_config = get_model_config(function_name, account=self.account)
model = model_config.get('model')
# Debug logging: Show model configuration
logger.info(f"[AIEngine] Model Configuration for {function_name}:")
logger.info(f" - Model from get_model_config: {model}")
logger.info(f" - Full model_config: {model_config}")
self.console_tracker.ai_call(f"Model from settings: {model}")
self.console_tracker.ai_call(f"Calling {model or 'default'} model with {len(prompt)} char prompt")
self.console_tracker.ai_call(f"Function ID: {function_id}")