Add debug logging to trace prompt sizes in worker

This commit is contained in:
2026-02-25 11:54:57 +01:00
parent bdcb013d6b
commit 929f069d14
3 changed files with 5 additions and 0 deletions
Vendored
BIN
View File
Binary file not shown.
View File
+5
View File
@@ -159,6 +159,11 @@ class SwarmWorker:
self._context_used = min(prompt_tokens + request.max_tokens, 131072) # Cap at reasonable max
# Debug: Log the actual prompt size received
import logging
logger = logging.getLogger(__name__)
logger.info(f"🔍 WORKER {self.name}: Received prompt with {len(request.prompt)} chars, ~{prompt_tokens} tokens + {request.max_tokens} max = {self._context_used} context")
try:
start_time = time.time()