feat(review): attribute per-review LLM costs #261
No reviewers
Labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Slipstream/auto_review!261
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "issue-28-cost-per-review"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Why:
What:
ReviewOutcomeand persist it to SQLite review history.AR_PRICE_TABLE_PATHfor operator pricing overrides andAR_REVIEW_COST_FOOTER=falseto suppress the public footer while preserving persisted cost attribution.gpt-5.3-codex-sparkto standardgpt-5.3-codexper branch request.Validation:
cargo test -p ar-orchestrator --no-runcargo clippy -p ar-review --tests -- -D warningscargo test -p ar-review review_pull_request_posts_review_with_llm_usage_cost_footer -- --nocapturecargo nextest run -p ar-orchestrator run_review_job_records_review_outcome_cost_in_sqlite_historycargo test -p ar-review review_pull_request_omits_llm_usage_cost_footer_when_disabled_by_envcargo test -p ar-review review_pull_request_cost_footer_uses_price_table_override_from_env_pathpython -m json.tool opencode.jsonjust opencode-testjust fmtjust clippyjust testjust ciCloses #28
This PR introduces per-review LLM cost attribution, allowing operators to understand and manage review expenses. It includes changes to capture and estimate LLM usage costs, append cost footers to reviews, and persist cost data in SQLite. The changes appear well-tested and safe to merge.
Walkthrough
AR_PRICE_TABLE_PATHandAR_REVIEW_COST_FOOTERfor cost management.Routerto include usage collection.record_with_costmethod toReviewHistoryand its implementations.LLM usage and cost
Estimated total USD: $0.112492 via https://api.openai.com and https://api.openai.com