feat(proxy): add an opt-in debug mode to the dashboard #18
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/dashboard-debug"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
An opt-in debug mode for the dashboard, off by default. With it on, each request id in the recent requests table links to
/_slp/request/<id>, which shows:modelwas rewritten and to what, whetherstreamwas forced for aggregation, and the transport error of each attempt that failed.or
--dashboard-debugfor a one-off run (turn-on only, like--log-requests).An id is a link only when there is a page behind it: plain text with debug off, and for a request whose body could not be read (it never gets an id). An id that has aged out of the last 50 gets a 404 that says so.
What turning it on means
Authorization,Cookie,Set-Cookie, anything containingtoken,secret,password,credential, orapi-key— and shows as[redacted, 21 bytes]. Bodies are not redacted.Worth a look in review
serveCompletionnow wraps the client'sResponseWriterin a recorder when debug is on. It tees what passes through and implementsFlushandUnwrap;MaxBytesReaderis still handed the server's own writer. A test sends the same streaming request with debug on and off and compares status, headers, body, and flushing.tokenorkey-like words.Testing
go vetandgo test -race ./...pass. New tests cover: nothing kept or linked with debug off; every recent request linked with it on; the request page's contents for a served, a failed, and an unrouted request; credential redaction in both the stored detail and the rendered pages; responses unaltered by recording; body truncation and JSON indentation; and the request pages honouring the allow list. Also run against fake backends and checked in headless Chromium; not yet run against a real deployment.🤖 Generated with Claude Code
Automated review by pr-reviewer v0.52.3 | Safety Check | Ministral 3 Instruct | tracking id
r-bf4298-d66bf1This is an AI-generated review and may contain mistakes.
Status: ❌ Failed
This review couldn't be completed: that model isn't loaded on the inference service right now, and no alternate model was able to review it either. Consider splitting this PR into smaller changes. Tracking id
r-bf4298-d66bf1.Comment
@pr-reviewer-bot retryto try again.