v0.5.0 - Progressive TOON Compression
🚀 Features
Progressive TOON Compression (Recommended)
Intelligent checkpointing that compresses history only when beneficial:
- Trigger 1: Context size ≥ 80% of model window (prevents truncation)
- Trigger 2: Time gap ≥ 5 minutes (prevents expensive cache miss recovery)
- Savings: 94% vs no optimization
Config:
{
"historyCompression": {
"enabled": true,
"progressive": {
"enabled": true,
"contextThreshold": 0.8,
"timeThreshold": 300
}
}
}Token Tracking
- Estimates tokens before/after TOON compression
- Displays savings in
/router usage
Cache Hit Display
- Shows 📦 with cached token count
- Format:
↑5,230 ↓2,140 📦125,000 $0.0234
Static TOON Mode
- Freeze TOON at specific turn (
freezeAfter: 10) - Savings: 92% vs no optimization
📊 Cost Comparison (100-turn session)
| Strategy | Total Cost | Savings |
|---|---|---|
| No optimization | $22.50 | 0% |
| Cache only | $2.95 | 87% |
| Dynamic TOON | $11.00 | 51% |
| Static TOON | $1.90 | 92% |
| Progressive TOON ⭐ | $1.35 | 94% |
🐛 Fixes
- Corrected freeze condition logic
- Restored
safeSplitcalculation - Fixed type safety issues
⚙️ Backward Compatibility
All features opt-in. Default behavior unchanged.
Full Changelog: v0.4.0...v0.5.0