#[non_exhaustive]pub enum StrategyPresetName {
ProactiveSummarization,
LargeToolOffloading,
OverflowProtection,
StaleToolCleanup,
DeferredToolLoading,
}Expand description
A named strategy preset (StrategyPresetName).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
ProactiveSummarization
Summarizes the oldest 30% of messages at 70% context utilization
(proactiveSummarization).
LargeToolOffloading
Truncates tool results over 2,500 tokens to a 1,000-token preview (largeToolOffloading).
OverflowProtection
Drops the oldest messages when the context window is full (overflowProtection).
StaleToolCleanup
Drops tool results outside the newest five tool-result messages (staleToolCleanup).
DeferredToolLoading
Experimental: from 20 tools, the SDK’s own included, defers tools’ input schemas until the
model loads them (deferredToolLoading). Claude 4.5 and later defer natively through
AnthropicModel, most other models get each deferred tool as a stub (name and
description), and models that can’t use stubs (DeferredToolLoading::Unsupported) get
every spec. The SDK’s own tools and tools without parameters are always sent in full and
every other tool is deferred, so the model loads even its most used tools first;
Offload::defer keeps the ones you name.
Implementations§
Trait Implementations§
Source§impl Clone for StrategyPresetName
impl Clone for StrategyPresetName
impl Copy for StrategyPresetName
Source§impl Debug for StrategyPresetName
impl Debug for StrategyPresetName
Source§impl Display for StrategyPresetName
impl Display for StrategyPresetName
impl Eq for StrategyPresetName
Source§impl From<StrategyPresetName> for StrategyEntry
impl From<StrategyPresetName> for StrategyEntry
Source§fn from(preset: StrategyPresetName) -> Self
fn from(preset: StrategyPresetName) -> Self
Source§impl FromStr for StrategyPresetName
impl FromStr for StrategyPresetName
Source§impl Hash for StrategyPresetName
impl Hash for StrategyPresetName
Source§impl PartialEq for StrategyPresetName
impl PartialEq for StrategyPresetName
impl StructuralPartialEq for StrategyPresetName
Auto Trait Implementations§
impl Freeze for StrategyPresetName
impl RefUnwindSafe for StrategyPresetName
impl Send for StrategyPresetName
impl Sync for StrategyPresetName
impl Unpin for StrategyPresetName
impl UnsafeUnpin for StrategyPresetName
impl UnwindSafe for StrategyPresetName
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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> ⓘ
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> ⓘ
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