Package org.mockserver.llm.analysis
Class LlmOptimisationReportService
java.lang.Object
org.mockserver.llm.analysis.LlmOptimisationReportService
Application service that turns captured
REQUEST_RESPONSES log entries
into an LlmOptimisationReport (JSON bundle) or a rendered Markdown
brief, applying the optional session/host/provider
filters, redaction, and the mockserver.llmOptimisationMaxCalls bound.
Lives in mockserver-core so both the control-plane REST endpoint and the
export_optimisation_report MCP tool (mockserver-netty) share one
implementation. Pure of transport: callers pass already-retrieved
request/response pairs.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classOptional filters; null/blank means "no filter".static final classThe built report plus the markdown brief, so callers render once. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild(List<LogEventRequestAndResponse> pairs, LlmOptimisationReportService.Filter filter) Build a report from the given recorded pairs and filter.The configured redacted-body-field list, exposed for tests/callers.The redacted-header list reported in the bundle, exposed for tests/callers.Render the brief for a previously built result, redacting the appendix.
-
Constructor Details
-
LlmOptimisationReportService
public LlmOptimisationReportService()
-
-
Method Details
-
build
public LlmOptimisationReportService.Result build(List<LogEventRequestAndResponse> pairs, LlmOptimisationReportService.Filter filter) Build a report from the given recorded pairs and filter. -
renderBrief
Render the brief for a previously built result, redacting the appendix. -
redactedHeaderNames
The redacted-header list reported in the bundle, exposed for tests/callers. -
redactedBodyFieldNames
The configured redacted-body-field list, exposed for tests/callers.
-