obol-core 0.4.0

Read AI-agent transcripts (Claude Code, Codex, Pi) and estimate their USD cost.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# 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.

```rust
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](https://github.com/prime-radiant-inc/obol). Apache-2.0.