Skip to content
Merged
Changes from all commits
Commits
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
13 changes: 11 additions & 2 deletions docs/pro.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Measured on a corpus of real agent conversations at default settings:

- tool-call arguments, non-text content parts, and unknown JSON fields
- first occurrences — only later duplicates are replaced
- on `/v1/responses`: replayed reasoning items (the API requires them back
verbatim when `store` is off, so `PRO_COMPRESSION_DROP_REASONING` has no
effect there) and text parts carrying citation annotations, whose
start/end offsets a rewrite would break
- anything, if estimated savings fall below the threshold; the request
passes through byte-identical

Expand All @@ -55,7 +59,9 @@ always compresses the same way and the provider's prompt-cache prefix stays
stable as a conversation grows. It fails open: if the engine errors, the
request is forwarded unchanged.

Covered endpoints: `POST /v1/chat/completions` and `POST /v1/messages`.
Covered endpoints: `POST /v1/chat/completions`, `POST /v1/messages`, and
`POST /v1/responses` — including function and custom tool-call outputs on
the Responses API.

## Turn it off

Expand Down Expand Up @@ -122,7 +128,10 @@ X-GoModel-Pro-Compression-Blocks: 12

Audit entries keep the **original** client request plus a revision chain
showing exactly what each rewriter changed, so the full before/after is
always recoverable.
always recoverable. Storing the rewritten body copy is governed by
`LOGGING_LOG_REVISION_BODIES` (default `true`): turning it off keeps the
revision metadata — rewriter, sizes, tokens saved, the block report — while
roughly halving audit storage per compressed request.
Comment on lines +131 to +134

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Document the dependency on LOGGING_LOG_BODIES.

LOGGING_LOG_REVISION_BODIES only controls rewritten-body copies when master body logging is enabled. With LOGGING_LOG_BODIES=false, the original request and revision bodies are omitted; as written, “Audit entries keep the original client request” is unconditional and can mislead operators about PII retention. Clarify both settings’ interaction here.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/pro.mdx` around lines 131 - 134, Update the audit-storage documentation
near LOGGING_LOG_REVISION_BODIES to explain its dependency on
LOGGING_LOG_BODIES: when master body logging is disabled, both original request
and rewritten revision bodies are omitted, while revision metadata remains
available. Qualify the statement that audit entries retain the original client
request so it is not presented as unconditional.


**Aggregate** — Prometheus counters on `/metrics`, all prefixed
`gomodel_pro_compression_`, and the dashboard **Usage** page shows a "Pro
Expand Down