From 4327fb88aee83d14d3f1224b2ac19a51b75ed84d Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Tue, 6 Oct 2026 05:54:32 +0000 Subject: [PATCH] feat: Updated OpenAPI spec --- ...ettingsTeamsByTeamIdCommandApiCommand.g.cs | 9 + ...ettingsUsersByUserIdCommandApiCommand.g.cs | 2 +- ...ettingsTeamsByTeamIdCommandApiCommand.g.cs | 2 +- ...ettingsUsersByUserIdCommandApiCommand.g.cs | 2 +- ...lient.EditRoutesSettingsTeamsByTeamId.g.cs | 12 +- ...lient.EditRoutesSettingsUsersByUserId.g.cs | 6 +- ...Client.GetRoutesSettingsTeamsByTeamId.g.cs | 4 +- ...Client.GetRoutesSettingsUsersByUserId.g.cs | 4 +- ...lient.EditRoutesSettingsTeamsByTeamId.g.cs | 11 +- ...lient.EditRoutesSettingsUsersByUserId.g.cs | 6 +- ...Client.GetRoutesSettingsTeamsByTeamId.g.cs | 4 +- ...Client.GetRoutesSettingsUsersByUserId.g.cs | 4 +- .../Baseten.JsonSerializerContext.g.cs | 4 + .../Baseten.JsonSerializerContextTypes.g.cs | 136 +++++++------ ...odels.RouteEffectiveSpendLimitV1.Json.g.cs | 141 +++++++++++++ ...ten.Models.RouteEffectiveSpendLimitV1.g.cs | 57 ++++++ ...Baseten.Models.RouteHarnessDefaultsV1.g.cs | 14 +- ...seten.Models.RouteSpendLimitSettingV1.g.cs | 40 ++-- ...els.RouteSpendLimitTeamDefaultV1.Json.g.cs | 141 +++++++++++++ ...n.Models.RouteSpendLimitTeamDefaultV1.g.cs | 59 ++++++ .../Baseten.Models.RouteTeamSettingsV1.g.cs | 14 +- ...els.RouteTeamSpendLimitSettingV1.Json.g.cs | 141 +++++++++++++ ...n.Models.RouteTeamSpendLimitSettingV1.g.cs | 46 +++++ ...n.Models.UpdateRouteHarnessDefaultsV1.g.cs | 15 +- ...Models.UpdateRouteSpendLimitSettingV1.g.cs | 14 +- ...dels.UpdateRouteTeamSettingsRequestV1.g.cs | 15 +- ...dateRouteTeamSpendLimitSettingV1.Json.g.cs | 141 +++++++++++++ ...ls.UpdateRouteTeamSpendLimitSettingV1.g.cs | 48 +++++ src/libs/Baseten/openapi.yaml | 188 ++++++++++++++++-- 29 files changed, 1156 insertions(+), 124 deletions(-) create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.Json.g.cs create mode 100644 src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.g.cs diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs index 853f31a..7966eac 100644 --- a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs @@ -18,6 +18,12 @@ internal static partial class EditRoutesSettingsTeamsByTeamIdCommandApiCommand { Description = @"Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.", }; + + private static Option SpendLimit { get; } = new( + name: @"--spend-limit") + { + Description = @"Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.", + }; private static Option Input { get; } = new(@"--input") { Description = "Load request JSON from a file path, '-' for stdin, or an inline JSON object/array string.", @@ -63,6 +69,7 @@ public static Command Create(string? commandName = null) Changes only the fields in the request, all or nothing. Requires team admin."); command.Arguments.Add(TeamId); command.Options.Add(HarnessDefaults); + command.Options.Add(SpendLimit); command.Options.Add(Input); command.Options.Add(RequestJson); command.Options.Add(RequestFile); @@ -90,12 +97,14 @@ await CliRuntime.RunAsync(async () => cancellationToken).ConfigureAwait(false); var teamId = parseResult.GetRequiredValue(TeamId); var harnessDefaults = CliRuntime.WasSpecified(parseResult, HarnessDefaults) ? parseResult.GetValue(HarnessDefaults) : (__requestBase is { } __HarnessDefaultsBaseValue ? __HarnessDefaultsBaseValue.HarnessDefaults : default); + var spendLimit = CliRuntime.WasSpecified(parseResult, SpendLimit) ? parseResult.GetValue(SpendLimit) : (__requestBase is { } __SpendLimitBaseValue ? __SpendLimitBaseValue.SpendLimit : default); using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); var response = await client.EditRoutesSettingsTeamsByTeamIdAsync( teamId: teamId, harnessDefaults: harnessDefaults, + spendLimit: spendLimit, cancellationToken: cancellationToken).ConfigureAwait(false); diff --git a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs index ec896c4..7628063 100644 --- a/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/EditRoutesSettingsUsersByUserIdCommandApiCommand.g.cs @@ -60,7 +60,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"edit-routes-settings-users-by-user-id", @"Updates a user's route settings -Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run."); +Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit."); command.Arguments.Add(UserId); command.Options.Add(SpendLimit); command.Options.Add(Input); diff --git a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs index 61c2c53..7676e25 100644 --- a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsTeamsByTeamIdCommandApiCommand.g.cs @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"get-routes-settings-teams-by-team-id", @"Gets a team's route settings -Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them."); +Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them."); command.Arguments.Add(TeamId); diff --git a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs index 565b968..8d9dec7 100644 --- a/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs +++ b/src/cli/Baseten.CLI/Commands/GetRoutesSettingsUsersByUserIdCommandApiCommand.g.cs @@ -38,7 +38,7 @@ private static string FormatResponse(ParseResult parseResult, global::Baseten.Ro public static Command Create(string? commandName = null) { var command = new Command(commandName ?? @"get-routes-settings-users-by-user-id", @"Gets a user's route settings -Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them."); +Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit."); command.Arguments.Add(UserId); diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs index d744f24..e1c9752 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs @@ -57,7 +57,8 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent( /// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \
/// --header "Authorization: Bearer $BASETEN_API_KEY" \
/// --data '{
- /// "harness_defaults": null
+ /// "harness_defaults": null,
+ /// "spend_limit": null
/// }' /// public async global::System.Threading.Tasks.Task EditRoutesSettingsTeamsByTeamIdAsync( @@ -91,7 +92,8 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent( /// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \
/// --header "Authorization: Bearer $BASETEN_API_KEY" \
/// --data '{
- /// "harness_defaults": null
+ /// "harness_defaults": null,
+ /// "spend_limit": null
/// }' /// public async global::System.Threading.Tasks.Task> EditRoutesSettingsTeamsByTeamIdAsResponseAsync( @@ -467,18 +469,24 @@ partial void ProcessEditRoutesSettingsTeamsByTeamIdResponseContent( /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// public async global::System.Threading.Tasks.Task EditRoutesSettingsTeamsByTeamIdAsync( string teamId, global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default) { var __request = new global::Baseten.UpdateRouteTeamSettingsRequestV1 { HarnessDefaults = harnessDefaults, + SpendLimit = spendLimit, }; return await EditRoutesSettingsTeamsByTeamIdAsync( diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs index e39967b..320b838 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.EditRoutesSettingsUsersByUserId.g.cs @@ -45,7 +45,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent( /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// @@ -79,7 +79,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent( } /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// @@ -460,7 +460,7 @@ partial void ProcessEditRoutesSettingsUsersByUserIdResponseContent( } /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs index cf01ed5..470d6c1 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdResponseContent( /// /// Gets a team's route settings
- /// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them. + /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsTeamsByTeamIdResponseContent( } /// /// Gets a team's route settings
- /// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them. + /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs index c4e866a..bb77eb2 100644 --- a/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.BasetenClient.GetRoutesSettingsUsersByUserId.g.cs @@ -43,7 +43,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdResponseContent( /// /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them. + /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -69,7 +69,7 @@ partial void ProcessGetRoutesSettingsUsersByUserIdResponseContent( } /// /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them. + /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs index c7ff696..93ec53e 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsTeamsByTeamId.g.cs @@ -18,7 +18,8 @@ public partial interface IBasetenClient /// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \
/// --header "Authorization: Bearer $BASETEN_API_KEY" \
/// --data '{
- /// "harness_defaults": null
+ /// "harness_defaults": null,
+ /// "spend_limit": null
/// }' /// global::System.Threading.Tasks.Task EditRoutesSettingsTeamsByTeamIdAsync( @@ -41,7 +42,8 @@ public partial interface IBasetenClient /// --url https://api.baseten.co/v1/routes/settings/teams/{team_id} \
/// --header "Authorization: Bearer $BASETEN_API_KEY" \
/// --data '{
- /// "harness_defaults": null
+ /// "harness_defaults": null,
+ /// "spend_limit": null
/// }' /// global::System.Threading.Tasks.Task> EditRoutesSettingsTeamsByTeamIdAsResponseAsync( @@ -59,12 +61,17 @@ public partial interface IBasetenClient /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. /// The token to cancel the operation with /// global::System.Threading.Tasks.Task EditRoutesSettingsTeamsByTeamIdAsync( string teamId, global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults = default, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit = default, global::Baseten.AutoSDKRequestOptions? requestOptions = default, global::System.Threading.CancellationToken cancellationToken = default); } diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs index 4caf6db..60c9509 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.EditRoutesSettingsUsersByUserId.g.cs @@ -6,7 +6,7 @@ public partial interface IBasetenClient { /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// @@ -29,7 +29,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// @@ -52,7 +52,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Updates a user's route settings
- /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run. + /// Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit. ///
/// /// diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs index b31e4b2..947cb03 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsTeamsByTeamId.g.cs @@ -6,7 +6,7 @@ public partial interface IBasetenClient { /// /// Gets a team's route settings
- /// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them. + /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -23,7 +23,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Gets a team's route settings
- /// Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them. + /// Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs index 8756bb2..fce7ac5 100644 --- a/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs +++ b/src/libs/Baseten/Generated/Baseten.IBasetenClient.GetRoutesSettingsUsersByUserId.g.cs @@ -6,7 +6,7 @@ public partial interface IBasetenClient { /// /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them. + /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. @@ -23,7 +23,7 @@ public partial interface IBasetenClient global::System.Threading.CancellationToken cancellationToken = default); /// /// Gets a user's route settings
- /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them. + /// Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit. ///
/// /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering. diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs index 9f942f6..bb89474 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContext.g.cs @@ -645,8 +645,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RoutesUsageRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteEffectiveSpendLimitV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSettingSourceV1), TypeInfoPropertyName = "RouteSettingSourceV12")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendLimitSettingV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteSpendLimitTeamDefaultV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteUserSettingsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteSpendLimitSettingV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteUserSettingsRequestV1))] @@ -654,10 +656,12 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteHarnessModelV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.PrimaryHarnessDefaultsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteHarnessDefaultsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteTeamSpendLimitSettingV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteTeamSettingsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateBackgroundHarnessModelsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdatePrimaryHarnessModelsV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteHarnessDefaultsV1))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteTeamSpendLimitSettingV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteTeamSettingsRequestV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.RouteTombstoneV1))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Baseten.UpdateRouteRequestV1))] diff --git a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs index e0dfc0d..b1a53b9 100644 --- a/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs +++ b/src/libs/Baseten/Generated/Baseten.JsonSerializerContextTypes.g.cs @@ -2525,243 +2525,259 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Baseten.RouteSettingSourceV1? Type623 { get; set; } + public global::Baseten.RouteEffectiveSpendLimitV1? Type623 { get; set; } /// /// /// - public global::Baseten.RouteSpendLimitSettingV1? Type624 { get; set; } + public global::Baseten.RouteSettingSourceV1? Type624 { get; set; } /// /// /// - public global::Baseten.RouteUserSettingsV1? Type625 { get; set; } + public global::Baseten.RouteSpendLimitSettingV1? Type625 { get; set; } /// /// /// - public global::Baseten.UpdateRouteSpendLimitSettingV1? Type626 { get; set; } + public global::Baseten.RouteSpendLimitTeamDefaultV1? Type626 { get; set; } /// /// /// - public global::Baseten.UpdateRouteUserSettingsRequestV1? Type627 { get; set; } + public global::Baseten.RouteUserSettingsV1? Type627 { get; set; } /// /// /// - public global::Baseten.BackgroundHarnessDefaultsV1? Type628 { get; set; } + public global::Baseten.UpdateRouteSpendLimitSettingV1? Type628 { get; set; } /// /// /// - public global::Baseten.RouteHarnessModelV1? Type629 { get; set; } + public global::Baseten.UpdateRouteUserSettingsRequestV1? Type629 { get; set; } /// /// /// - public global::Baseten.PrimaryHarnessDefaultsV1? Type630 { get; set; } + public global::Baseten.BackgroundHarnessDefaultsV1? Type630 { get; set; } /// /// /// - public global::Baseten.RouteHarnessDefaultsV1? Type631 { get; set; } + public global::Baseten.RouteHarnessModelV1? Type631 { get; set; } /// /// /// - public global::Baseten.RouteTeamSettingsV1? Type632 { get; set; } + public global::Baseten.PrimaryHarnessDefaultsV1? Type632 { get; set; } /// /// /// - public global::Baseten.UpdateBackgroundHarnessModelsV1? Type633 { get; set; } + public global::Baseten.RouteHarnessDefaultsV1? Type633 { get; set; } /// /// /// - public global::Baseten.UpdatePrimaryHarnessModelsV1? Type634 { get; set; } + public global::Baseten.RouteTeamSpendLimitSettingV1? Type634 { get; set; } /// /// /// - public global::Baseten.UpdateRouteHarnessDefaultsV1? Type635 { get; set; } + public global::Baseten.RouteTeamSettingsV1? Type635 { get; set; } /// /// /// - public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type636 { get; set; } + public global::Baseten.UpdateBackgroundHarnessModelsV1? Type636 { get; set; } /// /// /// - public global::Baseten.RouteTombstoneV1? Type637 { get; set; } + public global::Baseten.UpdatePrimaryHarnessModelsV1? Type637 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1? Type638 { get; set; } + public global::Baseten.UpdateRouteHarnessDefaultsV1? Type638 { get; set; } /// /// /// - public global::Baseten.TargetVariant1? Type639 { get; set; } + public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? Type639 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type640 { get; set; } + public global::Baseten.UpdateRouteTeamSettingsRequestV1? Type640 { get; set; } /// /// /// - public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type641 { get; set; } + public global::Baseten.RouteTombstoneV1? Type641 { get; set; } /// /// /// - public global::Baseten.EndpointTargetV1? Type642 { get; set; } + public global::Baseten.UpdateRouteRequestV1? Type642 { get; set; } /// /// /// - public global::Baseten.GatewayProvider? Type643 { get; set; } + public global::Baseten.TargetVariant1? Type643 { get; set; } /// /// /// - public global::Baseten.VertexTargetConfigV1? Type644 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1Discriminator? Type644 { get; set; } /// /// /// - public global::Baseten.EndpointV1? Type645 { get; set; } + public global::Baseten.UpdateRouteRequestV1TargetVariant1DiscriminatorType? Type645 { get; set; } /// /// /// - public global::Baseten.SharedEndpointRegionV1? Type646 { get; set; } + public global::Baseten.EndpointTargetV1? Type646 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type647 { get; set; } + public global::Baseten.GatewayProvider? Type647 { get; set; } /// /// /// - public global::Baseten.EndpointsResponseV1? Type648 { get; set; } + public global::Baseten.VertexTargetConfigV1? Type648 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type649 { get; set; } + public global::Baseten.EndpointV1? Type649 { get; set; } /// /// /// - public global::Baseten.EndpointTargetRequestV1? Type650 { get; set; } + public global::Baseten.SharedEndpointRegionV1? Type650 { get; set; } /// /// /// - public global::Baseten.CreateEndpointRequestV1? Type651 { get; set; } + public global::System.Collections.Generic.IList? Type651 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type652 { get; set; } + public global::Baseten.EndpointsResponseV1? Type652 { get; set; } /// /// /// - public global::Baseten.EndpointTombstoneV1? Type653 { get; set; } + public global::System.Collections.Generic.IList? Type653 { get; set; } /// /// /// - public global::Baseten.UpdateEndpointRequestV1? Type654 { get; set; } + public global::Baseten.EndpointTargetRequestV1? Type654 { get; set; } /// /// /// - public global::Baseten.EffectiveModelConfigV1? Type655 { get; set; } + public global::Baseten.CreateEndpointRequestV1? Type655 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type656 { get; set; } + public global::System.Collections.Generic.IList? Type656 { get; set; } /// /// /// - public global::Baseten.EffectiveRateLimitV1? Type657 { get; set; } + public global::Baseten.EndpointTombstoneV1? Type657 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type658 { get; set; } + public global::Baseten.UpdateEndpointRequestV1? Type658 { get; set; } /// /// /// - public global::Baseten.EffectiveUsageLimitV1? Type659 { get; set; } + public global::Baseten.EffectiveModelConfigV1? Type659 { get; set; } /// /// /// - public global::Baseten.UsageLimitUnitV1? Type660 { get; set; } + public global::System.Collections.Generic.IList? Type660 { get; set; } /// /// /// - public global::Baseten.GroupHierarchyV1? Type661 { get; set; } + public global::Baseten.EffectiveRateLimitV1? Type661 { get; set; } /// /// /// - public global::Baseten.LimitEnforcementV1? Type662 { get; set; } + public global::System.Collections.Generic.IList? Type662 { get; set; } /// /// /// - public global::Baseten.GroupMetadataV1? Type663 { get; set; } + public global::Baseten.EffectiveUsageLimitV1? Type663 { get; set; } /// /// /// - public global::Baseten.GroupV1? Type664 { get; set; } + public global::Baseten.UsageLimitUnitV1? Type664 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type665 { get; set; } + public global::Baseten.GroupHierarchyV1? Type665 { get; set; } /// /// /// - public global::Baseten.ModelConfigV1? Type666 { get; set; } + public global::Baseten.LimitEnforcementV1? Type666 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type667 { get; set; } + public global::Baseten.GroupMetadataV1? Type667 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type668 { get; set; } + public global::Baseten.GroupV1? Type668 { get; set; } /// /// /// - public global::Baseten.UsageLimitV1? Type669 { get; set; } + public global::System.Collections.Generic.IList? Type669 { get; set; } /// /// /// - public global::Baseten.GroupsResponseV1? Type670 { get; set; } + public global::Baseten.ModelConfigV1? Type670 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type671 { get; set; } + public global::System.Collections.Generic.IList? Type671 { get; set; } /// /// /// - public global::Baseten.CreateGroupHierarchyV1? Type672 { get; set; } + public global::System.Collections.Generic.IList? Type672 { get; set; } /// /// /// - public global::Baseten.CreateGroupRequestV1? Type673 { get; set; } + public global::Baseten.UsageLimitV1? Type673 { get; set; } /// /// /// - public global::Baseten.UpdateGroupMetadataV1? Type674 { get; set; } + public global::Baseten.GroupsResponseV1? Type674 { get; set; } /// /// /// - public global::Baseten.UpdateGroupRequestV1? Type675 { get; set; } + public global::System.Collections.Generic.IList? Type675 { get; set; } /// /// /// - public global::Baseten.GatewayKeyInfoV1? Type676 { get; set; } + public global::Baseten.CreateGroupHierarchyV1? Type676 { get; set; } /// /// /// - public global::Baseten.KeysForGroupResponseV1? Type677 { get; set; } + public global::Baseten.CreateGroupRequestV1? Type677 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type678 { get; set; } + public global::Baseten.UpdateGroupMetadataV1? Type678 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupRequestV1? Type679 { get; set; } + public global::Baseten.UpdateGroupRequestV1? Type679 { get; set; } /// /// /// - public global::Baseten.CreateApiKeyForGroupResponseV1? Type680 { get; set; } + public global::Baseten.GatewayKeyInfoV1? Type680 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyRequestV1? Type681 { get; set; } + public global::Baseten.KeysForGroupResponseV1? Type681 { get; set; } /// /// /// - public global::Baseten.RegisterAPIKeyResponseV1? Type682 { get; set; } + public global::System.Collections.Generic.IList? Type682 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupRequestV1? Type683 { get; set; } + /// + /// + /// + public global::Baseten.CreateApiKeyForGroupResponseV1? Type684 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyRequestV1? Type685 { get; set; } + /// + /// + /// + public global::Baseten.RegisterAPIKeyResponseV1? Type686 { get; set; } /// /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.Json.g.cs new file mode 100644 index 0000000..e7c8f7c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RouteEffectiveSpendLimitV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RouteEffectiveSpendLimitV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RouteEffectiveSpendLimitV1), + jsonSerializerContext) as global::Baseten.RouteEffectiveSpendLimitV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.RouteEffectiveSpendLimitV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.RouteEffectiveSpendLimitV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RouteEffectiveSpendLimitV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteEffectiveSpendLimitV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.g.cs new file mode 100644 index 0000000..79207dc --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteEffectiveSpendLimitV1.g.cs @@ -0,0 +1,57 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RouteEffectiveSpendLimitV1 + { + /// + /// Spend limit in USD enforced for the current UTC calendar month: the user's own limit, else the team default. Null when no limit applies. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("monthly_limit_usd")] + public string? MonthlyLimitUsd { get; set; } + + /// + /// Where the limit comes from: `user` when it is set on the user, `team` when it is the team default. Null when no limit applies. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("source")] + public global::Baseten.RouteSettingSourceV1? Source { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Spend limit in USD enforced for the current UTC calendar month: the user's own limit, else the team default. Null when no limit applies. + /// + /// + /// Where the limit comes from: `user` when it is set on the user, `team` when it is the team default. Null when no limit applies. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RouteEffectiveSpendLimitV1( + string? monthlyLimitUsd, + global::Baseten.RouteSettingSourceV1? source) + { + this.MonthlyLimitUsd = monthlyLimitUsd; + this.Source = source; + } + + /// + /// Initializes a new instance of the class. + /// + public RouteEffectiveSpendLimitV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteHarnessDefaultsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteHarnessDefaultsV1.g.cs index c8adafb..9a7ae0f 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteHarnessDefaultsV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteHarnessDefaultsV1.g.cs @@ -29,6 +29,13 @@ public sealed partial class RouteHarnessDefaultsV1 [global::System.Text.Json.Serialization.JsonRequired] public required global::Baseten.PrimaryHarnessDefaultsV1 Codex { get; set; } + /// + /// Default models for Pi. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("pi")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.PrimaryHarnessDefaultsV1 Pi { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -47,17 +54,22 @@ public sealed partial class RouteHarnessDefaultsV1 /// /// Default models for Codex. /// + /// + /// Default models for Pi. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RouteHarnessDefaultsV1( global::Baseten.BackgroundHarnessDefaultsV1 claudeCode, global::Baseten.BackgroundHarnessDefaultsV1 opencode, - global::Baseten.PrimaryHarnessDefaultsV1 codex) + global::Baseten.PrimaryHarnessDefaultsV1 codex, + global::Baseten.PrimaryHarnessDefaultsV1 pi) { this.ClaudeCode = claudeCode ?? throw new global::System.ArgumentNullException(nameof(claudeCode)); this.Opencode = opencode ?? throw new global::System.ArgumentNullException(nameof(opencode)); this.Codex = codex ?? throw new global::System.ArgumentNullException(nameof(codex)); + this.Pi = pi ?? throw new global::System.ArgumentNullException(nameof(pi)); } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitSettingV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitSettingV1.g.cs index b8bebc6..72d98cf 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitSettingV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitSettingV1.g.cs @@ -9,16 +9,23 @@ namespace Baseten public sealed partial class RouteSpendLimitSettingV1 { /// - /// Standing spend limit in USD for each UTC calendar month, returned as an exact decimal string. Null when no limit applies. + /// Standing spend limit in USD for each UTC calendar month set on the user. Null when the user has no limit of their own. /// - [global::System.Text.Json.Serialization.JsonPropertyName("monthly_limit_usd")] - public string? MonthlyLimitUsd { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user_monthly_limit_usd")] + public string? UserMonthlyLimitUsd { get; set; } /// - /// Where the limit comes from: `user` when it is set on the user. Null when no limit applies. + /// Per-member limit of the team the user's active Code key belongs to. This limit applies when the user has no limit of their own. Null when there is none. /// - [global::System.Text.Json.Serialization.JsonPropertyName("source")] - public global::Baseten.RouteSettingSourceV1? Source { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("team_default")] + public global::Baseten.RouteSpendLimitTeamDefaultV1? TeamDefault { get; set; } + + /// + /// The effective limit enforced for the current month. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("effective")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.RouteEffectiveSpendLimitV1 Effective { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -29,21 +36,26 @@ public sealed partial class RouteSpendLimitSettingV1 /// /// Initializes a new instance of the class. /// - /// - /// Standing spend limit in USD for each UTC calendar month, returned as an exact decimal string. Null when no limit applies. + /// + /// The effective limit enforced for the current month. + /// + /// + /// Standing spend limit in USD for each UTC calendar month set on the user. Null when the user has no limit of their own. /// - /// - /// Where the limit comes from: `user` when it is set on the user. Null when no limit applies. + /// + /// Per-member limit of the team the user's active Code key belongs to. This limit applies when the user has no limit of their own. Null when there is none. /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RouteSpendLimitSettingV1( - string? monthlyLimitUsd, - global::Baseten.RouteSettingSourceV1? source) + global::Baseten.RouteEffectiveSpendLimitV1 effective, + string? userMonthlyLimitUsd, + global::Baseten.RouteSpendLimitTeamDefaultV1? teamDefault) { - this.MonthlyLimitUsd = monthlyLimitUsd; - this.Source = source; + this.UserMonthlyLimitUsd = userMonthlyLimitUsd; + this.TeamDefault = teamDefault; + this.Effective = effective ?? throw new global::System.ArgumentNullException(nameof(effective)); } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.Json.g.cs new file mode 100644 index 0000000..5a0a112 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RouteSpendLimitTeamDefaultV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RouteSpendLimitTeamDefaultV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RouteSpendLimitTeamDefaultV1), + jsonSerializerContext) as global::Baseten.RouteSpendLimitTeamDefaultV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.RouteSpendLimitTeamDefaultV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.RouteSpendLimitTeamDefaultV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RouteSpendLimitTeamDefaultV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteSpendLimitTeamDefaultV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.g.cs new file mode 100644 index 0000000..1b138c1 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteSpendLimitTeamDefaultV1.g.cs @@ -0,0 +1,59 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RouteSpendLimitTeamDefaultV1 + { + /// + /// ID of the team the user's active Code key belongs to. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("team_id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string TeamId { get; set; } + + /// + /// The team's per-member spend limit in USD for each UTC calendar month. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("per_member_monthly_limit_usd")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string PerMemberMonthlyLimitUsd { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// ID of the team the user's active Code key belongs to. + /// + /// + /// The team's per-member spend limit in USD for each UTC calendar month. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RouteSpendLimitTeamDefaultV1( + string teamId, + string perMemberMonthlyLimitUsd) + { + this.TeamId = teamId ?? throw new global::System.ArgumentNullException(nameof(teamId)); + this.PerMemberMonthlyLimitUsd = perMemberMonthlyLimitUsd ?? throw new global::System.ArgumentNullException(nameof(perMemberMonthlyLimitUsd)); + } + + /// + /// Initializes a new instance of the class. + /// + public RouteSpendLimitTeamDefaultV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsV1.g.cs index 56be2b0..ee58cb2 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSettingsV1.g.cs @@ -22,6 +22,13 @@ public sealed partial class RouteTeamSettingsV1 [global::System.Text.Json.Serialization.JsonRequired] public required global::Baseten.RouteHarnessDefaultsV1 HarnessDefaults { get; set; } + /// + /// Spend limits for Baseten Code for members whose active Code key belongs to this team. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("spend_limit")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Baseten.RouteTeamSpendLimitSettingV1 SpendLimit { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -37,15 +44,20 @@ public sealed partial class RouteTeamSettingsV1 /// /// Route for each model role of each coding harness. A role with no route set by a team admin uses the default chosen from the team's Model API routes: the recommended model for `primary` and the lowest-priced model for `background`. These defaults never use external-provider routes. /// + /// + /// Spend limits for Baseten Code for members whose active Code key belongs to this team. + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public RouteTeamSettingsV1( string teamId, - global::Baseten.RouteHarnessDefaultsV1 harnessDefaults) + global::Baseten.RouteHarnessDefaultsV1 harnessDefaults, + global::Baseten.RouteTeamSpendLimitSettingV1 spendLimit) { this.TeamId = teamId ?? throw new global::System.ArgumentNullException(nameof(teamId)); this.HarnessDefaults = harnessDefaults ?? throw new global::System.ArgumentNullException(nameof(harnessDefaults)); + this.SpendLimit = spendLimit ?? throw new global::System.ArgumentNullException(nameof(spendLimit)); } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.Json.g.cs new file mode 100644 index 0000000..166072c --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class RouteTeamSpendLimitSettingV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.RouteTeamSpendLimitSettingV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.RouteTeamSpendLimitSettingV1), + jsonSerializerContext) as global::Baseten.RouteTeamSpendLimitSettingV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.RouteTeamSpendLimitSettingV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.RouteTeamSpendLimitSettingV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.RouteTeamSpendLimitSettingV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.RouteTeamSpendLimitSettingV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.g.cs new file mode 100644 index 0000000..bd461e5 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.RouteTeamSpendLimitSettingV1.g.cs @@ -0,0 +1,46 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class RouteTeamSpendLimitSettingV1 + { + /// + /// Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Returned as an exact decimal string. Null when the team has no per-member limit. + /// + [global::System.Text.Json.Serialization.JsonPropertyName("per_member_monthly_limit_usd")] + public string? PerMemberMonthlyLimitUsd { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Returned as an exact decimal string. Null when the team has no per-member limit. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public RouteTeamSpendLimitSettingV1( + string? perMemberMonthlyLimitUsd) + { + this.PerMemberMonthlyLimitUsd = perMemberMonthlyLimitUsd; + } + + /// + /// Initializes a new instance of the class. + /// + public RouteTeamSpendLimitSettingV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteHarnessDefaultsV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteHarnessDefaultsV1.g.cs index d66230f..3b828e4 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteHarnessDefaultsV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteHarnessDefaultsV1.g.cs @@ -29,6 +29,13 @@ public sealed partial class UpdateRouteHarnessDefaultsV1 [global::System.Text.Json.Serialization.JsonPropertyName("codex")] public global::Baseten.UpdatePrimaryHarnessModelsV1? Codex { get; set; } + /// + /// Route IDs for the model roles to change; roles left out are unchanged. Every route must belong to the team. Pass null to clear every role, or omit to leave the harness unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("pi")] + public global::Baseten.UpdatePrimaryHarnessModelsV1? Pi { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -50,17 +57,23 @@ public sealed partial class UpdateRouteHarnessDefaultsV1 /// Route IDs for the model roles to change; roles left out are unchanged. Every route must belong to the team. Pass null to clear every role, or omit to leave the harness unchanged.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Route IDs for the model roles to change; roles left out are unchanged. Every route must belong to the team. Pass null to clear every role, or omit to leave the harness unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateRouteHarnessDefaultsV1( global::Baseten.UpdateBackgroundHarnessModelsV1? claudeCode, global::Baseten.UpdateBackgroundHarnessModelsV1? opencode, - global::Baseten.UpdatePrimaryHarnessModelsV1? codex) + global::Baseten.UpdatePrimaryHarnessModelsV1? codex, + global::Baseten.UpdatePrimaryHarnessModelsV1? pi) { this.ClaudeCode = claudeCode; this.Opencode = opencode; this.Codex = codex; + this.Pi = pi; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteSpendLimitSettingV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteSpendLimitSettingV1.g.cs index 0d84359..81696e6 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteSpendLimitSettingV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteSpendLimitSettingV1.g.cs @@ -9,11 +9,11 @@ namespace Baseten public sealed partial class UpdateRouteSpendLimitSettingV1 { /// - /// Standing spend limit in USD for each UTC calendar month, as a non-negative decimal string with at most 9 decimal places. Send null to remove the limit; omit to leave it unchanged.
+ /// Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 ///
- [global::System.Text.Json.Serialization.JsonPropertyName("monthly_limit_usd")] - public string? MonthlyLimitUsd { get; set; } + [global::System.Text.Json.Serialization.JsonPropertyName("user_monthly_limit_usd")] + public string? UserMonthlyLimitUsd { get; set; } /// /// Additional properties that are not explicitly defined in the schema @@ -24,17 +24,17 @@ public sealed partial class UpdateRouteSpendLimitSettingV1 /// /// Initializes a new instance of the class. /// - /// - /// Standing spend limit in USD for each UTC calendar month, as a non-negative decimal string with at most 9 decimal places. Send null to remove the limit; omit to leave it unchanged.
+ /// + /// Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateRouteSpendLimitSettingV1( - string? monthlyLimitUsd) + string? userMonthlyLimitUsd) { - this.MonthlyLimitUsd = monthlyLimitUsd; + this.UserMonthlyLimitUsd = userMonthlyLimitUsd; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSettingsRequestV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSettingsRequestV1.g.cs index 0beb551..501781c 100644 --- a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSettingsRequestV1.g.cs +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSettingsRequestV1.g.cs @@ -15,6 +15,13 @@ public sealed partial class UpdateRouteTeamSettingsRequestV1 [global::System.Text.Json.Serialization.JsonPropertyName("harness_defaults")] public global::Baseten.UpdateRouteHarnessDefaultsV1? HarnessDefaults { get; set; } + /// + /// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("spend_limit")] + public global::Baseten.UpdateRouteTeamSpendLimitSettingV1? SpendLimit { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -28,13 +35,19 @@ public sealed partial class UpdateRouteTeamSettingsRequestV1 /// Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.
/// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 /// + /// + /// Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif public UpdateRouteTeamSettingsRequestV1( - global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults) + global::Baseten.UpdateRouteHarnessDefaultsV1? harnessDefaults, + global::Baseten.UpdateRouteTeamSpendLimitSettingV1? spendLimit) { this.HarnessDefaults = harnessDefaults; + this.SpendLimit = spendLimit; } /// diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.Json.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.Json.g.cs new file mode 100644 index 0000000..1ca8a73 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Baseten +{ + public sealed partial class UpdateRouteTeamSpendLimitSettingV1 + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Baseten.UpdateRouteTeamSpendLimitSettingV1? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Baseten.UpdateRouteTeamSpendLimitSettingV1), + jsonSerializerContext) as global::Baseten.UpdateRouteTeamSpendLimitSettingV1; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Baseten.UpdateRouteTeamSpendLimitSettingV1? FromJson( + string json) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Baseten.UpdateRouteTeamSpendLimitSettingV1? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Baseten.UpdateRouteTeamSpendLimitSettingV1), + jsonSerializerContext).ConfigureAwait(false)) as global::Baseten.UpdateRouteTeamSpendLimitSettingV1; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Baseten.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.g.cs b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.g.cs new file mode 100644 index 0000000..7fd9732 --- /dev/null +++ b/src/libs/Baseten/Generated/Baseten.Models.UpdateRouteTeamSpendLimitSettingV1.g.cs @@ -0,0 +1,48 @@ + +#nullable enable + +namespace Baseten +{ + /// + /// + /// + public sealed partial class UpdateRouteTeamSpendLimitSettingV1 + { + /// + /// Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Send null to remove it; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("per_member_monthly_limit_usd")] + public string? PerMemberMonthlyLimitUsd { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Send null to remove it; omit to leave it unchanged.
+ /// Default Value: openapi-json-null-sentinel-value-2BF93600-0FE4-4250-987A-E5DDB203E464 + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public UpdateRouteTeamSpendLimitSettingV1( + string? perMemberMonthlyLimitUsd) + { + this.PerMemberMonthlyLimitUsd = perMemberMonthlyLimitUsd; + } + + /// + /// Initializes a new instance of the class. + /// + public UpdateRouteTeamSpendLimitSettingV1() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Baseten/openapi.yaml b/src/libs/Baseten/openapi.yaml index c418cc8..847e51f 100644 --- a/src/libs/Baseten/openapi.yaml +++ b/src/libs/Baseten/openapi.yaml @@ -9769,7 +9769,7 @@ "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/users/{user_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" } ], - "description": "Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month. Use `me` as the user ID for your own settings. Users can read their own settings; only organization admins can read other users' settings or change them.", + "description": "Returns the settings that apply to the user, including the spend limit that caps what they can spend on Baseten Code each month: the limit set on the user, their team's per-member limit, and the effective limit for this user. The user limit always overrides the team's per-member limit.", "responses": { "200": { "description": "", @@ -9801,7 +9801,7 @@ "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/users/{user_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'spend_limit': None}\n)\n\nprint(response.text)" } ], - "description": "Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. A limit of 0 blocks the user after their first metered request. Spend is metered every 15 minutes and can lag, so a user can go over the limit. If the user has spend this month, changes take effect within seconds; otherwise at the next metering run.", + "description": "Changes only the fields in the request. Once the user's metered spend in a month reaches the spend limit, requests with Routes keys they created are rejected until the limit is raised or the next month starts. Spend is metered every 15 minutes and can lag, so a user can go over the limit. The user's own limit supersedes their team's per-member limit.", "requestBody": { "content": { "application/json": { @@ -9840,7 +9840,7 @@ "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/teams/{team_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"GET\",\n url,\n headers=headers,\n json={}\n)\n\nprint(response.text)" } ], - "description": "Returns the settings that apply to the team, including the default models for each coding harness. Any member who can invoke the team's routes can read them.", + "description": "Returns the settings that apply to the team, including the default models for each coding harness and the team's spend limits. Any member who can invoke the team's routes can read them.", "responses": { "200": { "description": "", @@ -9865,11 +9865,11 @@ "x-codeSamples": [ { "lang": "bash", - "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/routes/settings/teams/{team_id} \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"harness_defaults\": null\n}'" + "source": "curl --request PATCH \\\n--url https://api.baseten.co/v1/routes/settings/teams/{team_id} \\\n--header \"Authorization: Bearer $BASETEN_API_KEY\" \\\n--data '{\n \"harness_defaults\": null,\n \"spend_limit\": null\n}'" }, { "lang": "python", - "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/teams/{team_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'harness_defaults': None}\n)\n\nprint(response.text)" + "source": "import requests\nimport os\nAPI_KEY = os.environ.get(\"BASETEN_API_KEY\", \"\")\nurl = \"https://api.baseten.co/v1/routes/settings/teams/{team_id}\"\n\nheaders = {\"Authorization\": f\"Bearer {API_KEY}\"}\n\nresponse = requests.request(\n \"PATCH\",\n url,\n headers=headers,\n json={'harness_defaults': None, 'spend_limit': None}\n)\n\nprint(response.text)" } ], "description": "Changes only the fields in the request, all or nothing. Requires team admin.", @@ -31386,6 +31386,42 @@ "title": "RoutesUsageRequestV1", "type": "object" }, + "RouteEffectiveSpendLimitV1": { + "properties": { + "monthly_limit_usd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Spend limit in USD enforced for the current UTC calendar month: the user's own limit, else the team default. Null when no limit applies.", + "examples": [ + "200" + ], + "title": "Monthly Limit Usd" + }, + "source": { + "anyOf": [ + { + "$ref": "#/components/schemas/RouteSettingSourceV1" + }, + { + "type": "null" + } + ], + "description": "Where the limit comes from: `user` when it is set on the user, `team` when it is the team default. Null when no limit applies." + } + }, + "required": [ + "monthly_limit_usd", + "source" + ], + "title": "RouteEffectiveSpendLimitV1", + "type": "object" + }, "RouteSettingSourceV1": { "enum": [ "user", @@ -31396,7 +31432,7 @@ }, "RouteSpendLimitSettingV1": { "properties": { - "monthly_limit_usd": { + "user_monthly_limit_usd": { "anyOf": [ { "type": "string" @@ -31405,31 +31441,62 @@ "type": "null" } ], - "description": "Standing spend limit in USD for each UTC calendar month, returned as an exact decimal string. Null when no limit applies.", + "description": "Standing spend limit in USD for each UTC calendar month set on the user. Null when the user has no limit of their own.", "examples": [ "200" ], - "title": "Monthly Limit Usd" + "title": "User Monthly Limit Usd" }, - "source": { + "team_default": { "anyOf": [ { - "$ref": "#/components/schemas/RouteSettingSourceV1" + "$ref": "#/components/schemas/RouteSpendLimitTeamDefaultV1" }, { "type": "null" } ], - "description": "Where the limit comes from: `user` when it is set on the user. Null when no limit applies." + "description": "Per-member limit of the team the user's active Code key belongs to. This limit applies when the user has no limit of their own. Null when there is none." + }, + "effective": { + "$ref": "#/components/schemas/RouteEffectiveSpendLimitV1", + "description": "The effective limit enforced for the current month." } }, "required": [ - "monthly_limit_usd", - "source" + "user_monthly_limit_usd", + "team_default", + "effective" ], "title": "RouteSpendLimitSettingV1", "type": "object" }, + "RouteSpendLimitTeamDefaultV1": { + "properties": { + "team_id": { + "description": "ID of the team the user's active Code key belongs to.", + "examples": [ + "abc1234" + ], + "title": "Team Id", + "type": "string" + }, + "per_member_monthly_limit_usd": { + "description": "The team's per-member spend limit in USD for each UTC calendar month.", + "examples": [ + "100" + ], + "title": "Per Member Monthly Limit Usd", + "type": "string" + } + }, + "required": [ + "team_id", + "per_member_monthly_limit_usd" + ], + "title": "RouteSpendLimitTeamDefaultV1", + "type": "object" + }, "RouteUserSettingsV1": { "properties": { "user_id": { @@ -31472,7 +31539,7 @@ "additionalProperties": false, "minProperties": 1, "properties": { - "monthly_limit_usd": { + "user_monthly_limit_usd": { "anyOf": [ { "type": "string" @@ -31482,11 +31549,11 @@ } ], "default": null, - "description": "Standing spend limit in USD for each UTC calendar month, as a non-negative decimal string with at most 9 decimal places. Send null to remove the limit; omit to leave it unchanged.", + "description": "Standing spend limit in USD for each UTC calendar month. Send null to remove the limit; omit to leave it unchanged.", "examples": [ "200" ], - "title": "Monthly Limit Usd", + "title": "User Monthly Limit Usd", "x-null-distinct": true } }, @@ -31579,12 +31646,17 @@ "codex": { "$ref": "#/components/schemas/PrimaryHarnessDefaultsV1", "description": "Default models for Codex." + }, + "pi": { + "$ref": "#/components/schemas/PrimaryHarnessDefaultsV1", + "description": "Default models for Pi." } }, "required": [ "claude_code", "opencode", - "codex" + "codex", + "pi" ], "title": "RouteHarnessDefaultsV1", "type": "object" @@ -31607,6 +31679,30 @@ "title": "RouteHarnessModelV1", "type": "object" }, + "RouteTeamSpendLimitSettingV1": { + "properties": { + "per_member_monthly_limit_usd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Returned as an exact decimal string. Null when the team has no per-member limit.", + "examples": [ + "200" + ], + "title": "Per Member Monthly Limit Usd" + } + }, + "required": [ + "per_member_monthly_limit_usd" + ], + "title": "RouteTeamSpendLimitSettingV1", + "type": "object" + }, "RouteTeamSettingsV1": { "properties": { "team_id": { @@ -31620,11 +31716,16 @@ "harness_defaults": { "$ref": "#/components/schemas/RouteHarnessDefaultsV1", "description": "Route for each model role of each coding harness. A role with no route set by a team admin uses the default chosen from the team's Model API routes: the recommended model for `primary` and the lowest-priced model for `background`. These defaults never use external-provider routes." + }, + "spend_limit": { + "$ref": "#/components/schemas/RouteTeamSpendLimitSettingV1", + "description": "Spend limits for Baseten Code for members whose active Code key belongs to this team." } }, "required": [ "team_id", - "harness_defaults" + "harness_defaults", + "spend_limit" ], "title": "RouteTeamSettingsV1", "type": "object" @@ -31741,11 +31842,49 @@ "default": null, "description": "Route IDs for the model roles to change; roles left out are unchanged. Every route must belong to the team. Pass null to clear every role, or omit to leave the harness unchanged.", "x-null-distinct": true + }, + "pi": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdatePrimaryHarnessModelsV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Route IDs for the model roles to change; roles left out are unchanged. Every route must belong to the team. Pass null to clear every role, or omit to leave the harness unchanged.", + "x-null-distinct": true } }, "title": "UpdateRouteHarnessDefaultsV1", "type": "object" }, + "UpdateRouteTeamSpendLimitSettingV1": { + "additionalProperties": false, + "minProperties": 1, + "properties": { + "per_member_monthly_limit_usd": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Spend limit in USD for each UTC calendar month that applies to each member whose active Code key belongs to this team, unless the member has a limit of their own. Send null to remove it; omit to leave it unchanged.", + "examples": [ + "200" + ], + "title": "Per Member Monthly Limit Usd", + "x-null-distinct": true + } + }, + "title": "UpdateRouteTeamSpendLimitSettingV1", + "type": "object" + }, "UpdateRouteTeamSettingsRequestV1": { "additionalProperties": false, "minProperties": 1, @@ -31762,6 +31901,19 @@ "default": null, "description": "Harnesses to change; harnesses left out are unchanged. Pass null to clear every harness, so each role uses the team's default.", "x-null-distinct": true + }, + "spend_limit": { + "anyOf": [ + { + "$ref": "#/components/schemas/UpdateRouteTeamSpendLimitSettingV1" + }, + { + "type": "null" + } + ], + "default": null, + "description": "Spend limit fields to change. Pass null to remove the team's per-member limit; omit to leave it unchanged.", + "x-null-distinct": true } }, "title": "UpdateRouteTeamSettingsRequestV1",