Susana Ferreira
d6a5c8e9f8
refactor: make user AI budget and spend endpoints consistent ( #27611 )
...
## Description
Makes the user AI cost control endpoints consistent.
## Changes
- Replaces the flat `spend_limit_micros` and `limit_source` fields on
`GET /users/{user}/ai/spend` with a nested `effective_budget`, reusing
the type behind `group_budget`. The flat pair made it possible to encode
a limit without a source.
- Renames `AIGroupBudget` to `AIBudgetLimit`, since it also carries
`user_override` limits and is no longer group-specific. The type name is
not part of the wire format.
- Moves `/users/{user}/ai/budget` to `/users/{user}/ai/budget/override`.
The endpoint only ever managed the per-user override, which the type,
the handlers, and the operation IDs all already said; the path was the
only place that didn't.
> [!NOTE]
> Initially generated by Claude Opus 4.7, modified and reviewed by
@ssncferreira
2026-07-29 14:01:32 +01:00
..
2026-05-28 10:00:37 -05:00
2026-04-07 13:46:26 -05:00
2023-11-20 19:16:18 +00:00
2026-01-08 15:24:11 +04:00
2026-02-03 17:52:07 +00:00
2025-06-20 13:16:55 -06:00
2026-05-28 10:00:37 -05:00
2026-07-29 07:58:30 +01:00
2025-06-16 16:15:59 -06:00
2026-07-20 10:30:02 +01:00
2026-01-08 15:24:11 +04:00
2026-06-23 17:32:47 -05:00
2026-05-28 10:00:37 -05:00
2025-07-09 08:45:24 -06:00
2026-04-30 12:29:35 +02:00
2026-06-16 12:35:40 +00:00
2026-06-22 13:56:29 +02:00
2026-06-22 13:56:29 +02:00
2026-06-16 09:01:43 +00:00
2026-05-20 17:33:26 +02:00
2026-06-26 14:33:26 +01:00
2026-07-29 14:01:32 +01:00
2026-07-29 14:01:32 +01:00
2026-06-23 12:15:10 +01:00
2026-06-23 12:15:10 +01:00
2026-07-08 11:12:53 +02:00
2026-07-28 09:22:58 +01:00
2026-06-26 18:45:37 +02:00
2026-07-02 13:45:05 +00:00
2025-10-22 15:35:16 +02:00
2026-05-05 02:54:03 +05:00
2025-02-24 12:59:41 -05:00
2025-06-20 13:16:55 -06:00
2026-07-21 11:19:23 +02:00
2026-07-29 14:01:32 +01:00
2026-07-28 15:30:12 -05:00
2026-07-28 15:30:12 -05:00
2025-07-09 08:45:24 -06:00
2026-07-01 15:59:55 +03:00
2025-12-15 11:26:41 -06:00
2026-04-07 12:25:32 -06:00
2026-05-05 02:54:03 +05:00
2025-01-31 12:14:24 -07:00
2025-08-20 23:38:09 +10:00
2026-05-05 02:54:03 +05:00
2025-06-20 13:16:55 -06:00
2026-07-29 07:58:30 +01:00
2026-06-23 09:58:45 -07:00
2025-10-23 14:24:54 +02:00
2026-05-05 02:54:03 +05:00
2026-07-28 16:59:33 -07:00
2026-06-05 14:33:13 -05:00
2026-06-05 14:33:13 -05:00
2026-05-20 22:40:50 +00:00
2026-05-05 02:54:03 +05:00
2026-01-08 15:24:11 +04:00
2026-06-26 18:27:37 +02:00
2025-06-20 13:16:55 -06:00
2026-05-05 02:54:03 +05:00
2025-10-23 14:24:54 +02:00
2026-05-05 02:54:03 +05:00
2026-06-05 10:30:31 -05:00
2026-05-05 02:54:03 +05:00
2026-05-28 10:00:37 -05:00
2026-05-28 10:00:37 -05:00
2026-06-05 16:30:15 +01:00
2026-06-17 16:33:46 -06:00
2026-05-20 22:40:50 +00:00
2026-06-04 14:37:19 -04:00
2024-09-16 19:03:25 -05:00
2026-04-07 12:25:32 -06:00
2026-05-05 02:54:03 +05:00
2026-07-28 09:58:33 -06:00
2026-06-18 00:22:19 +10:00
2026-03-04 15:22:43 +02:00
2026-05-05 02:54:03 +05:00
2026-06-24 12:57:27 +01:00
2025-06-16 16:15:59 -06:00
2025-06-20 13:16:55 -06:00
2026-07-21 11:19:23 +02:00
2026-07-16 09:42:23 +02:00
2026-05-05 02:54:03 +05:00
2026-06-25 15:41:09 -06:00
2026-05-05 02:54:03 +05:00
2026-07-20 10:30:02 +01:00
2026-04-07 12:25:32 -06:00
2026-05-05 02:54:03 +05:00