feat: add AI budget policy and period deployment config (#25122)

Closes
https://linear.app/codercom/issue/AIGOV-283/add-deployment-config-for-ai-budget-policy-and-period

Adds `CODER_AI_BUDGET_POLICY` and `CODER_AI_BUDGET_PERIOD` deployment
options for AI Governance cost controls.
This commit is contained in:
Yevhenii Shcherbina
2026-05-12 10:48:36 -04:00
committed by GitHub
parent fabf7d31fc
commit b5e1ea33d8
11 changed files with 202 additions and 0 deletions
+22
View File
@@ -1901,6 +1901,28 @@ Allow users to provide their own LLM API keys or subscriptions. When disabled, o
Enable the circuit breaker to protect against cascading failures from upstream AI provider overload (503, 529).
### --ai-budget-policy
| | |
|-------------|--------------------------------------|
| Type | <code>highest</code> |
| Environment | <code>$CODER_AI_BUDGET_POLICY</code> |
| YAML | <code>aibridge.budget_policy</code> |
| Default | <code>highest</code> |
Determines the effective group when a user belongs to multiple groups with AI budgets. "highest" selects the group with the largest spend limit, and is currently the only supported value.
### --ai-budget-period
| | |
|-------------|--------------------------------------|
| Type | <code>month</code> |
| Environment | <code>$CODER_AI_BUDGET_PERIOD</code> |
| YAML | <code>aibridge.budget_period</code> |
| Default | <code>month</code> |
Determines when accumulated AI spend resets to zero, aligned to UTC calendar boundaries. Only "month" is currently supported.
### --aibridge-proxy-enabled
| | |