Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

feat: add group AI spend endpoint - #27568

#27568
Merged
ssncferreira merged 1 commit into
maincoder/coder:mainfrom
ssncf/aigov-group-ai-spendcoder/coder:ssncf/aigov-group-ai-spendCopy head branch name to clipboard
Jul 28, 2026
Merged

feat: add group AI spend endpoint#27568
ssncferreira merged 1 commit into
maincoder/coder:mainfrom
ssncf/aigov-group-ai-spendcoder/coder:ssncf/aigov-group-ai-spendCopy head branch name to clipboard

Conversation

@ssncferreira

@ssncferreira ssncferreira commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Description

Adds GET /api/v2/groups/{group}/ai/spend, returning the AI spend limit and aggregate spend for a single group over the current budget period. The period is derived from the deployment's configured budget period rather than being caller-specified, matching the other AI spend endpoints.

Changes

  • Add the groupAISpend handler and route, gated by the aigateway-cost-control experiment and the AIBridge feature.
  • Reuse the existing GetOrganizationGroupsAISpend query with a single group ID, so no new query or authorization path is introduced.
  • Add the GroupAISpend codersdk type and client method.

Closes https://linear.app/codercom/issue/AIGOV-475/implement-apiv2groupsgroupaispend

Note

Initially generated by Claude Opus 4.7, modified and reviewed by @ssncferreira

Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jul 28, 2026

Copy link
Copy Markdown

Docs preview

Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here.

@ssncferreira
ssncferreira force-pushed the ssncf/aigov-group-ai-spend branch 3 times, most recently from 8345374 to bd2816d Compare July 28, 2026 09:49
@linear-code

linear-code Bot commented Jul 28, 2026

Copy link
Copy Markdown

AIGOV-475

@ssncferreira
ssncferreira force-pushed the ssncf/aigov-group-ai-spend branch from bd2816d to b5548e9 Compare July 28, 2026 10:13
@ssncferreira
ssncferreira marked this pull request as ready for review July 28, 2026 10:13
@ssncferreira
ssncferreira requested a review from a team as a code owner July 28, 2026 10:13
@ssncferreira
ssncferreira requested a review from mtojek July 28, 2026 10:14

@mtojek mtojek left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, can you backport it?

@ssncferreira

Copy link
Copy Markdown
Contributor Author

LGTM, can you backport it?

@mtojek you mean cherry-pick, right? Yes, I can do it 👍

@ssncferreira
ssncferreira merged commit ed37483 into main Jul 28, 2026
38 checks passed
@ssncferreira
ssncferreira deleted the ssncf/aigov-group-ai-spend branch July 28, 2026 10:32
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.