pub enum CachePlan {
Off,
ImportedPrefix,
}Expand description
Prompt-caching plan applied at the request-build site (B7, SPEC.md D9).
Off is byte-identical to today’s behavior: whatever implicit caching the
provider does on its own still applies, but supercode never annotates
anything. ImportedPrefix places Anthropic-style cache_control “ephemeral”
breakpoints (message-level, not the top-level extra_body passthrough —
see provider::apply_cache_plan) on the system message and the last
message of a previously-imported session prefix
(crate::Agent::load_session), so the large byte-stable prefix a resumed
session resends every turn becomes a cache hit instead of a full re-read.
Variants§
Off
No cache annotation (today’s behavior). Default outside reduced mode.
ImportedPrefix
Breakpoints on the system message and the last message of the imported prefix (at most 2 of Anthropic’s 4 available slots).
Trait Implementations§
impl Copy for CachePlan
impl Eq for CachePlan
impl StructuralPartialEq for CachePlan
Auto Trait Implementations§
impl Freeze for CachePlan
impl RefUnwindSafe for CachePlan
impl Send for CachePlan
impl Sync for CachePlan
impl Unpin for CachePlan
impl UnsafeUnpin for CachePlan
impl UnwindSafe for CachePlan
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,
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§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
key and return true if they are equal.