#[non_exhaustive]pub enum SpeedTier {
Standard,
Fast,
}Expand description
Inference speed tier — the “pay a premium for lower latency” knob.
Providers expose this under different names for different mechanisms, so
only the shared economics are modelled here: Self::Fast costs more per
token and is expected to return sooner.
- Anthropic calls it fast mode (
speed: "fast"): the same model weights on a faster inference configuration, up to 2.5x the output tokens per second. Supported only on Opus 5 and Opus 4.8. OpenAIcalls it priority processing (service_tier: "priority"): queue priority for lower, more consistent latency.
Neither mechanism changes model behaviour or capabilities. Because both
providers can serve a premium request at standard speed — and bill it at
standard rates — a requested tier is not a guarantee; see
LlmProvider::validate_speed_tier
for how unsupported combinations are rejected up front.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Standard
The provider’s normal inference path at standard pricing.
Fast
The provider’s premium low-latency path at premium pricing.
Implementations§
Trait Implementations§
impl Copy for SpeedTier
Source§impl<'de> Deserialize<'de> for SpeedTier
impl<'de> Deserialize<'de> for SpeedTier
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpeedTier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<SpeedTier, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SpeedTier
Source§impl Serialize for SpeedTier
impl Serialize for SpeedTier
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for SpeedTier
Auto Trait Implementations§
impl Freeze for SpeedTier
impl RefUnwindSafe for SpeedTier
impl Send for SpeedTier
impl Sync for SpeedTier
impl Unpin for SpeedTier
impl UnsafeUnpin for SpeedTier
impl UnwindSafe for SpeedTier
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
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<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.