Package org.mockserver.llm.analysis
Class LlmOptimisationBriefRenderer
java.lang.Object
org.mockserver.llm.analysis.LlmOptimisationBriefRenderer
Renders an
LlmOptimisationReport to a copy-paste Markdown
"optimisation brief" — bundle (A) of the LLM optimisation export feature.
The brief is self-contained: a user can paste it into any LLM and get cost-reduction advice with no extra context. Section order is the FROZEN contract (§4): framing preamble, run summary, per-call table, detected opportunities (HIGH first), then a conversations & tool-definitions appendix.
The appendix is rendered from the captured requests after redaction
via FixtureRedactor, so Authorization / api-key / cookie values and
any configured body fields never appear in the brief.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrender(LlmOptimisationReport report, List<LlmOptimisationReportBuilder.CapturedExchange> exchanges, FixtureRedactor redactor) Render the brief for a report whose appendix is drawn from the given exchanges.
-
Constructor Details
-
LlmOptimisationBriefRenderer
public LlmOptimisationBriefRenderer()
-
-
Method Details
-
render
public String render(LlmOptimisationReport report, List<LlmOptimisationReportBuilder.CapturedExchange> exchanges, FixtureRedactor redactor) Render the brief for a report whose appendix is drawn from the given exchanges. The exchanges are redacted withredactorbefore any of their content is emitted.- Parameters:
report- the assembled report (already deterministic)exchanges- the captured exchanges backing the appendix (may be null/empty)redactor- the redactor applied to request bodies before rendering
-