mizcausevic-dev/LLM Cost Rollup
Read OTel GenAI cost-annotated spans from a workflow artifact, aggregate by (date, provider, model), and post a Markdown summary as a PR comment. Optionally fails the run when total spend exceeds a budget.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| input | Path to the OTLP/JSON file containing cost-annotated GenAI spans. | yes | — |
| bucket | Group rows by 'day', 'month', or 'all'. Default 'day'. | no | day |
| comment-on-pr | Post the Markdown table as a PR comment. Defaults to 'true' when this run is in a pull_request event. | no | auto |
| fail-over-usd | Optional spending ceiling in USD. When set, the action fails if total cost > this value. | no | — |
| github-token | Token used to post the PR comment (defaults to GITHUB_TOKEN). | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| total-cost-usd | Total accumulated spend across the rollup, as a number string. |
| spans | Number of spans processed. |
| rows | JSON array of rollup rows. |