{
  "schema_version": "1.0",
  "surface_type": "tool_answer",
  "tool_id": "pr-review-cost",
  "citation_question": "What does AI PR review cost per pull request?",
  "question": "How do I calculate AI PR review cost per pull request with review passes, diff context, and repo refresh assumptions?",
  "canonical_url": "https://www.unitcostai.com/tools/pr-review-cost",
  "formula": "repo_refresh_share_usd = repo_refresh_monthly_usd / monthly_pr_reviews; cost_per_pr_review_usd = generation + retrieval + reranking + repo_refresh_share_usd + vector_db + cache + infra; optional_margin_pct = (review_price_or_chargeback_usd - cost_per_pr_review_usd) / review_price_or_chargeback_usd * 100",
  "assumptions": [
    "All cost terms are in USD per reviewed pull request unless noted",
    "Model requests per PR review includes diff summary, risk scan, retry, and final review-comment passes",
    "Repo refresh starts as a fixed monthly term and is amortized across monthly_pr_reviews before it is included per review",
    "Token and model rates come from one published pricing snapshot context"
  ],
  "example": "If generation, retrieval, reranking, repo_refresh_share, vector_db, cache, and infra sum to 0.09, then cost_per_pr_review is 0.09. A 0.50 review chargeback leaves 82.0 percent gross margin.",
  "units": "USD per model request and USD per reviewed pull request",
  "pricing_context": {
    "context_type": "pricing_snapshot",
    "snapshot_id": "2026-06-21",
    "snapshot_date": "2026-06-21",
    "reference_url": "https://www.unitcostai.com/pricing"
  },
  "pricing_snapshot": {
    "snapshot_id": "2026-06-21",
    "snapshot_date": "2026-06-21",
    "pricing_reference_url": "https://www.unitcostai.com/pricing"
  }
}
