pub struct ZookeeperTurnUsage {Show 18 fields
pub api_call_id: Option<String>,
pub cache_write_input_tokens: Option<i64>,
pub cached_input_tokens: Option<i64>,
pub conversation_id: Option<String>,
pub cost_micro_usd: Option<i64>,
pub cost_usd: Option<String>,
pub fully_priced: bool,
pub input_tokens: Option<i64>,
pub models: Option<Vec<ZookeeperTurnUsageModel>>,
pub output_tokens: Option<i64>,
pub priced_requests: Option<i64>,
pub reasoning_tokens: Option<i64>,
pub requests: Option<i64>,
pub schema_version: Option<String>,
pub stages: Option<Vec<ZookeeperTurnUsageStage>>,
pub total_tokens: Option<i64>,
pub uncached_input_tokens: Option<i64>,
pub unpriced_requests: Option<i64>,
}Expand description
Token usage and cost for one completed Zookeeper turn.
A turn is many model calls: the streamed agent loop, helper agents, conversation compaction, Auto-mode routing, and any retried attempts. This is the sum of all of them, with breakdowns by model and by stage.
Fields§
§api_call_id: Option<String>API call the turn belongs to, as the backend knows it.
cache_write_input_tokens: Option<i64>Prompt tokens written to the provider’s prompt cache.
cached_input_tokens: Option<i64>Prompt tokens served from the provider’s prompt cache.
conversation_id: Option<String>Conversation the turn belongs to, as the backend knows it.
cost_micro_usd: Option<i64>Cost in millionths of a US dollar, rounded half-up.
cost_usd: Option<String>Exact cost as a decimal string, e.g. “0.02184000”.
fully_priced: boolWhether every request was priced.
input_tokens: Option<i64>Prompt tokens, including the cached and cache-write subsets below.
models: Option<Vec<ZookeeperTurnUsageModel>>Usage split by model.
output_tokens: Option<i64>Completion tokens, including the reasoning subset below.
priced_requests: Option<i64>Requests whose model had a known price.
reasoning_tokens: Option<i64>Completion tokens spent on reasoning.
requests: Option<i64>Number of model requests.
schema_version: Option<String>Payload shape identifier, e.g. “zookeeper_turn_usage.v1”.
stages: Option<Vec<ZookeeperTurnUsageStage>>Usage split by the part of the turn that spent it.
total_tokens: Option<i64>Input plus output tokens.
uncached_input_tokens: Option<i64>Prompt tokens billed at the full input rate.
unpriced_requests: Option<i64>Requests whose model had no known price; their tokens are counted but contribute no cost, so totals are a floor rather than an estimate.
Trait Implementations§
Source§impl Clone for ZookeeperTurnUsage
impl Clone for ZookeeperTurnUsage
Source§impl Debug for ZookeeperTurnUsage
impl Debug for ZookeeperTurnUsage
Source§impl<'de> Deserialize<'de> for ZookeeperTurnUsage
impl<'de> Deserialize<'de> for ZookeeperTurnUsage
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl Display for ZookeeperTurnUsage
impl Display for ZookeeperTurnUsage
Source§impl JsonSchema for ZookeeperTurnUsage
impl JsonSchema for ZookeeperTurnUsage
Source§fn schema_name() -> String
fn schema_name() -> String
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read moreSource§impl PartialEq for ZookeeperTurnUsage
impl PartialEq for ZookeeperTurnUsage
Source§impl Serialize for ZookeeperTurnUsage
impl Serialize for ZookeeperTurnUsage
impl StructuralPartialEq for ZookeeperTurnUsage
Source§impl Tabled for ZookeeperTurnUsage
Available on crate feature tabled only.
impl Tabled for ZookeeperTurnUsage
tabled only.Auto Trait Implementations§
impl Freeze for ZookeeperTurnUsage
impl RefUnwindSafe for ZookeeperTurnUsage
impl Send for ZookeeperTurnUsage
impl Sync for ZookeeperTurnUsage
impl Unpin for ZookeeperTurnUsage
impl UnsafeUnpin for ZookeeperTurnUsage
impl UnwindSafe for ZookeeperTurnUsage
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
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<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> ⓘ
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 moreSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = !
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.