How-to
Budget & cost control
Cap LLM token spend per tenant, per repo, or per policy.
Cost guardrails are policy-as-code. They live next to your platform config and ship through CI.
Set a tenant-level cap
# codingassist.policy.yaml
budget:
tenant_monthly_usd: 500
per_repo_daily_usd: 10
alert_at: [50, 80, 100] # percent
on_exceed: degrade # 'degrade' | 'block'degrade— drop to lighter models for non-critical planesblock— short-circuit the pipeline; surface a tenant-visible warning
Per-policy budgets
You can shape spend per policy:
policies:
- id: heavy-security
only_on:
labels: ["security"]
budget:
per_review_usd: 0.50Observe spend
codingassist usage --tenant <id> --since 30dRelated
Was this page helpful?