obol-core
Read an AI-agent transcript and estimate what it cost. obol-core parses Claude Code, Codex, and
Pi transcripts and computes per-message USD cost, handling the accounting naive summers get wrong:
two-layer dedup, cache buckets, and price tiers.
use ;
let est = estimate_cost?;
println!;
Pricing comes from LiteLLM (and OpenRouter for Pi); refresh_pricing_tables updates the on-disk
snapshot. Output is a typed CostEstimate carrying unpriced_models and approximations — not a
JSON blob.
Part of obol. Apache-2.0.