From 765956ab09c37b1a26415455a00348d03734c0c7 Mon Sep 17 00:00:00 2001 From: Ivan Tytar Date: Mon, 17 Nov 2025 00:40:50 +0100 Subject: [PATCH] Add debug logging to Router llm_provider --- providers/llm_provider.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/providers/llm_provider.py b/providers/llm_provider.py index 6eff461e..76a43d52 100644 --- a/providers/llm_provider.py +++ b/providers/llm_provider.py @@ -159,8 +159,12 @@ class LLMProvider(Provider): """Get system prompt based on agent or context""" # 1. Check if context.system_prompt provided (e.g., from Gateway) context = req.payload.get("context") or {} + logger.info(f"[DEBUG] payload keys: {list(req.payload.keys())}") + logger.info(f"[DEBUG] context keys: {list(context.keys())}") if "system_prompt" in context: - return context["system_prompt"] + prompt = context["system_prompt"] + logger.info(f"[DEBUG] Using context.system_prompt: {len(prompt)} chars, agent={req.agent}") + return prompt # 2. Agent-specific system prompts if req.agent == "daarwizz":