Class LlmOptimisationBriefRenderer

java.lang.Object
org.mockserver.llm.analysis.LlmOptimisationBriefRenderer

public class LlmOptimisationBriefRenderer extends Object
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 Details

    • LlmOptimisationBriefRenderer

      public LlmOptimisationBriefRenderer()
  • Method Details

    • render

      Render the brief for a report whose appendix is drawn from the given exchanges. The exchanges are redacted with redactor before 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