pub struct SessionContextReport {
pub session_id: String,
pub model: String,
pub context_window_tokens: Option<u32>,
pub estimated_input_tokens: u32,
pub sections: Vec<ContextReportSection>,
pub contributions: Vec<ContextReportContribution>,
pub cumulative_usage: Option<TokenUsage>,
}Expand description
Token-budget report for a session — a model-aware breakdown of the context window into named sections plus per-source contributions, so callers can answer “what’s filling the context?” without reverse- engineering the prompt assembly.
Fields§
§session_id: StringPrefixed session identifier this report describes.
model: StringModel identifier the report’s token estimates target (used to scope context-window math).
context_window_tokens: Option<u32>Total context window size in tokens for model. None if the model’s profile lacks limits data.
estimated_input_tokens: u32Estimated number of input tokens consumed by the next generation given the current context.
sections: Vec<ContextReportSection>Logical sections of the assembled context (system prompt, tool defs, message history, etc.) for inspection.
contributions: Vec<ContextReportContribution>Per-source token contributions (per-tool, per-capability, per-message) for attribution.
cumulative_usage: Option<TokenUsage>Cumulative LLM usage observed across the session so far (token + cost rollup).
Trait Implementations§
Source§impl Clone for SessionContextReport
impl Clone for SessionContextReport
Source§fn clone(&self) -> SessionContextReport
fn clone(&self) -> SessionContextReport
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionContextReport
impl Debug for SessionContextReport
Source§impl<'de> Deserialize<'de> for SessionContextReport
impl<'de> Deserialize<'de> for SessionContextReport
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for SessionContextReport
impl RefUnwindSafe for SessionContextReport
impl Send for SessionContextReport
impl Sync for SessionContextReport
impl Unpin for SessionContextReport
impl UnsafeUnpin for SessionContextReport
impl UnwindSafe for SessionContextReport
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request