Skip to main content

llm/usage/
mod.rs

1//! Token, cost, and session-usage types shared across the workspace.
2//!
3//! These are wire types. Agent crates produce them and protocol crates
4//! serialize them, so they live here as the lowest common dependency. Keep
5//! this module small: behavior belongs with the agents that produce the values.
6
7mod call_purpose;
8mod context_usage;
9mod model_identity;
10mod pricing;
11mod session;
12mod source;
13mod tokens;
14mod usd;
15
16pub use call_purpose::LlmCallPurpose;
17pub use context_usage::ContextUsage;
18pub use model_identity::ModelIdentity;
19pub use pricing::{ModelPricing, UsageCost};
20pub use session::{SessionUsageEvent, SessionUsageTotals};
21pub use source::UsageSource;
22pub use tokens::{TokenUsage, Tokens};
23pub use usd::Usd;
24
25#[cfg(test)]
26mod tests;