from fastapi import APIRouter from .. import debuglog router = APIRouter(prefix="/api/debug", tags=["debug"]) @router.get("/requests") def recent_requests(): """Most-recent-first log of provider requests and responses. A single process-wide ring buffer. It holds the prompts this install sent to its own Ollama, which is exactly what the person running it needs to diagnose a turn, and there is nobody else it could expose them to. """ return debuglog.recent()