pub struct LlmRequest {Show 14 fields
pub model: Option<String>,
pub instructions: Vec<InstructionBlock>,
pub messages: Vec<Message>,
pub temporary_note_count: usize,
pub is_compaction: bool,
pub has_compaction: bool,
pub tools: Vec<Tool>,
pub tool_choice: Option<ToolChoice>,
pub sampling: SamplingParams,
pub output: OutputParams,
pub reasoning: ReasoningParams,
pub stream: bool,
pub extensions: ProviderExtensions,
pub preservation: PreservationMetadata,
}Expand description
Normalized request representation shared by Switchyard components.
Fields§
§model: Option<String>Model currently addressed by the request.
This initially contains the name supplied by the inbound client. A routing host may replace it with the selected target before serving the request.
instructions: Vec<InstructionBlock>System and developer instructions separated from conversation turns.
messages: Vec<Message>Ordered conversation messages.
temporary_note_count: usizeThis request-local count tracks temporary notes appended after the caller’s conversation. The HTTP client uses it to choose a cache breakpoint before the notes, subject to provider support, caller policy, marker limits, and an eligible prefix. Rust moves and clones retain the count. Serialization omits the count, and deserialization resets it to zero. Note text and preserved provider bodies remain serialized.
is_compaction: boolWhether this request performs compaction or resumes from a summary.
has_compaction: boolWhether the history contains a recognized compaction marker.
tools: Vec<Tool>Tools available to the model.
tool_choice: Option<ToolChoice>Policy controlling model tool selection.
sampling: SamplingParamsCommon sampling controls.
output: OutputParamsOutput budget and shape controls.
reasoning: ReasoningParamsReasoning controls.
stream: boolWhether the caller requested a streamed response.
extensions: ProviderExtensionsProvider fields without first-class normalized equivalents.
preservation: PreservationMetadataExact provider bodies used by codecs for lossless same-format round trips.
This is separate from a host’s optional
Request::raw_request.
Trait Implementations§
Source§impl Clone for LlmRequest
impl Clone for LlmRequest
Source§fn clone(&self) -> LlmRequest
fn clone(&self) -> LlmRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more