pub struct TierThresholds { /* private fields */ }Expand description
Immutable “model → lowest context-tier threshold (tokens)” snapshot.
Keys are stored both as the LiteLLM key lowercased and as its normalized
form, so the session-log model names (gpt-5.4, azure/gpt-5.5,
claude-sonnet-5) resolve without re-implementing the full pricing match
chain. A model that resolves to no entry simply has no tier.
Implementations§
Source§impl TierThresholds
impl TierThresholds
Sourcepub fn threshold_for(&self, model: &str) -> Option<i64>
pub fn threshold_for(&self, model: &str) -> Option<i64>
Lowest tier threshold for model, or None when the model has no
context tier (or cannot be resolved).
Sourcepub fn fingerprint(&self) -> u64
pub fn fingerprint(&self) -> u64
Stable identity of this snapshot’s contents, 0 only when empty.
Trait Implementations§
Source§impl Debug for TierThresholds
impl Debug for TierThresholds
Source§impl Default for TierThresholds
impl Default for TierThresholds
Source§fn default() -> TierThresholds
fn default() -> TierThresholds
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TierThresholds
impl RefUnwindSafe for TierThresholds
impl Send for TierThresholds
impl Sync for TierThresholds
impl Unpin for TierThresholds
impl UnsafeUnpin for TierThresholds
impl UnwindSafe for TierThresholds
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> 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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more