pub struct ContextBudgetInputs<'a> {
pub model: &'a str,
pub provider_window: u64,
pub system_prompt: Option<&'a str>,
pub tools_schema: &'a [Value],
pub messages: &'a [SharedMessage],
pub skill_contents: &'a [&'a str],
pub memory_contents: &'a [&'a str],
pub thinking_budget_tokens: u64,
pub next_tool_result_bytes: u64,
pub output_reserve_tokens: u64,
}Expand description
Everything the budget calculation needs about the NEXT request. Callers pass the segments they will actually send; the engine never guesses.
Fields§
§model: &'a strModel the request targets (selects the estimator).
provider_window: u64Effective provider context window in tokens (override-aware).
system_prompt: Option<&'a str>The actual effective system prompt, if any.
tools_schema: &'a [Value]The EXPOSED tool schema set for this request (post-projection).
messages: &'a [SharedMessage]Conversation history exactly as it will be sent.
skill_contents: &'a [&'a str]Skill bodies loaded into the request outside system/history.
memory_contents: &'a [&'a str]Memory bodies loaded into the request outside system/history.
thinking_budget_tokens: u64Reasoning/thinking reserve in tokens.
next_tool_result_bytes: u64Byte cap of the next likely tool result (converted to a token
reserve at [TOOL_RESULT_BYTES_PER_TOKEN]).
output_reserve_tokens: u64Requested output reserve (the request’s max_tokens).
Trait Implementations§
Source§impl<'a> Clone for ContextBudgetInputs<'a>
impl<'a> Clone for ContextBudgetInputs<'a>
Source§fn clone(&self) -> ContextBudgetInputs<'a>
fn clone(&self) -> ContextBudgetInputs<'a>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<'a> Copy for ContextBudgetInputs<'a>
Auto Trait Implementations§
impl<'a> Freeze for ContextBudgetInputs<'a>
impl<'a> RefUnwindSafe for ContextBudgetInputs<'a>
impl<'a> Send for ContextBudgetInputs<'a>
impl<'a> Sync for ContextBudgetInputs<'a>
impl<'a> Unpin for ContextBudgetInputs<'a>
impl<'a> UnsafeUnpin for ContextBudgetInputs<'a>
impl<'a> UnwindSafe for ContextBudgetInputs<'a>
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.