AI Features

Credit System

How Technical Debt Radar's AI credit system works — costs per operation, monthly allocations, usage tracking, and what happens when credits run out.

Credit System

AI features in Technical Debt Radar consume credits. Each credit represents a unit of AI processing via the Anthropic API (Claude Sonnet). Credits are allocated monthly based on your plan and reset on your billing cycle date.

Cost Per Operation

OperationCreditsApproximate API CostTrigger
AI Fix Generation1$0.003radar fix (per file)
AI Scan Summary1$0.005radar summary
AI PR Comment3$0.035Automatic on PR (Pro+)
AI Cross-File Analysis5$0.03--0.08radar scan --cross-file
Dashboard Policy Editor0FreeDashboard UI
Deterministic Scan0Freeradar scan
Deterministic PR Gate0FreePR status check

Deterministic features (scanning, gate decisions, PR status checks, badges) never consume credits and work on all plans including Free.

Monthly Allocation by Plan

PlanMonthly CreditsResets OnTypical Usage
Free0---Deterministic only
Solo50Billing date~50 fixes or ~50 summaries
Pro500Billing date~165 PRs with AI comments, or ~100 cross-file scans
Team2,000Billing dateFull team coverage across multiple repos
EnterpriseUnlimited---No tracking, no limits

How Credits Reset

Credits reset to your plan's full allocation on your billing cycle date. Unused credits do not roll over to the next month.

Example: Pro plan, billing date = 15th of each month
  March 15: 500 credits allocated
  March 28: 340 credits remaining (160 used)
  April 15: 500 credits allocated (340 unused credits do not carry over)

Tracking Usage

Dashboard

The Radar dashboard shows real-time credit usage:

  • Current balance --- credits remaining this cycle
  • Usage breakdown --- credits consumed by operation type (fixes, summaries, PR comments, cross-file)
  • Usage trend --- daily and weekly credit consumption chart
  • Reset date --- when your credits will replenish

CLI

$ radar credits
Plan: Pro
Credits remaining: 340 / 500
Reset date: April 15, 2026
Usage this cycle:
  AI Fix:          45 credits (45 fixes)
  AI Summary:      12 credits (12 summaries)
  AI PR Comment:   87 credits (29 PRs)
  Cross-File:      16 credits (3 scans + 1 partial)

API

GET /api/v1/credits

{
  "plan": "pro",
  "total": 500,
  "remaining": 340,
  "used": 160,
  "resetDate": "2026-04-15T00:00:00Z",
  "breakdown": {
    "fix": 45,
    "summary": 12,
    "prComment": 87,
    "crossFile": 16
  }
}

When Credits Run Out

When your credit balance reaches zero:

  1. Deterministic analysis continues unchanged. Scans, gate decisions, PR status checks, and deterministic PR comments all work normally. Your merge gate is never affected by credit exhaustion.

  2. AI features are disabled until credits reset or you purchase more:

    • radar fix falls back to showing violations without generated fixes
    • radar summary returns the deterministic scan result without the AI summary
    • PR comments are posted without AI explanations (violation list only)
    • Cross-file analysis runs BFS without AI enhancement (may produce more false positives)
  3. CLI shows a warning:

$ radar fix .
⚠ AI credits exhausted (0/500). Fix generation unavailable until April 15.
  Deterministic scan results shown below. Fix violations manually or
  use --format ai-prompt with your own AI tool (free, no credits required).
  1. No service interruption. Your PR gate, webhook integrations, and dashboard all continue working. Only AI-enhanced features are paused.

Buying Additional Credits

If you exhaust your monthly allocation before the reset date, you can purchase additional credit packs:

PackCreditsPriceAvailable On
Small100$5Solo+
Medium500$20Pro+
Large2,000$60Team+

Purchased credits are added immediately and expire at the end of the current billing cycle. They do not roll over.

# Purchase additional credits via CLI
radar credits buy --pack medium

# Or via the dashboard: Settings → Billing → Buy Credits

Optimizing Credit Usage

  • Use --format ai-prompt instead of radar fix when working with Claude Code or Cursor. This costs 0 credits because it uses your AI tool's own API.
  • Set pr_comment_top_n: 3 in radar.yml to explain fewer violations per PR (still costs 3 credits, but reduces prompt size and latency).
  • Run cross-file analysis selectively with --cross-file-min-severity critical to only trace critical violations.
  • Use deterministic-only mode in CI with radar run . (0 credits) and reserve AI features for local development.
Technical Debt Radar Documentation