Files
coder/coderd
Sas Swart 8e569c9c2e refactor: share AI spend fields between organization spend types (#32663)
`UserOrganizationAISpend` and `OrganizationMemberAISpendStatus` now
share their effective group, budget and spend fields through a new
embedded `codersdk.AISpendBudgetStatus`, as suggested in
https://github.com/coder/coder/pull/32203#discussion_r4583554893. The
organization member AI spend handler now builds the budget with the
existing `aiBudgetLimitToSDK` helper instead of by hand.

The wire format does not change. Embedded struct fields serialize at the
top level of the JSON object, so both responses keep the same keys. In
the generated swagger, only the property descriptions change, because
the doc comments were merged to fit both types. `typesGenerated.ts` now
uses `extends AISpendBudgetStatus` with the same fields. The tests
change only because Go composite literals must name the embedded struct.

_Generated by Coder Agents on behalf of @SasSwart._
2026-12-03 08:56:42 +00:00
..