Expand description
obol-core: parse agent transcripts and estimate token cost.
Re-exports§
pub use error::ObolError;pub use model::Approximation;pub use model::CostEstimate;pub use model::MessageUsage;pub use model::ModelCost;pub use model::PricingSource;pub use model::Provider;pub use model::TokenBuckets;pub use transcript::Dialect;
Modules§
- cost
- Price a Vec
against a PriceStore into a CostEstimate. - error
- model
- Public result types + the internal per-message usage record.
- pricing
- Price tables and the per-message cost kernel.
- transcript
Structs§
- Refresh
Report - Report from a pricing refresh.
Functions§
- estimate_
cost - Estimate the cost of a transcript file under the given dialect. Loads the active price snapshot (bundled fallback) and prices the parsed usage.
- refresh_
pricing_ tables - Fetch the LiteLLM sheet and write it as the active snapshot.
as_ofis the caller’s stamp —YYYY-MM-DDorYYYY-MM-DDTHH:MM:SSZ(the library has no clock) — validated before any network or disk I/O.