Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4b26698
feat(gateway): a server-admin reads a recording consumer's recordings…
GottZ Nov 27, 2026
57236ac
test(gateway): the recordings view keeps no translation, its trust ru…
GottZ Nov 27, 2026
ead5a39
refactor(llm): the recording translation keeps no error value nobody …
GottZ Nov 27, 2026
77b050a
fix(gateway): a block of a body the retention cleared answers 409 bod…
GottZ Nov 27, 2026
32b9d10
feat(web): /gateway/recordings shows a server-admin the recording con…
GottZ Nov 27, 2026
b2fc6fb
test(web): [baseline] visual and aria baselines of the three new reco…
GottZ Nov 27, 2026
00cb0f0
fix(web): [baseline] a status code in the recordings list stays on on…
GottZ Nov 27, 2026
10eb7bf
test(web): the Stop flow counts the translate calls at its own held r…
GottZ Nov 27, 2026
f06f2d4
fix(gateway): a translation refused before the wire leaves no audit r…
GottZ Nov 27, 2026
af0cfff
fix(gateway): a recording of millions of tiny blocks is read a page a…
GottZ Nov 27, 2026
8fbe629
feat(web): the recording detail loads its blocks 500 at a time, and l…
GottZ Nov 27, 2026
3553d4a
chore(web): keep go/web/dist/.gitkeep, which a local build had removed
GottZ Nov 27, 2026
a6c92f7
fix(llm): the recording translation guards its block with promptguard…
GottZ Nov 27, 2026
8194d82
chore(deadcode): recblocks.Decompose is the tests' reference of the p…
GottZ Nov 27, 2026
c0a1e37
fix(llm): a recording translation's errors carry no byte of the backe…
GottZ Nov 27, 2026
ce30124
fix(gateway): a translation the tenant quota refuses is refused befor…
GottZ Nov 27, 2026
d37d51d
fix(gateway): a recording read keeps nothing of the recording past th…
GottZ Nov 27, 2026
e2f6d20
fix(recblocks): an error event inside a 2xx stream, a streamed refusa…
GottZ Nov 27, 2026
ea33378
fix(web): a later page of a recording's blocks refreshes the recordin…
GottZ Nov 27, 2026
81222e0
test(web): the legacy empty:true seed gives the recordings mocks thei…
GottZ Nov 27, 2026
34b96b8
test(web): the Stop flow sees the translate request aborted on the wi…
GottZ Nov 27, 2026
260a0d0
test(gateway): the quota refusal under test comes with the quota cach…
GottZ Nov 27, 2026
12f43b2
fix(gateway): a block view cuts its labels to 256 bytes, so a long me…
GottZ Nov 27, 2026
9b18c7a
fix(recblocks): only an error object or a non-empty error string make…
GottZ Nov 27, 2026
9e702b3
fix(httpx): the transport retry logs the kind of a transient error, n…
GottZ Nov 27, 2026
f163c8d
test(llm): a sealed attempt error keeps the Retry-After, the status a…
GottZ Nov 27, 2026
7694989
perf(web): the gateway pages load no part of the recordings view — th…
GottZ Nov 27, 2026
62bfaa0
test(web): the gateway pages import none of the recordings view's dat…
GottZ Nov 27, 2026
f1fec42
fix(gateway): the audit row of a detail page names its first and last…
GottZ Nov 27, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion docs/api.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions docs/multi-tenancy.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ The `whoami` endpoint carries this on the wire: alongside the server-global `adm

**Consumer detail in the SPA (W05-09).** `/gateway/consumers/:id` (same `viewModelApi` guard as `/gateway`) shows one consumer from `model-consumer-get`: label, kind and the server's status, the policy, the key chain newest first with each rotation drawn as an edge to the key it was rotated from (`rotated_from`; a chain cut at the server's cap is marked as cut), the audit trail of the consumer and its keys (action, the actor as the server masked it, `via`, the names of the changed fields — never raw values of a key row) and the consumer's last calls from `GET /api/llmlog?consumer_id=` (metadata only; the error column shows the error class, which carries the HTTP status such as `http_502`, never the capped raw error text). Only a server-admin gets an "Open call" control per call (the body detail): for anyone else `/api/llmlog/{id}` answers a uniform 404 for consumer rows, so the SPA offers none. A foreign or unknown id renders the server's "model consumer not found", the same for both cases. Each consumer label in the `/gateway` list links to this page.

**Recordings in the SPA (issue #575).** `/gateway/recordings`, `/gateway/recordings/:consumer` and `/gateway/recordings/:consumer/:id` are **server-admin only** — a guard of their own stands before the `/gateway` one, so a tenant-admin who sees `/gateway` is sent away from them, and every call behind them is a `tierServerAdmin` manage action ([api](api.md#recordings-of-a-recording-consumer-model-recording--issue-575)). The consumer page links to them (next to the recording switch) and the gateway page shows a line with a link, both only for a server-admin and only while a consumer records — the pages of everybody else stay as they were. The first page lists the recording consumers with this process's counts, the second a consumer's recordings newest first (filters, "Load more", a walk that stops at 2000 rows says so and goes on with a click), the third one recording as its blocks, 500 at a time ("Load more blocks", "showing N of M blocks"): the original of each block as plain text (never Markdown or HTML), a raw view (text, or hex for bytes that are not UTF-8), "Load more" for large blocks, and per block a **Translate** button (target language: the browser's language when the server offers it, else English; selectable) that shows the model's rendering — Markdown through the same sanitizing renderer as the chat, marked "Generated by a model — the original is the reference" — next to the original, chunk by chunk, with a Stop button; leaving the page stops it and any read still running. Nothing of a recording or a translation goes to browser storage.

**Usage panel (W05-10).** The detail page charts the consumer's usage from `GET /api/usage?group=consumer&consumer=<id>` over 24 h or 7 d (hourly buckets) and 30 d or 90 d (daily buckets), with a table of the same rows for screen readers. A value the server does not have — `null`, or any value of a bucket marked `complete: false` (before the rollup's coverage, or the bucket still running) — reads "not recorded", never 0; a window total over such buckets reads "≥ N". Without latency histograms (`hist: false`) the latency column shows the mean, marked "Ø", instead of staying empty; queue wait and time to first token have no mean and read "not recorded". Refusals show per reason (`rejected: null` — before the refusal ledger existed — and the refusals of an incomplete bucket read "not recorded"); a refused authentication (401) has no consumer, so the panel never shows an auth refusal count per consumer. The panel re-reads every 60 s only while the browser tab is visible; a failed re-read keeps the last window on screen marked as stale, and switching the window never shows the previous window's figures.

**Limits panel (W05-12).** The limits card shows per operation the stored rows and the effective limit (`gateway-limits-get` with `subject_kind: consumer`). A server-admin edits the server row; a tenant-admin edits the tenant row and can only narrow: each field's maximum is the ceiling the server reports (the consumer's server row, else the tenant's server row, else the setting — a missing server row is never "unlimited"), there is no "unlimited" control, and an empty field means "inherits the server limit". Saving replaces the caller's row for that operation (empty fields are sent as unset); "Remove my row" deletes it (`gateway-limits-delete`). The SPA never sends a tier; the server derives it from the caller. A value over the ceiling shows a hint at the field while typing; the server decides, and its refusal (400 with `param`) appears at that field. An input that is not a finite number is refused before it is sent. An effective budget the server reports as unbounded reads "no limit".
Expand Down
4 changes: 3 additions & 1 deletion docs/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,9 @@ SELECT created_at, id, path, op, model, stream, state, status, code,
ORDER BY created_at, id;
```

(`convert_from` fails on a body that is not valid UTF-8 — select `request_body` itself, or `encode(request_body, 'escape')`, for those.) The predicate rides `idx_llm_recordings_consumer`. No ctx surface reads the bodies — no REST, MCP, CLI or web route, no export ([security](security.md#gateway-telemetry-v1-v2)); a database backup carries them like every other content of the database.
(`convert_from` fails on a body that is not valid UTF-8 — select `request_body` itself, or `encode(request_body, 'escape')`, for those.) The predicate rides `idx_llm_recordings_consumer`. A database backup carries the bodies like every other content of the database.

**Reading them in the web UI** (issue #575, server-admin only). Beside `psql`, the SPA page **`/gateway/recordings`** (Model API → Recordings; the consumer page links to it while the consumer records) lists the recording consumers with this process's counts, a consumer's recordings newest first (filter by time, operation, state and status class; more load on demand), and one recording as its blocks: the messages of a chat request with their roles and parts, tool calls and results, the inputs of an embeddings request, query and documents of a rerank request, the answer — a stream's lines put together, the raw lines one click away —, and the error body of an answer that is not a `2xx`. A body that is not valid JSON or not valid UTF-8 is one raw block, shown as it is; a body the retention cleared says so; a recording whose request still runs is shown open. Large blocks are cut with their full size named and load on demand ("Load more", 64 KiB at a time); every block has a raw view. A **Translate** button per block has a model of this instance translate the block into the chosen language and lay it out readably (Markdown, marked as model-generated, next to the original, which stays the reference) — on the `chat` role at sensitivity `credentials`, this instance's own backends only (locality `local` or `lan`, no ctx peer); no such backend is `503 no_eligible_backend`, and nothing is sent elsewhere. The translation is stored nowhere. Every view of content (a recording's blocks, a window, a translation) is an audit row `model_recording` (`GET /api/audit?entity=model_recording`). The same five actions are open to scripts with a server-admin key (`ctx manage model-recording-list '' '{"consumer_id":"…"}'`; [api](api.md#recordings-of-a-recording-consumer-model-recording--issue-575)). No MCP tool, no export and no pipeline reads the bodies ([security](security.md#gateway-telemetry-v1-v2)).

**Cost on the request path.** Only for the recording consumer: two statements in the request's time (the insert before the walk, the outcome at the end — before the answer for a non-streamed answer), see the measurement in the pull request of issue #571 (p50/p99 of a small chat and a large embeddings request with and without recording). Every other consumer passes the recording stage untouched: no write, no wait, no allocation.

Expand Down
4 changes: 2 additions & 2 deletions docs/security.md

Large diffs are not rendered by default.

Loading
Loading