Skip to main content

Crate obol_core

Crate obol_core 

Source
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§

RefreshReport
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_of is the caller’s stamp — YYYY-MM-DD or YYYY-MM-DDTHH:MM:SSZ (the library has no clock) — validated before any network or disk I/O.