OpenRouter client persists complete prompts, source context, and responses in INFO logs
Affected versions: confirmed on main at commit d92819a9 (the project publishes no tagged release).
Summary
OpenRouterClient.acall logs the full request payload and the full provider response at INFO. The default logging configuration writes INFO-level logs to a rotating file the deployment persists on disk by default.
Details
# api/clients/openrouter.py
log.info(f"Request body: {api_kwargs}")
...
data = await response.json()
log.info(f"Received response from OpenRouter: {data}")
# api/logger.py
handlers["ps_file"] = {
"class": "logging.handlers.RotatingFileHandler",
"level": "INFO",
"filename": path,
}
POC
(available upon request)
Impact
Any principal with access to the application's log files (or a log-aggregation pipeline they feed into) recovers the full repository source context and conversation content sent to and received from OpenRouter for every request, when OpenRouter is the selected provider.
Suggested fix: remove payload/response content from INFO logging; log only model, status, timing, and token-count metadata. A fix is included in the linked PR.
Fix: #597