obol-core 0.3.0

Read AI-agent transcripts (Claude Code, Codex, Pi) and estimate their USD cost.
Documentation

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 obol_core::{estimate_cost, Source};

let est = estimate_cost(Source::Path("session.jsonl".into()), None)?;
println!("{} USD", est.total_usd);

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.