From 3d9b518bf73537fa2bd5f2359e4030f9a59ca96f Mon Sep 17 00:00:00 2001 From: EMRG Evolution Date: Fri, 7 Aug 2026 01:47:20 +0800 Subject: [PATCH] emrg: Redact LLM request/stream URLs in debug logs (query-string tokens in base_url) --- emrg/server/llm.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emrg/server/llm.py b/emrg/server/llm.py index 6bfca75..8f162f4 100644 --- a/emrg/server/llm.py +++ b/emrg/server/llm.py @@ -124,7 +124,7 @@ async def chat( last_error = None for attempt in range(MAX_RETRIES + 1): logger.debug("LLM request: url=%s model=%s (attempt %d/%d)", - url, self.config.model, attempt + 1, MAX_RETRIES + 1) + _redact_text(url), self.config.model, attempt + 1, MAX_RETRIES + 1) resp = await client.post(url, headers=headers, json=payload) @@ -193,7 +193,7 @@ async def chat_stream( self.last_response_status = 0 self.last_response_headers = {} - logger.debug("LLM stream: url=%s model=%s", url, self.config.model) + logger.debug("LLM stream: url=%s model=%s", _redact_text(url), self.config.model) # Accumulated state across chunks (reset on retry) content_parts: list[str] = []