pub struct DecisionCost {
pub cost_usd: f64,
pub tokens_in: u64,
pub tokens_out: u64,
pub reasoning_tokens: u64,
}Expand description
An agent’s self-reported spend to produce one decision. Every field defaults to
zero so a partial report (e.g. tokens only, no dollar figure) still deserializes.
The engine reduces this to a single scalar via DecisionCost::billable_units.
Fields§
§cost_usd: f64Dollar cost of the compute/tokens spent on this decision. The preferred unit for skill-per-dollar reporting.
tokens_in: u64Prompt/input tokens consumed.
tokens_out: u64Completion/output tokens produced.
reasoning_tokens: u64Reasoning/thinking tokens, reported as a legibility breakdown. Providers
typically already bill these inside tokens_out, so they are not re-added
into the token total; they are surfaced separately, not double-counted.
Implementations§
Source§impl DecisionCost
impl DecisionCost
Sourcepub fn billable_units(&self) -> f64
pub fn billable_units(&self) -> f64
The single scalar the engine folds into Run.cost (any consistent unit,
matching the leaderboard’s cost column). Prefers the reported dollar figure;
with no dollars reported it falls back to total billable tokens
(tokens_in + tokens_out). Reasoning tokens are a sub-breakdown of the
output and are not added again.
Trait Implementations§
Source§impl Clone for DecisionCost
impl Clone for DecisionCost
Source§fn clone(&self) -> DecisionCost
fn clone(&self) -> DecisionCost
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more