Skip to content

v20260204-221009

Choose a tag to compare

@github-actions github-actions released this 04 Feb 22:11
· 18 commits to main since this release
9b2fc27
Add token usage and model tracking to Claude billing (#7729)

## Summary
- Adds token tracking fields to `misc.claude_code_usage` schema:
  - `input_tokens`, `output_tokens`
  - `cache_read_input_tokens`, `cache_creation_input_tokens`
  - `model`
- Updates `upload-claude-usage` action to extract these fields from
Claude output
- Updates S3 replicator lambda to handle new fields
- Creates v2 Grafana dashboard with token metrics

## Dashboard v2

https://pytorchci.grafana.net/public-dashboards/83058a8d65d44a099eb8d9ac2916f411

New metrics:
- Total input/output tokens
- Cache hit rate
- Cost by model breakdown
- Token usage by workflow
- Daily cache performance

## Test plan
- [ ] Deploy schema changes (ALTER TABLE to add columns)
- [ ] Deploy lambda changes
- [ ] Verify new data flows with token fields populated
- [ ] Verify v2 dashboard shows token metrics

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <[email protected]>