pub struct RetrievalWindowTokenAccounting {
pub fixed_prompt_tokens: u32,
pub boundary_reclaimable_tokens: u32,
pub provider_message_tokens: BTreeMap<String, u32>,
}Expand description
Provider-prepared token estimates supplied to the pure planner.
Most persisted text messages can be estimated directly. Messages containing images need a model-visible image estimate rather than tokenizing attachment URLs or base64 text. Callers that prepared the request can replace the whole message estimate by its stable message ID.
Fields§
§fixed_prompt_tokens: u32Provider-visible prompt/tool tokens outside Session.messages that
remain after the retrieval boundary resets the model-context epoch.
boundary_reclaimable_tokens: u32Provider-visible tokens outside Session.messages that are present in
the current request but are deterministically removed when the
retrieval boundary resets the model-context/provider transcript epoch.
provider_message_tokens: BTreeMap<String, u32>Complete provider-visible token cost overrides keyed by message ID.
Trait Implementations§
impl Eq for RetrievalWindowTokenAccounting
impl StructuralPartialEq for RetrievalWindowTokenAccounting
Auto Trait Implementations§
impl Freeze for RetrievalWindowTokenAccounting
impl RefUnwindSafe for RetrievalWindowTokenAccounting
impl Send for RetrievalWindowTokenAccounting
impl Sync for RetrievalWindowTokenAccounting
impl Unpin for RetrievalWindowTokenAccounting
impl UnsafeUnpin for RetrievalWindowTokenAccounting
impl UnwindSafe for RetrievalWindowTokenAccounting
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.