Package org.mockserver.llm
package org.mockserver.llm
-
ClassDescriptionDescribes where to extract the isolation key from an inbound HTTP request for per-session conversation state isolation.String escaping for the small set of code paths that hand-assemble JSON inside provider codecs (streaming chunks, where building a full Jackson tree per token is unwarranted overhead).Pure, deterministic helper that produces the provider-specific JSON error body real LLM providers return for overload / rate-limit / server errors.Pure, deterministic helper that produces the provider-specific overload / rate-limit / server-error response bodies (and the matching default HTTP status) that real LLM providers return.Immutable (status, jsonBody) pair returned by
LlmErrorBody.bodyFor(org.mockserver.model.Provider, org.mockserver.llm.LlmErrorBody.Kind).The kind of provider error to synthesise.Process-wide, stateful request quota for LLM responses — a fixed-window rate limiter.Pure, deterministic helper that produces the provider-specific rate-limit HTTP headers real LLM providers send.Utility for encoding and decoding LLM conversation isolation metadata in scenario names.A multimodal audio content part recognised in a decoded request message.A multimodal image content part recognised in a decoded request message.Deterministic normalisation of LLM prompt text prior to conversation-predicate matching.Deterministic, read-only heuristic that infers theProviderfrom anHttpRequest's path (and, as a fallback, its Host header).The wire format used by a provider for streaming responses.Applies streaming physics (timing delays) to a list of SSE events.Builds the prompt sent to a runtime LLM backend to generate a realistic MockServer expectation from an unmatched request.Result returned by the AI stub generation endpoint.Pure, deterministic approximate token counter for LLM text.