Skip to content

feat: add group AI budget management UI#26375

Open
EhabY wants to merge 2 commits into
mainfrom
ehab/group-ai-budget-ui
Open

feat: add group AI budget management UI#26375
EhabY wants to merge 2 commits into
mainfrom
ehab/group-ai-budget-ui

Conversation

@EhabY

@EhabY EhabY commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Adds an AI budget section to the group settings page (/organizations/{org}/groups/{group}/settings), gated by the aibridge feature.

The page's existing Save persists a per-member monthly budget through PUT/DELETE /api/v2/groups/{group}/ai/budget alongside the group patch. An empty field is uncapped (deletes the budget), 0 disables spending, and any value >= 0 is accepted (matching the API's gte=0). The helper shows the resulting group-wide monthly maximum.

Part of AIGOV-294. The "AI governance add-on" access toggle shown in the design is out of scope here, as no backend field or endpoint exists for it yet.

@linear-code

linear-code Bot commented Jun 15, 2026

Copy link
Copy Markdown

AIGOV-294

@EhabY EhabY force-pushed the ehab/group-ai-budget-ui branch 2 times, most recently from 0e4e595 to 7ca5b73 Compare June 15, 2026 15:03
@EhabY EhabY marked this pull request as ready for review June 15, 2026 15:04
@coder-tasks

coder-tasks Bot commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Updates Needed

  • docs/ai-coder/ai-governance.md - This page lists AI Governance Add-On features (AI Gateway, Agent Firewall) but does not mention AI budget / spend controls. Add AI budgets as a listed feature and briefly describe what they do (per-group monthly spend limits for AI usage, configurable in group settings).

New Documentation Needed

  • docs/admin/users/quotas.md or docs/ai-coder/ai-governance.md - Add a section explaining AI budget behavior: empty field = uncapped spend, 0 = spending disabled, positive value = per-member monthly budget in USD. Clarify how the group-wide maximum is calculated (per-member budget x member count). This is a user-facing setting with no prose documentation anywhere; the only references are auto-generated API docs in docs/reference/api/enterprise.md and audit log field tracking.

Automated review via Coder Agents

const navigate = useNavigate();

// Budget routes are gated on aibridge; useFeatureVisibility is {} unlicensed.
const aibridgeVisible = Boolean(useFeatureVisibility().aibridge);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backend gates on this, but there's also ai_governance_user_limit. Do we want to unify the cost control features somehow?

Add an AI budget section to the group settings page, gated by the
aibridge feature. The page's Save persists a per-member monthly budget
via the group AI budget endpoints alongside the group patch: an empty
field is uncapped (deletes the budget), 0 disables spending, and any
value >= 0 is accepted. A helper shows the group-wide monthly maximum.
@EhabY EhabY force-pushed the ehab/group-ai-budget-ui branch from 7ca5b73 to d6279fb Compare June 15, 2026 15:27
Add AI budgets to the AI Governance Add-On feature list and a section
describing the per-member monthly spend limit, the empty/0/positive
values, and the group-wide maximum calculation.
@github-actions

Copy link
Copy Markdown

Docs preview

📖 View docs preview for docs/ai-coder/ai-governance.md

@EhabY EhabY changed the title feat(site): add group AI budget management UI feat: add group AI budget management UI Jun 15, 2026
@EhabY EhabY requested a review from ssncferreira June 15, 2026 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant