Skip to content

fix: model donut uses session tokens — excludes retired models#141

Merged
pitimon merged 1 commit intomainfrom
fix/model-donut-active-only
Apr 6, 2026
Merged

fix: model donut uses session tokens — excludes retired models#141
pitimon merged 1 commit intomainfrom
fix/model-donut-active-only

Conversation

@pitimon
Copy link
Copy Markdown
Owner

@pitimon pitimon commented Apr 6, 2026

Summary

  • Compute model I/O tokens from JSONL sessions instead of stats-cache
  • Only active models shown (Opus 4.6 + Sonnet 4.6), retired models excluded
  • Donut Props simplified to { inputTokens, outputTokens } — no longer needs full ModelUsage

Closes #140

Test plan

  • npx tsc --noEmit — zero errors
  • npm test — 121/121 pass
  • CI passes
  • Visual: donut shows only active models

stats-cache modelUsage includes retired models (Haiku 4.5 at 57%,
Opus 4.5 at 34%) with zero active sessions. Now computes model I/O
tokens from JSONL sessions array — only shows currently active models.

ADR-002 pattern: JSONL for windowed/current, stats-cache for all-time.

Closes #140
@pitimon pitimon merged commit 9e2a41d into main Apr 6, 2026
1 check passed
@pitimon pitimon deleted the fix/model-donut-active-only branch April 6, 2026 14:10
@pitimon pitimon restored the fix/model-donut-active-only branch April 6, 2026 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: MODEL DISTRIBUTION shows retired models (4.5) from stats-cache historical data

1 participant