pub struct PreservationMetadata {
pub requests: BTreeMap<FormatId, Value>,
pub responses: BTreeMap<FormatId, Value>,
pub request_seal: Option<u64>,
}Expand description
Exact source payloads retained for lossless same-format round trips.
Translation’s default preservation policy prefers a stored same-format body over reconstructing one from normalized fields, which is what makes a same-format hop lossless.
A stored body is only a faithful stand-in while the IR still matches it.
LlmRequest::seal_preservation records what the IR looked like when the
body was captured, and LlmRequest::preserved_request_is_current reports
whether it still does. Callers that mutate the IR — adding a system prompt,
appending a handoff note — need do nothing: the seal stops matching and
codecs re-encode from normalized fields on their own.
Fields§
§requests: BTreeMap<FormatId, Value>Original request bodies keyed by source format.
responses: BTreeMap<FormatId, Value>Original response bodies keyed by source format.
request_seal: Option<u64>Fingerprint of the request IR at the moment the bodies above were
captured. None means unsealed, which reads as “not current”.
Trait Implementations§
Source§impl Clone for PreservationMetadata
impl Clone for PreservationMetadata
Source§fn clone(&self) -> PreservationMetadata
fn clone(&self) -> PreservationMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more