Class DriftDetector

java.lang.Object
org.mockserver.llm.drift.DriftDetector

public class DriftDetector extends Object
Replays recorded LLM request/response exchanges against a live provider and reports structural drift in the responses (new/removed fields, type changes) — closing the loop on stale VCR cassettes.

Drift is structural, not semantic: it compares response shape, not values, so it never flags benign wording changes. Each exchange fails closed independently — a network error or non-2xx live response is reported as COULD_NOT_CHECK, never as drift and never thrown. The detector takes an injected LlmTransport so it unit-tests offline; the live HTTP call is only made when a backend is configured (opt-in).