pub enum CacheAccounting {
OutsidePrompt,
InsidePrompt,
}Expand description
Whether a provider’s reported prompt count already contains its cache reads. Stated by each client, never inferred: provider totals can carry categories that are neither prompt nor output (Gemini) or disagree with their own parts (OpenRouter), so arithmetic tests misclassify.
Variants§
OutsidePrompt
Anthropic: cache reads and writes are reported beside input_tokens, not within it.
InsidePrompt
OpenAI (chat and Responses), OpenRouter, Gemini: cache reads are already in the prompt.
Trait Implementations§
Source§impl Clone for CacheAccounting
impl Clone for CacheAccounting
impl Copy for CacheAccounting
Source§impl Debug for CacheAccounting
impl Debug for CacheAccounting
impl Eq for CacheAccounting
Source§impl PartialEq for CacheAccounting
impl PartialEq for CacheAccounting
impl StructuralPartialEq for CacheAccounting
Auto Trait Implementations§
impl Freeze for CacheAccounting
impl RefUnwindSafe for CacheAccounting
impl Send for CacheAccounting
impl Sync for CacheAccounting
impl Unpin for CacheAccounting
impl UnsafeUnpin for CacheAccounting
impl UnwindSafe for CacheAccounting
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.