salilborkar/LLM Cost Lint
Shift-left LLM cost linting. Scans PRs for Bedrock and Azure OpenAI calls and posts cost estimates as PR comments.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
Inputs
| name | description | required | default |
|---|---|---|---|
| path | Directory or file to scan. Scanned recursively for .py files. Defaults to the repository root. | no | . |
| monthly-calls | Estimated number of times each detected LLM call will execute per month in production. Used to project monthly cost from a per-call estimate. | no | 30000 |
| default-input-tokens | Input token count assumed per call when the value cannot be statically inferred from source code. Override with a value representative of your typical prompt size. | no | 1000 |
| default-output-tokens | Output token count assumed per call when max_tokens is not explicitly set in the call site. | no | 500 |
| cost-threshold | Monthly cost ceiling in USD. When the projected monthly total exceeds this value a warning is added to the report. Set fail-on-threshold to true to also block the merge. Set to 0 to disable the threshold check. | no | 100 |
| fail-on-threshold | Set to 'true' to exit with code 1 when the projected monthly cost exceeds cost-threshold, blocking merge if this check is required by branch protection rules. | no | false |
| post-pr-comment | Post the cost report as a comment on the pull request. Requires pull-requests: write permission in the calling workflow. | no | true |
| github-token | GitHub token used to post PR comments. Defaults to the workflow's automatic GITHUB_TOKEN. | no | ${{ github.token }} |
Outputs
| name | description |
|---|---|
| cost-report | The markdown cost report generated by LLM Cost Lint. |