nemoguardrails.server.experimental.providers.openai.dialects.litellm.stream
Declare LiteLLM stream fields while retaining OpenAI event semantics.
LiteLLM’s root and delta extension bags are optional, nullable, and closed. Terminal root extensions preserve reviewed response metadata. Source-declared content arrays remain empty-only except typed reasoning items with no plaintext content. The classifier derives coverage and text paths from these rebound models; the endpoint uses the existing per-stream OpenAI lifecycle hooks.
Module Contents
Classes
Data
API
Bases: ResponsesReasoningItemProjection
Preserve encrypted metadata while keeping plaintext and unknown fields closed.
Bases: ChatCompletionsStreamChoiceProjection
Keep single-choice constraints and bind the LiteLLM delta model.
Bases: ChatCompletionsStreamDeltaProjection
Accept reviewed encrypted reasoning and empty-only content extensions.
Bases: PolicyModel
Recognize an empty extension bag without authorizing arbitrary contents.
Bases: ChatCompletionsStreamPayloadProjection
Recognize LiteLLM’s root extension bag, including on usage-only events.
Bases: PolicyModel
Declare the terminal root extension separately from delta extensions.