mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix: show no budget instead of unlimited for empty group AI budget (#27993)
An empty per-member AI budget on the group settings page previously displayed "unlimited budget" with a "Members in this group have no spending cap." alert. Unlimited spend only applies when the everyone group is the sole group, so this messaging was misleading everywhere else. ## Changes - Empty budget now shows "This group has **no budget** set. View docs" with no info alert. "View docs" links to [Effective group resolution](https://coder.com/docs/ai-coder/ai-gateway/cost-controls#effective-group-resolution) using the versioned `docs()` helper. - Removed the "Members in this group have no spending cap." alert entirely. - Input placeholder changed from `unlimited` to `no budget`. - Updated the `AIBudgetUncapped` story expectations to match. ## Unchanged - Entering an explicit `$0` still shows the "A $0 limit disables AI access for this group." alert, as before. - Saving with an empty field still sends `null` to the budget API; backend semantics are untouched. Story tests pass: `pnpm test:storybook src/pages/GroupsPage/GroupSettingsPageView.stories.tsx` (7/7). --- *This PR was generated by Coder Agents on behalf of @tracyjohnsonux.*
This commit is contained in:
@@ -77,7 +77,7 @@ member can spend $200 USD and the group has a total spend limit of $2,000 USD.
|
||||
|
||||
Budget values behave as follows:
|
||||
|
||||
- An empty field means no limit. The field displays `unlimited`.
|
||||
- An empty field means no budget is set. The field displays `no budget`.
|
||||
- `$0 USD` blocks every request routed via AI Gateway from members whose
|
||||
effective group is this group.
|
||||
- The maximum is `$1,000,000 USD` per member per budget period.
|
||||
|
||||
Reference in New Issue
Block a user