Duo Agent Platform: Credit Spend Limits (Per-User and Organization-Level)
### Proposal
## Problem Statement
Enterprise customers using GitLab Duo need the ability to control and limit AI credit consumption to manage costs effectively and prevent unexpected overages. Currently, there is no mechanism to set spending thresholds at either the individual user level or at an organizational level, making it difficult for administrators to budget and control Duo usage across their organization.
## Proposed Solution
Implement a two-tier credit spend limit system for the Duo Agent Platform:
1. Per-User Credit Spend Limits
Allow administrators to set maximum credit consumption thresholds on a per-user basis. This enables:
- Granular control over individual developer AI usage
- Differentiated limits based on role, team, or project assignment
- Prevention of single users consuming disproportionate resources
- Ability to allocate higher limits to power users or specific roles (e.g., senior engineers, security teams)
Configuration options should include:
- Daily/weekly/monthly credit caps per user
- Option to inherit from group/role defaults or override individually
- Configurable behavior when limit is reached (hard stop vs. warning)
2. Top-Level (Organization/Instance) Maximum Credit Spend
Allow administrators to set an overall maximum credit spend threshold at the organization, group, or instance level. This enables:
- Budget predictability and cost ceiling guarantees
- Protection against runaway costs across the entire organization
- Alignment with procurement and finance requirements
- Compliance with internal spending policies
Configuration options should include:
- Monthly/quarterly credit caps at the top level
- Warning thresholds (e.g., alert at 75%, 90% of limit)
- Configurable behavior when limit is reached (hard stop, throttling, or admin notification only)
- Visibility into remaining budget for administrators
issue