diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclBatchUpdate.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclBatchUpdate.g.cs
index af80179..2fc5c52 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclBatchUpdate.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclBatchUpdate.g.cs
@@ -60,6 +60,29 @@ partial void ProcessAclBatchUpdateResponseContent(
///
public async global::System.Threading.Tasks.Task AclBatchUpdateAsync(
+ global::Braintrust.AclBatchUpdateRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await AclBatchUpdateAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Batch update acls
+ /// Batch update acls. This operation is idempotent, so adding acls which already exist will have no effect, and removing acls which do not exist will have no effect.
+ ///
+ ///
+ /// 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> AclBatchUpdateAsResponseAsync(
+
global::Braintrust.AclBatchUpdateRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessAclBatchUpdateResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl/batch_update",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessAclBatchUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessAclBatchUpdateResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessAclBatchUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessAclBatchUpdateResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessAclBatchUpdateResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessAclBatchUpdateResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessAclBatchUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessAclBatchUpdateResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessAclBatchUpdateResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AclBatchUpdateResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AclBatchUpdateResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessAclBatchUpdateResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AclBatchUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AclBatchUpdateResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclListOrg.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclListOrg.g.cs
index 2a9c8fa..d2eb400 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclListOrg.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.AclListOrg.g.cs
@@ -133,6 +133,87 @@ partial void ProcessAclListOrgResponseContent(
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await AclListOrgAsResponseAsync(
+ limit: limit,
+ ids: ids,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ objectType: objectType,
+ objectId: objectId,
+ userId: userId,
+ groupId: groupId,
+ permission: permission,
+ restrictObjectType: restrictObjectType,
+ roleId: roleId,
+ orgName: orgName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List org acls
+ /// List all acls in the org. This query requires the caller to have `read_acls` permission at the organization level
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// The object type that the ACL applies to
+ ///
+ ///
+ /// The id of the object the ACL applies to
+ ///
+ ///
+ /// Id of the user the ACL applies to. Exactly one of `user_id` and `group_id` will be provided
+ ///
+ ///
+ /// Id of the group the ACL applies to. Exactly one of `user_id` and `group_id` will be provided
+ ///
+ ///
+ /// Each permission permits a certain type of operation on an object in the system
+ /// Permissions can be assigned to to objects on an individual basis, or grouped into roles
+ ///
+ ///
+ /// The object type that the ACL applies to
+ ///
+ ///
+ /// Id of the role the ACL grants. Exactly one of `permission` and `role_id` will be provided
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ /// 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>> AclListOrgAsResponseAsync(
+ int? limit = default,
+ global::Braintrust.Ids? ids = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.AclListOrgObjectType? objectType = default,
+ global::System.Guid? objectId = default,
+ global::System.Guid? userId = default,
+ global::System.Guid? groupId = default,
+ global::Braintrust.AclListPermission? permission = default,
+ global::Braintrust.AclListRestrictObjectType? restrictObjectType = default,
+ global::System.Guid? roleId = default,
+ string? orgName = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -173,9 +254,10 @@ partial void ProcessAclListOrgResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl/list_org",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("ids", ids?.ToString())
@@ -188,7 +270,7 @@ partial void ProcessAclListOrgResponseContent(
.AddOptionalParameter("permission", permission?.ToValueString())
.AddOptionalParameter("restrict_object_type", restrictObjectType?.ToValueString())
.AddOptionalParameter("role_id", roleId?.ToString())
- .AddOptionalParameter("org_name", orgName)
+ .AddOptionalParameter("org_name", orgName)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -271,6 +353,8 @@ partial void ProcessAclListOrgResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -281,6 +365,11 @@ partial void ProcessAclListOrgResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -298,6 +387,8 @@ partial void ProcessAclListOrgResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -307,8 +398,7 @@ partial void ProcessAclListOrgResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -317,6 +407,11 @@ partial void ProcessAclListOrgResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -333,14 +428,15 @@ partial void ProcessAclListOrgResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -380,6 +476,8 @@ partial void ProcessAclListOrgResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -400,6 +498,8 @@ partial void ProcessAclListOrgResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -614,9 +714,13 @@ partial void ProcessAclListOrgResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
+ var __value = (global::System.Collections.Generic.IList?)global::System.Text.Json.JsonSerializer.Deserialize(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -644,9 +748,13 @@ partial void ProcessAclListOrgResponseContent(
#endif
).ConfigureAwait(false);
- return
- (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = (global::System.Collections.Generic.IList?)await global::System.Text.Json.JsonSerializer.DeserializeAsync(__content, typeof(global::System.Collections.Generic.IList), JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse>(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAcl.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAcl.g.cs
index 95170ce..3018886 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAcl.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAcl.g.cs
@@ -60,6 +60,29 @@ partial void ProcessDeleteAclResponseContent(
///
public async global::System.Threading.Tasks.Task DeleteAclAsync(
+ global::Braintrust.AclItem request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAclAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete single acl
+ /// Delete a single acl
+ ///
+ ///
+ /// 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> DeleteAclAsResponseAsync(
+
global::Braintrust.AclItem request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessDeleteAclResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessDeleteAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessDeleteAclResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessDeleteAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessDeleteAclResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessDeleteAclResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessDeleteAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessDeleteAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessDeleteAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessDeleteAclResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessDeleteAclResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAclId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAclId.g.cs
index f4bdc7a..7d0f960 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAclId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.DeleteAclId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteAclIdResponseContent(
global::System.Guid aclId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAclIdAsResponseAsync(
+ aclId: aclId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete acl
+ /// Delete an acl object by its id
+ ///
+ ///
+ /// Acl id
+ ///
+ /// 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> DeleteAclIdAsResponseAsync(
+ global::System.Guid aclId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteAclIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/acl/{aclId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteAclIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteAclIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteAclIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteAclIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteAclIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteAclIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteAclIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAcl.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAcl.g.cs
index 2aed362..ca66939 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAcl.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAcl.g.cs
@@ -127,6 +127,82 @@ partial void ProcessGetAclResponseContent(
global::System.Guid? roleId = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAclAsResponseAsync(
+ objectType: objectType,
+ objectId: objectId,
+ limit: limit,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ ids: ids,
+ userId: userId,
+ groupId: groupId,
+ permission: permission,
+ restrictObjectType: restrictObjectType,
+ roleId: roleId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List acls
+ /// List out all acls. The acls are sorted by creation date, with the most recently-created acls coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// The object type that the ACL applies to
+ ///
+ ///
+ /// The id of the object the ACL applies to
+ ///
+ ///
+ /// Id of the user the ACL applies to. Exactly one of `user_id` and `group_id` will be provided
+ ///
+ ///
+ /// Id of the group the ACL applies to. Exactly one of `user_id` and `group_id` will be provided
+ ///
+ ///
+ /// Each permission permits a certain type of operation on an object in the system
+ /// Permissions can be assigned to to objects on an individual basis, or grouped into roles
+ ///
+ ///
+ /// The object type that the ACL applies to
+ ///
+ ///
+ /// Id of the role the ACL grants. Exactly one of `permission` and `role_id` will be provided
+ ///
+ /// 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> GetAclAsResponseAsync(
+ global::Braintrust.AclObjectType objectType,
+ global::System.Guid objectId,
+ int? limit = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.Ids? ids = default,
+ global::System.Guid? userId = default,
+ global::System.Guid? groupId = default,
+ global::Braintrust.AclListPermission? permission = default,
+ global::Braintrust.AclListRestrictObjectType? restrictObjectType = default,
+ global::System.Guid? roleId = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -166,9 +242,10 @@ partial void ProcessGetAclResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("starting_after", startingAfter?.ToString())
@@ -180,7 +257,7 @@ partial void ProcessGetAclResponseContent(
.AddOptionalParameter("group_id", groupId?.ToString())
.AddOptionalParameter("permission", permission?.ToValueString())
.AddOptionalParameter("restrict_object_type", restrictObjectType?.ToValueString())
- .AddOptionalParameter("role_id", roleId?.ToString())
+ .AddOptionalParameter("role_id", roleId?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -262,6 +339,8 @@ partial void ProcessGetAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -272,6 +351,11 @@ partial void ProcessGetAclResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -289,6 +373,8 @@ partial void ProcessGetAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -298,8 +384,7 @@ partial void ProcessGetAclResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -308,6 +393,11 @@ partial void ProcessGetAclResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -324,14 +414,15 @@ partial void ProcessGetAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -371,6 +462,8 @@ partial void ProcessGetAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -391,6 +484,8 @@ partial void ProcessGetAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -605,9 +700,13 @@ partial void ProcessGetAclResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetAclResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetAclResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -635,9 +734,13 @@ partial void ProcessGetAclResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetAclResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetAclResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAclId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAclId.g.cs
index 9a30bf7..3167969 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAclId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.GetAclId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetAclIdResponseContent(
global::System.Guid aclId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAclIdAsResponseAsync(
+ aclId: aclId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get acl
+ /// Get an acl object by its id
+ ///
+ ///
+ /// Acl id
+ ///
+ /// 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> GetAclIdAsResponseAsync(
+ global::System.Guid aclId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetAclIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/acl/{aclId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetAclIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetAclIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetAclIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetAclIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetAclIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetAclIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetAclIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetAclIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.PostAcl.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.PostAcl.g.cs
index 4ef330d..8ccebe9 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.PostAcl.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.PostAcl.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostAclResponseContent(
///
public async global::System.Threading.Tasks.Task PostAclAsync(
+ global::Braintrust.AclItem request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostAclAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create acl
+ /// Create a new acl. If there is an existing acl with the same contents as the one specified in the request, will return the existing acl unmodified
+ ///
+ ///
+ /// 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> PostAclAsResponseAsync(
+
global::Braintrust.AclItem request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostAclResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostAclResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostAclResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostAclResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostAclResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostAclResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostAclResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Acl.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostAclResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Acl.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AclsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.AclsClient.g.cs
index a4769a9..c6b82c0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AclsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AclsClient.g.cs
@@ -72,10 +72,10 @@ public AclsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AclsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecret.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecret.g.cs
index 867068e..bce618b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecret.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecret.g.cs
@@ -60,6 +60,29 @@ partial void ProcessDeleteAiSecretResponseContent(
///
public async global::System.Threading.Tasks.Task DeleteAiSecretAsync(
+ global::Braintrust.DeleteAISecret request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAiSecretAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete single ai_secret
+ /// Delete a single ai_secret
+ ///
+ ///
+ /// 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> DeleteAiSecretAsResponseAsync(
+
global::Braintrust.DeleteAISecret request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessDeleteAiSecretResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/ai_secret",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessDeleteAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessDeleteAiSecretResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessDeleteAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessDeleteAiSecretResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessDeleteAiSecretResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessDeleteAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessDeleteAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessDeleteAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessDeleteAiSecretResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessDeleteAiSecretResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecretId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecretId.g.cs
index 767521c..386f611 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecretId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.DeleteAiSecretId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteAiSecretIdResponseContent(
global::System.Guid aiSecretId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteAiSecretIdAsResponseAsync(
+ aiSecretId: aiSecretId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete ai_secret
+ /// Delete an ai_secret object by its id
+ ///
+ ///
+ /// AiSecret id
+ ///
+ /// 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> DeleteAiSecretIdAsResponseAsync(
+ global::System.Guid aiSecretId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteAiSecretIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/ai_secret/{aiSecretId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteAiSecretIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteAiSecretIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteAiSecretIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteAiSecretIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteAiSecretIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecret.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecret.g.cs
index fb7d0d8..da62fff 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecret.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecret.g.cs
@@ -100,6 +100,59 @@ partial void ProcessGetAiSecretResponseContent(
global::Braintrust.AISecretType? aiSecretType = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAiSecretAsResponseAsync(
+ limit: limit,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ ids: ids,
+ aiSecretName: aiSecretName,
+ orgName: orgName,
+ aiSecretType: aiSecretType,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List ai_secrets
+ /// List out all ai_secrets. The ai_secrets are sorted by creation date, with the most recently-created ai_secrets coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Name of the ai_secret to search for
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ ///
+ /// 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> GetAiSecretAsResponseAsync(
+ int? limit = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.Ids? ids = default,
+ string? aiSecretName = default,
+ string? orgName = default,
+ global::Braintrust.AISecretType? aiSecretType = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -135,9 +188,10 @@ partial void ProcessGetAiSecretResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/ai_secret",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("starting_after", startingAfter?.ToString())
@@ -145,7 +199,7 @@ partial void ProcessGetAiSecretResponseContent(
.AddOptionalParameter("ids", ids?.ToString())
.AddOptionalParameter("ai_secret_name", aiSecretName)
.AddOptionalParameter("org_name", orgName)
- .AddOptionalParameter("ai_secret_type", aiSecretType?.ToString())
+ .AddOptionalParameter("ai_secret_type", aiSecretType?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -223,6 +277,8 @@ partial void ProcessGetAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -233,6 +289,11 @@ partial void ProcessGetAiSecretResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -250,6 +311,8 @@ partial void ProcessGetAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -259,8 +322,7 @@ partial void ProcessGetAiSecretResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -269,6 +331,11 @@ partial void ProcessGetAiSecretResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -285,14 +352,15 @@ partial void ProcessGetAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -332,6 +400,8 @@ partial void ProcessGetAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -352,6 +422,8 @@ partial void ProcessGetAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -566,9 +638,13 @@ partial void ProcessGetAiSecretResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetAiSecretResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetAiSecretResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -596,9 +672,13 @@ partial void ProcessGetAiSecretResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetAiSecretResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetAiSecretResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecretId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecretId.g.cs
index 9f1556a..8a5f239 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecretId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.GetAiSecretId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetAiSecretIdResponseContent(
global::System.Guid aiSecretId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAiSecretIdAsResponseAsync(
+ aiSecretId: aiSecretId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get ai_secret
+ /// Get an ai_secret object by its id
+ ///
+ ///
+ /// AiSecret id
+ ///
+ /// 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> GetAiSecretIdAsResponseAsync(
+ global::System.Guid aiSecretId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetAiSecretIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/ai_secret/{aiSecretId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetAiSecretIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetAiSecretIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetAiSecretIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetAiSecretIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetAiSecretIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PatchAiSecretId.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PatchAiSecretId.g.cs
index 92068c2..8651842 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PatchAiSecretId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PatchAiSecretId.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPatchAiSecretIdResponseContent(
public async global::System.Threading.Tasks.Task PatchAiSecretIdAsync(
global::System.Guid aiSecretId,
+ global::Braintrust.PatchAISecret request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchAiSecretIdAsResponseAsync(
+ aiSecretId: aiSecretId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Partially update ai_secret
+ /// Partially update an ai_secret object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
+ ///
+ ///
+ /// AiSecret id
+ ///
+ ///
+ /// 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> PatchAiSecretIdAsResponseAsync(
+ global::System.Guid aiSecretId,
+
global::Braintrust.PatchAISecret request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPatchAiSecretIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/ai_secret/{aiSecretId}",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPatchAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPatchAiSecretIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPatchAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPatchAiSecretIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPatchAiSecretIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPatchAiSecretIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPatchAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPatchAiSecretIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPatchAiSecretIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPatchAiSecretIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PostAiSecret.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PostAiSecret.g.cs
index 244b68d..eac42f3 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PostAiSecret.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PostAiSecret.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostAiSecretResponseContent(
///
public async global::System.Threading.Tasks.Task PostAiSecretAsync(
+ global::Braintrust.CreateAISecret request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostAiSecretAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create ai_secret
+ /// Create a new ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will return the existing ai_secret unmodified
+ ///
+ ///
+ /// 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> PostAiSecretAsResponseAsync(
+
global::Braintrust.CreateAISecret request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostAiSecretResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/ai_secret",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostAiSecretResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostAiSecretResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostAiSecretResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostAiSecretResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostAiSecretResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PutAiSecret.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PutAiSecret.g.cs
index 25537b1..e06acba 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PutAiSecret.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.PutAiSecret.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPutAiSecretResponseContent(
///
public async global::System.Threading.Tasks.Task PutAiSecretAsync(
+ global::Braintrust.CreateAISecret request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PutAiSecretAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create or replace ai_secret
+ /// Create or replace ai_secret. If there is an existing ai_secret with the same name as the one specified in the request, will replace the existing ai_secret with the provided fields
+ ///
+ ///
+ /// 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> PutAiSecretAsResponseAsync(
+
global::Braintrust.CreateAISecret request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPutAiSecretResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/ai_secret",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPutAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPutAiSecretResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPutAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPutAiSecretResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPutAiSecretResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPutAiSecretResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPutAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPutAiSecretResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPutAiSecretResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.AISecret.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPutAiSecretResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.AISecret.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.g.cs
index 5e05f01..f11d641 100644
--- a/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.AiSecretsClient.g.cs
@@ -72,10 +72,10 @@ public AiSecretsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public AiSecretsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.DeleteApiKeyId.g.cs b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.DeleteApiKeyId.g.cs
index 96f66cc..2afbd2d 100644
--- a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.DeleteApiKeyId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.DeleteApiKeyId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteApiKeyIdResponseContent(
global::System.Guid apiKeyId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteApiKeyIdAsResponseAsync(
+ apiKeyId: apiKeyId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete api_key
+ /// Delete an api_key object by its id
+ ///
+ ///
+ /// ApiKey id
+ ///
+ /// 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> DeleteApiKeyIdAsResponseAsync(
+ global::System.Guid apiKeyId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteApiKeyIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/api_key/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteApiKeyIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteApiKeyIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteApiKeyIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteApiKeyIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteApiKeyIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteApiKeyIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.ApiKey.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteApiKeyIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKey.g.cs b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKey.g.cs
index 23b29b9..6a3824b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKey.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKey.g.cs
@@ -96,6 +96,56 @@ partial void ProcessGetApiKeyResponseContent(
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetApiKeyAsResponseAsync(
+ limit: limit,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ ids: ids,
+ apiKeyName: apiKeyName,
+ orgName: orgName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List api_keys
+ /// List out all api_keys. The api_keys are sorted by creation date, with the most recently-created api_keys coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Name of the api_key to search for
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ /// 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> GetApiKeyAsResponseAsync(
+ int? limit = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.Ids? ids = default,
+ string? apiKeyName = default,
+ string? orgName = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -130,16 +180,17 @@ partial void ProcessGetApiKeyResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/api_key",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("starting_after", startingAfter?.ToString())
.AddOptionalParameter("ending_before", endingBefore?.ToString())
.AddOptionalParameter("ids", ids?.ToString())
.AddOptionalParameter("api_key_name", apiKeyName)
- .AddOptionalParameter("org_name", orgName)
+ .AddOptionalParameter("org_name", orgName)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -216,6 +267,8 @@ partial void ProcessGetApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +279,11 @@ partial void ProcessGetApiKeyResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +301,8 @@ partial void ProcessGetApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +312,7 @@ partial void ProcessGetApiKeyResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +321,11 @@ partial void ProcessGetApiKeyResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +342,15 @@ partial void ProcessGetApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +390,8 @@ partial void ProcessGetApiKeyResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +412,8 @@ partial void ProcessGetApiKeyResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -559,9 +628,13 @@ partial void ProcessGetApiKeyResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetApiKeyResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetApiKeyResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -589,9 +662,13 @@ partial void ProcessGetApiKeyResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetApiKeyResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetApiKeyResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKeyId.g.cs b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKeyId.g.cs
index e3abe7c..4626839 100644
--- a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKeyId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.GetApiKeyId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetApiKeyIdResponseContent(
global::System.Guid apiKeyId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetApiKeyIdAsResponseAsync(
+ apiKeyId: apiKeyId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get api_key
+ /// Get an api_key object by its id
+ ///
+ ///
+ /// ApiKey id
+ ///
+ /// 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> GetApiKeyIdAsResponseAsync(
+ global::System.Guid apiKeyId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetApiKeyIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/api_key/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetApiKeyIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetApiKeyIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetApiKeyIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetApiKeyIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetApiKeyIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetApiKeyIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetApiKeyIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.ApiKey.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.ApiKey.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetApiKeyIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.ApiKey.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.PostApiKey.g.cs b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.PostApiKey.g.cs
index 6acf75c..d4d114e 100644
--- a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.PostApiKey.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.PostApiKey.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostApiKeyResponseContent(
///
public async global::System.Threading.Tasks.Task PostApiKeyAsync(
+ global::Braintrust.PostApiKeyRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostApiKeyAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create api_key
+ /// Create a new api_key. It is possible to have multiple API keys with the same name. There is no de-duplication
+ ///
+ ///
+ /// 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> PostApiKeyAsResponseAsync(
+
global::Braintrust.PostApiKeyRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostApiKeyResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/api_key",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostApiKeyResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostApiKeyResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostApiKeyResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostApiKeyResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostApiKeyResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostApiKeyResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostApiKeyResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.CreateApiKeyOutput.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.CreateApiKeyOutput.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostApiKeyResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.CreateApiKeyOutput.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.CreateApiKeyOutput.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.g.cs
index 107f393..7a7a367 100644
--- a/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.ApiKeysClient.g.cs
@@ -72,10 +72,10 @@ public ApiKeysClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public ApiKeysClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.AutoSDKHttpResponse.g.cs b/src/libs/Braintrust/Generated/Braintrust.AutoSDKHttpResponse.g.cs
new file mode 100644
index 0000000..1f41c6d
--- /dev/null
+++ b/src/libs/Braintrust/Generated/Braintrust.AutoSDKHttpResponse.g.cs
@@ -0,0 +1,121 @@
+
+#nullable enable
+
+namespace Braintrust
+{
+ ///
+ /// Represents a successful HTTP response with status code and headers.
+ ///
+ public partial class AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri)
+ {
+ StatusCode = statusCode;
+ Headers = headers ?? throw new global::System.ArgumentNullException(nameof(headers));
+ RequestUri = requestUri;
+ }
+
+ ///
+ /// Gets the HTTP status code.
+ ///
+ public global::System.Net.HttpStatusCode StatusCode { get; }
+ ///
+ /// Gets the response headers.
+ ///
+ public global::System.Collections.Generic.Dictionary> Headers { get; }
+ ///
+ /// Gets the final request URI associated with the response.
+ ///
+ public global::System.Uri? RequestUri { get; }
+
+ internal static global::System.Collections.Generic.Dictionary> CreateHeaders(
+ global::System.Net.Http.HttpResponseMessage response)
+ {
+ response = response ?? throw new global::System.ArgumentNullException(nameof(response));
+
+ var headers = global::System.Linq.Enumerable.ToDictionary(
+ response.Headers,
+ static header => header.Key,
+ static header => (global::System.Collections.Generic.IEnumerable)global::System.Linq.Enumerable.ToArray(header.Value),
+ global::System.StringComparer.OrdinalIgnoreCase);
+
+ if (response.Content?.Headers == null)
+ {
+ return headers;
+ }
+
+ foreach (var header in response.Content.Headers)
+ {
+ if (headers.TryGetValue(header.Key, out var existingValues))
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(
+ global::System.Linq.Enumerable.Concat(existingValues, header.Value));
+ }
+ else
+ {
+ headers[header.Key] = global::System.Linq.Enumerable.ToArray(header.Value);
+ }
+ }
+
+ return headers;
+ }
+ }
+
+ ///
+ /// Represents a successful HTTP response with status code, headers, and body.
+ ///
+ public partial class AutoSDKHttpResponse : AutoSDKHttpResponse
+ {
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ T body)
+ : this(
+ statusCode: statusCode,
+ headers: headers,
+ requestUri: null,
+ body: body)
+ {
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ public AutoSDKHttpResponse(
+ global::System.Net.HttpStatusCode statusCode,
+ global::System.Collections.Generic.Dictionary> headers,
+ global::System.Uri? requestUri,
+ T body)
+ : base(statusCode, headers, requestUri)
+ {
+ Body = body;
+ }
+
+ ///
+ /// Gets the response body.
+ ///
+ public T Body { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs
index fafad29..24234f0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.BraintrustClient.g.cs
@@ -45,7 +45,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public AclsClient Acls => new AclsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public AclsClient Acls => new AclsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -54,7 +54,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public AiSecretsClient AiSecrets => new AiSecretsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public AiSecretsClient AiSecrets => new AiSecretsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -63,7 +63,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ApiKeysClient ApiKeys => new ApiKeysClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ApiKeysClient ApiKeys => new ApiKeysClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -72,7 +72,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public CorsClient Cors => new CorsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CorsClient Cors => new CorsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -81,7 +81,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public CrossObjectClient CrossObject => new CrossObjectClient(HttpClient, authorizations: Authorizations, options: Options)
+ public CrossObjectClient CrossObject => new CrossObjectClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -90,7 +90,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public DatasetSnapshotsClient DatasetSnapshots => new DatasetSnapshotsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DatasetSnapshotsClient DatasetSnapshots => new DatasetSnapshotsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -99,7 +99,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public DatasetsClient Datasets => new DatasetsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public DatasetsClient Datasets => new DatasetsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -108,7 +108,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public EnvVarsClient EnvVars => new EnvVarsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public EnvVarsClient EnvVars => new EnvVarsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -117,7 +117,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public EnvironmentsClient Environments => new EnvironmentsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public EnvironmentsClient Environments => new EnvironmentsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -126,7 +126,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public EvalsClient Evals => new EvalsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public EvalsClient Evals => new EvalsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -135,7 +135,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ExperimentsClient Experiments => new ExperimentsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ExperimentsClient Experiments => new ExperimentsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -144,7 +144,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public FunctionsClient Functions => new FunctionsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public FunctionsClient Functions => new FunctionsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -153,7 +153,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public GroupsClient Groups => new GroupsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public GroupsClient Groups => new GroupsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -162,7 +162,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public LogsClient Logs => new LogsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public LogsClient Logs => new LogsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -171,7 +171,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public McpServersClient McpServers => new McpServersClient(HttpClient, authorizations: Authorizations, options: Options)
+ public McpServersClient McpServers => new McpServersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -180,7 +180,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public OrganizationsClient Organizations => new OrganizationsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public OrganizationsClient Organizations => new OrganizationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -189,7 +189,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public OtherClient Other => new OtherClient(HttpClient, authorizations: Authorizations, options: Options)
+ public OtherClient Other => new OtherClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -198,7 +198,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ProjectAutomationsClient ProjectAutomations => new ProjectAutomationsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ProjectAutomationsClient ProjectAutomations => new ProjectAutomationsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -207,7 +207,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ProjectScoresClient ProjectScores => new ProjectScoresClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ProjectScoresClient ProjectScores => new ProjectScoresClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -216,7 +216,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ProjectTagsClient ProjectTags => new ProjectTagsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ProjectTagsClient ProjectTags => new ProjectTagsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -225,7 +225,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ProjectsClient Projects => new ProjectsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ProjectsClient Projects => new ProjectsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -234,7 +234,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public PromptsClient Prompts => new PromptsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public PromptsClient Prompts => new PromptsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -243,7 +243,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ProxyClient Proxy => new ProxyClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ProxyClient Proxy => new ProxyClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -252,7 +252,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public RolesClient Roles => new RolesClient(HttpClient, authorizations: Authorizations, options: Options)
+ public RolesClient Roles => new RolesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -261,7 +261,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ServiceTokensClient ServiceTokens => new ServiceTokensClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ServiceTokensClient ServiceTokens => new ServiceTokensClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -270,7 +270,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public SpanIframesClient SpanIframes => new SpanIframesClient(HttpClient, authorizations: Authorizations, options: Options)
+ public SpanIframesClient SpanIframes => new SpanIframesClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -279,7 +279,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public UsersClient Users => new UsersClient(HttpClient, authorizations: Authorizations, options: Options)
+ public UsersClient Users => new UsersClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -288,7 +288,7 @@ public sealed partial class BraintrustClient : global::Braintrust.IBraintrustCli
///
///
///
- public ViewsClient Views => new ViewsClient(HttpClient, authorizations: Authorizations, options: Options)
+ public ViewsClient Views => new ViewsClient(HttpClient, baseUri: null, authorizations: Authorizations, options: Options)
{
ReadResponseAsString = ReadResponseAsString,
JsonSerializerContext = JsonSerializerContext,
@@ -327,10 +327,10 @@ public BraintrustClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public BraintrustClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAcl.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAcl.g.cs
index 7b3e607..59aec48 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAcl.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAcl.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsAclResponse(
public async global::System.Threading.Tasks.Task OptionsAclAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAclAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/acl`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsAclAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsAclResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsAclResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsAclResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsAclResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsAclResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsAclResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsAclResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsAclResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsAclResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsAclResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsAclResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclBatchUpdate.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclBatchUpdate.g.cs
index 223abe5..ff0ed26 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclBatchUpdate.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclBatchUpdate.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsAclBatchUpdateResponse(
public async global::System.Threading.Tasks.Task OptionsAclBatchUpdateAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAclBatchUpdateAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/acl/acl/batch_update`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsAclBatchUpdateAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsAclBatchUpdateResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl/acl/batch_update",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsAclBatchUpdateResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsAclBatchUpdateResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsAclBatchUpdateResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsAclBatchUpdateResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsAclBatchUpdateResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsAclBatchUpdateResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsAclBatchUpdateResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsAclBatchUpdateResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsAclBatchUpdateResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsAclBatchUpdateResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclId.g.cs
index 27ce3cb..ec2614c 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsAclIdResponse(
global::System.Guid aclId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAclIdAsResponseAsync(
+ aclId: aclId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/acl/{acl_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Acl id
+ ///
+ /// 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 OptionsAclIdAsResponseAsync(
+ global::System.Guid aclId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsAclIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/acl/{aclId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsAclIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsAclIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsAclIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsAclIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsAclIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsAclIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsAclIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsAclIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsAclIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsAclIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclListOrg.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclListOrg.g.cs
index bd4866b..874e785 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclListOrg.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAclListOrg.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsAclListOrgResponse(
public async global::System.Threading.Tasks.Task OptionsAclListOrgAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAclListOrgAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/acl/list_org`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsAclListOrgAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsAclListOrgResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/acl/list_org",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsAclListOrgResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsAclListOrgResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsAclListOrgResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsAclListOrgResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsAclListOrgResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsAclListOrgResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsAclListOrgResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsAclListOrgResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsAclListOrgResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsAclListOrgResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecret.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecret.g.cs
index 0f566d8..4a6fcca 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecret.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecret.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsAiSecretResponse(
public async global::System.Threading.Tasks.Task OptionsAiSecretAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAiSecretAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/ai_secret`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsAiSecretAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsAiSecretResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/ai_secret",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsAiSecretResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsAiSecretResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsAiSecretResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsAiSecretResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsAiSecretResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsAiSecretResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsAiSecretResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsAiSecretResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsAiSecretResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsAiSecretResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecretId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecretId.g.cs
index 9ae9749..fd47b1a 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecretId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsAiSecretId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsAiSecretIdResponse(
global::System.Guid aiSecretId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsAiSecretIdAsResponseAsync(
+ aiSecretId: aiSecretId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/ai_secret/{ai_secret_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// AiSecret id
+ ///
+ /// 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 OptionsAiSecretIdAsResponseAsync(
+ global::System.Guid aiSecretId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsAiSecretIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/ai_secret/{aiSecretId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsAiSecretIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsAiSecretIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsAiSecretIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsAiSecretIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsAiSecretIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsAiSecretIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsAiSecretIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsAiSecretIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsAiSecretIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsAiSecretIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKey.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKey.g.cs
index 76da37b..3b6ff2c 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKey.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKey.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsApiKeyResponse(
public async global::System.Threading.Tasks.Task OptionsApiKeyAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsApiKeyAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/api_key`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsApiKeyAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsApiKeyResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/api_key",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsApiKeyResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsApiKeyResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsApiKeyResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsApiKeyResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsApiKeyResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsApiKeyResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsApiKeyResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsApiKeyResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsApiKeyResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsApiKeyResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKeyId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKeyId.g.cs
index e663949..0bce34b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKeyId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsApiKeyId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsApiKeyIdResponse(
global::System.Guid apiKeyId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsApiKeyIdAsResponseAsync(
+ apiKeyId: apiKeyId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/api_key/{api_key_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// ApiKey id
+ ///
+ /// 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 OptionsApiKeyIdAsResponseAsync(
+ global::System.Guid apiKeyId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsApiKeyIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/api_key/{apiKeyId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsApiKeyIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsApiKeyIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsApiKeyIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsApiKeyIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsApiKeyIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsApiKeyIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsApiKeyIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsApiKeyIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsApiKeyIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsApiKeyIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsCrossObjectInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsCrossObjectInsert.g.cs
index 740f272..aa03605 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsCrossObjectInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsCrossObjectInsert.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsCrossObjectInsertResponse(
public async global::System.Threading.Tasks.Task OptionsCrossObjectInsertAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsCrossObjectInsertAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/insert`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsCrossObjectInsertAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsCrossObjectInsertResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/insert",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsCrossObjectInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsCrossObjectInsertResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsCrossObjectInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsCrossObjectInsertResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsCrossObjectInsertResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsCrossObjectInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsCrossObjectInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsCrossObjectInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsCrossObjectInsertResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsCrossObjectInsertResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDataset.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDataset.g.cs
index 3ac5f51..8e01b09 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDataset.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDataset.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsDatasetResponse(
public async global::System.Threading.Tasks.Task OptionsDatasetAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsDatasetAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsDatasetResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsDatasetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsDatasetResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsDatasetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsDatasetResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsDatasetResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsDatasetResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsDatasetResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsDatasetResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsDatasetResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsDatasetResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetId.g.cs
index e2307b4..b2d2b45 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetIdResponse(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetIdAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset/{dataset_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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 OptionsDatasetIdAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFeedback.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFeedback.g.cs
index c3a0747..ebec529 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFeedback.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFeedback.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetIdFeedbackAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset/{dataset_id}/feedback`)
+ /// Enable CORS
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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 OptionsDatasetIdFeedbackAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/feedback",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetIdFeedbackResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFetch.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFetch.g.cs
index 8656d28..1d39d29 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFetch.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdFetch.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetIdFetchResponse(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetIdFetchAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset/{dataset_id}/fetch`)
+ /// Enable CORS
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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 OptionsDatasetIdFetchAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetIdFetchResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/fetch",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetIdFetchResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetIdFetchResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetIdFetchResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetIdFetchResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetIdFetchResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdInsert.g.cs
index 2432066..b98c0f6 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdInsert.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetIdInsertResponse(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetIdInsertAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset/{dataset_id}/insert`)
+ /// Enable CORS
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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 OptionsDatasetIdInsertAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetIdInsertResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/insert",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetIdInsertResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetIdInsertResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetIdInsertResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetIdInsertResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetIdInsertResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdSummarize.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdSummarize.g.cs
index 61ce763..7cc7fe0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdSummarize.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetIdSummarize.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetIdSummarizeAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset/{dataset_id}/summarize`)
+ /// Enable CORS
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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 OptionsDatasetIdSummarizeAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/summarize",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetIdSummarizeResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshot.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshot.g.cs
index 91b8b60..9f16fee 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshot.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshot.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsDatasetSnapshotResponse(
public async global::System.Threading.Tasks.Task OptionsDatasetSnapshotAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetSnapshotAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset_snapshot`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsDatasetSnapshotAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsDatasetSnapshotResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset_snapshot",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsDatasetSnapshotResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsDatasetSnapshotResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsDatasetSnapshotResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsDatasetSnapshotResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsDatasetSnapshotResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsDatasetSnapshotResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsDatasetSnapshotResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsDatasetSnapshotResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsDatasetSnapshotResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsDatasetSnapshotResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshotId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshotId.g.cs
index 9496cbb..57a26bb 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshotId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsDatasetSnapshotId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
global::System.Guid datasetSnapshotId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsDatasetSnapshotIdAsResponseAsync(
+ datasetSnapshotId: datasetSnapshotId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/dataset_snapshot/{dataset_snapshot_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// DatasetSnapshot id
+ ///
+ /// 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 OptionsDatasetSnapshotIdAsResponseAsync(
+ global::System.Guid datasetSnapshotId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset_snapshot/{datasetSnapshotId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsDatasetSnapshotIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVar.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVar.g.cs
index 880a6f6..9b31c6f 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVar.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVar.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsEnvVarResponse(
public async global::System.Threading.Tasks.Task OptionsEnvVarAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsEnvVarAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/env_var`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsEnvVarAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsEnvVarResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/env_var",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsEnvVarResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsEnvVarResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsEnvVarResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsEnvVarResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsEnvVarResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsEnvVarResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsEnvVarResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsEnvVarResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsEnvVarResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsEnvVarResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVarId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVarId.g.cs
index 485ee12..89fed14 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVarId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsEnvVarId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsEnvVarIdResponse(
global::System.Guid envVarId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsEnvVarIdAsResponseAsync(
+ envVarId: envVarId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/env_var/{env_var_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// EnvVar id
+ ///
+ /// 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 OptionsEnvVarIdAsResponseAsync(
+ global::System.Guid envVarId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsEnvVarIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/env_var/{envVarId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsEnvVarIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsEnvVarIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsEnvVarIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsEnvVarIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsEnvVarIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsEnvVarIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsEnvVarIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsEnvVarIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsEnvVarIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsEnvVarIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperiment.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperiment.g.cs
index bd819cf..e2081e2 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperiment.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperiment.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsExperimentResponse(
public async global::System.Threading.Tasks.Task OptionsExperimentAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsExperimentAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsExperimentResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/experiment",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsExperimentResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsExperimentResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsExperimentResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsExperimentResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsExperimentResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsExperimentResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsExperimentResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsExperimentResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsExperimentResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsExperimentResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentId.g.cs
index 876e546..0d54b06 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsExperimentIdResponse(
global::System.Guid experimentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentIdAsResponseAsync(
+ experimentId: experimentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment/{experiment_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Experiment id
+ ///
+ /// 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 OptionsExperimentIdAsResponseAsync(
+ global::System.Guid experimentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsExperimentIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/experiment/{experimentId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsExperimentIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsExperimentIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsExperimentIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsExperimentIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsExperimentIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsExperimentIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsExperimentIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsExperimentIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsExperimentIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsExperimentIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFeedback.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFeedback.g.cs
index 9528764..e7c9952 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFeedback.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFeedback.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
global::System.Guid experimentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentIdFeedbackAsResponseAsync(
+ experimentId: experimentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment/{experiment_id}/feedback`)
+ /// Enable CORS
+ ///
+ ///
+ /// Experiment id
+ ///
+ /// 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 OptionsExperimentIdFeedbackAsResponseAsync(
+ global::System.Guid experimentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/experiment/{experimentId}/feedback",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsExperimentIdFeedbackResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFetch.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFetch.g.cs
index 4fa6523..a293a45 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFetch.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdFetch.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsExperimentIdFetchResponse(
global::System.Guid experimentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentIdFetchAsResponseAsync(
+ experimentId: experimentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment/{experiment_id}/fetch`)
+ /// Enable CORS
+ ///
+ ///
+ /// Experiment id
+ ///
+ /// 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 OptionsExperimentIdFetchAsResponseAsync(
+ global::System.Guid experimentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsExperimentIdFetchResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/experiment/{experimentId}/fetch",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsExperimentIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsExperimentIdFetchResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsExperimentIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsExperimentIdFetchResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsExperimentIdFetchResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsExperimentIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsExperimentIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsExperimentIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsExperimentIdFetchResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsExperimentIdFetchResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdInsert.g.cs
index 99de2f5..27c4f93 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdInsert.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsExperimentIdInsertResponse(
global::System.Guid experimentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentIdInsertAsResponseAsync(
+ experimentId: experimentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment/{experiment_id}/insert`)
+ /// Enable CORS
+ ///
+ ///
+ /// Experiment id
+ ///
+ /// 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 OptionsExperimentIdInsertAsResponseAsync(
+ global::System.Guid experimentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsExperimentIdInsertResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/experiment/{experimentId}/insert",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsExperimentIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsExperimentIdInsertResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsExperimentIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsExperimentIdInsertResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsExperimentIdInsertResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsExperimentIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsExperimentIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsExperimentIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsExperimentIdInsertResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsExperimentIdInsertResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdSummarize.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdSummarize.g.cs
index 0027cc2..70e8279 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdSummarize.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsExperimentIdSummarize.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
global::System.Guid experimentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsExperimentIdSummarizeAsResponseAsync(
+ experimentId: experimentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/experiment/{experiment_id}/summarize`)
+ /// Enable CORS
+ ///
+ ///
+ /// Experiment id
+ ///
+ /// 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 OptionsExperimentIdSummarizeAsResponseAsync(
+ global::System.Guid experimentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/experiment/{experimentId}/summarize",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsExperimentIdSummarizeResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunction.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunction.g.cs
index 38927e2..2ef1ade 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunction.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunction.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsFunctionResponse(
public async global::System.Threading.Tasks.Task OptionsFunctionAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsFunctionAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/function`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsFunctionAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsFunctionResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/function",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsFunctionResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsFunctionResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsFunctionResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsFunctionResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsFunctionResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsFunctionResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsFunctionResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsFunctionResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsFunctionResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsFunctionResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionId.g.cs
index db9d333..7470e35 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsFunctionIdResponse(
global::System.Guid functionId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsFunctionIdAsResponseAsync(
+ functionId: functionId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/function/{function_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Function id
+ ///
+ /// 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 OptionsFunctionIdAsResponseAsync(
+ global::System.Guid functionId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsFunctionIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/function/{functionId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsFunctionIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsFunctionIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsFunctionIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsFunctionIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsFunctionIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsFunctionIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsFunctionIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsFunctionIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsFunctionIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsFunctionIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionIdInvoke.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionIdInvoke.g.cs
index 861f2f5..975767d 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionIdInvoke.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsFunctionIdInvoke.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
global::System.Guid functionId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsFunctionIdInvokeAsResponseAsync(
+ functionId: functionId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/function/{function_id}/invoke`)
+ /// Enable CORS
+ ///
+ ///
+ /// Function id
+ ///
+ /// 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 OptionsFunctionIdInvokeAsResponseAsync(
+ global::System.Guid functionId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/function/{functionId}/invoke",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsFunctionIdInvokeResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroup.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroup.g.cs
index 9421d8d..1e3d14b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroup.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroup.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsGroupResponse(
public async global::System.Threading.Tasks.Task OptionsGroupAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsGroupAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/group`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsGroupAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsGroupResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/group",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsGroupResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsGroupResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsGroupResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsGroupResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsGroupResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsGroupResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsGroupResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsGroupResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsGroupResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsGroupResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroupId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroupId.g.cs
index c59dfb3..25e5430 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroupId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsGroupId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsGroupIdResponse(
global::System.Guid groupId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsGroupIdAsResponseAsync(
+ groupId: groupId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/group/{group_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Group id
+ ///
+ /// 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 OptionsGroupIdAsResponseAsync(
+ global::System.Guid groupId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsGroupIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/group/{groupId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsGroupIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsGroupIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsGroupIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsGroupIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsGroupIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsGroupIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsGroupIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsGroupIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsGroupIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsGroupIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsIndex.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsIndex.g.cs
index 26961c3..9364900 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsIndex.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsIndex.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsIndexResponse(
public async global::System.Threading.Tasks.Task OptionsIndexAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsIndexAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsIndexAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsIndexResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsIndexResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsIndexResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsIndexResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsIndexResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsIndexResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsIndexResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsIndexResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsIndexResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsIndexResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsIndexResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServer.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServer.g.cs
index fd22452..df14f11 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServer.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServer.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsMcpServerResponse(
public async global::System.Threading.Tasks.Task OptionsMcpServerAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsMcpServerAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/mcp_server`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsMcpServerAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsMcpServerResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/mcp_server",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsMcpServerResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsMcpServerResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsMcpServerResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsMcpServerResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsMcpServerResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsMcpServerResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsMcpServerResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsMcpServerResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsMcpServerResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsMcpServerResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServerId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServerId.g.cs
index 8f35e19..fc5cb2e 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServerId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsMcpServerId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsMcpServerIdResponse(
global::System.Guid mcpServerId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsMcpServerIdAsResponseAsync(
+ mcpServerId: mcpServerId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/mcp_server/{mcp_server_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// McpServer id
+ ///
+ /// 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 OptionsMcpServerIdAsResponseAsync(
+ global::System.Guid mcpServerId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsMcpServerIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/mcp_server/{mcpServerId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsMcpServerIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsMcpServerIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsMcpServerIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsMcpServerIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsMcpServerIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsMcpServerIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsMcpServerIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsMcpServerIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsMcpServerIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsMcpServerIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganization.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganization.g.cs
index 695eae0..bce6622 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganization.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganization.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsOrganizationResponse(
public async global::System.Threading.Tasks.Task OptionsOrganizationAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsOrganizationAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/organization`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsOrganizationAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsOrganizationResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/organization",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsOrganizationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsOrganizationResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsOrganizationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsOrganizationResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsOrganizationResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsOrganizationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsOrganizationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsOrganizationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsOrganizationResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsOrganizationResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationId.g.cs
index f5c633b..aa40498 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsOrganizationIdResponse(
global::System.Guid organizationId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsOrganizationIdAsResponseAsync(
+ organizationId: organizationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/organization/{organization_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Organization id
+ ///
+ /// 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 OptionsOrganizationIdAsResponseAsync(
+ global::System.Guid organizationId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsOrganizationIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/organization/{organizationId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsOrganizationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsOrganizationIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsOrganizationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsOrganizationIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsOrganizationIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsOrganizationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsOrganizationIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsOrganizationIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsOrganizationIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsOrganizationIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationMembers.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationMembers.g.cs
index 3ae0599..52ca469 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationMembers.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsOrganizationMembers.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsOrganizationMembersResponse(
public async global::System.Threading.Tasks.Task OptionsOrganizationMembersAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsOrganizationMembersAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/organization/members`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsOrganizationMembersAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsOrganizationMembersResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/organization/members",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsOrganizationMembersResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsOrganizationMembersResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsOrganizationMembersResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsOrganizationMembersResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsOrganizationMembersResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsOrganizationMembersResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsOrganizationMembersResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsOrganizationMembersResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsOrganizationMembersResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsOrganizationMembersResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProject.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProject.g.cs
index d7f9dff..311767f 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProject.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProject.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProjectResponse(
public async global::System.Threading.Tasks.Task OptionsProjectAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProjectAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProjectResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/project",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProjectResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProjectResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProjectResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProjectResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProjectResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProjectResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProjectResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProjectResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProjectResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProjectResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomation.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomation.g.cs
index 5bc3f23..ac3c45b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomation.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomation.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProjectAutomationResponse(
public async global::System.Threading.Tasks.Task OptionsProjectAutomationAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectAutomationAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_automation`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProjectAutomationAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProjectAutomationResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/project_automation",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProjectAutomationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProjectAutomationResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProjectAutomationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProjectAutomationResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProjectAutomationResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProjectAutomationResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProjectAutomationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProjectAutomationResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProjectAutomationResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProjectAutomationResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomationId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomationId.g.cs
index 0e3ca1a..325c0f8 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomationId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectAutomationId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectAutomationIdResponse(
global::System.Guid projectAutomationId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectAutomationIdAsResponseAsync(
+ projectAutomationId: projectAutomationId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_automation/{project_automation_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// ProjectAutomation id
+ ///
+ /// 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 OptionsProjectAutomationIdAsResponseAsync(
+ global::System.Guid projectAutomationId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectAutomationIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_automation/{projectAutomationId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectAutomationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectAutomationIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectAutomationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectAutomationIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectAutomationIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectAutomationIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectAutomationIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectAutomationIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectAutomationIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectAutomationIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectId.g.cs
index 283233a..d4d8b69 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectIdResponse(
global::System.Guid projectId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectIdAsResponseAsync(
+ projectId: projectId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project/{project_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Project id
+ ///
+ /// 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 OptionsProjectIdAsResponseAsync(
+ global::System.Guid projectId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project/{projectId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFeedback.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFeedback.g.cs
index d66cc3c..d2b9062 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFeedback.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFeedback.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
global::System.Guid projectId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectLogsIdFeedbackAsResponseAsync(
+ projectId: projectId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_logs/{project_id}/feedback`)
+ /// Enable CORS
+ ///
+ ///
+ /// Project id
+ ///
+ /// 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 OptionsProjectLogsIdFeedbackAsResponseAsync(
+ global::System.Guid projectId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_logs/{projectId}/feedback",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectLogsIdFeedbackResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFetch.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFetch.g.cs
index 59b074e..0c8fb1c 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFetch.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdFetch.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
global::System.Guid projectId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectLogsIdFetchAsResponseAsync(
+ projectId: projectId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_logs/{project_id}/fetch`)
+ /// Enable CORS
+ ///
+ ///
+ /// Project id
+ ///
+ /// 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 OptionsProjectLogsIdFetchAsResponseAsync(
+ global::System.Guid projectId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_logs/{projectId}/fetch",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectLogsIdFetchResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdInsert.g.cs
index e530e0b..85c127e 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectLogsIdInsert.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
global::System.Guid projectId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectLogsIdInsertAsResponseAsync(
+ projectId: projectId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_logs/{project_id}/insert`)
+ /// Enable CORS
+ ///
+ ///
+ /// Project id
+ ///
+ /// 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 OptionsProjectLogsIdInsertAsResponseAsync(
+ global::System.Guid projectId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_logs/{projectId}/insert",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectLogsIdInsertResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScore.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScore.g.cs
index df01f2f..473a5db 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScore.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScore.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProjectScoreResponse(
public async global::System.Threading.Tasks.Task OptionsProjectScoreAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectScoreAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_score`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProjectScoreAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProjectScoreResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/project_score",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProjectScoreResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProjectScoreResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProjectScoreResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProjectScoreResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProjectScoreResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProjectScoreResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProjectScoreResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProjectScoreResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProjectScoreResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProjectScoreResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScoreId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScoreId.g.cs
index 1509129..cf5b130 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScoreId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectScoreId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectScoreIdResponse(
global::System.Guid projectScoreId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectScoreIdAsResponseAsync(
+ projectScoreId: projectScoreId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_score/{project_score_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// ProjectScore id
+ ///
+ /// 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 OptionsProjectScoreIdAsResponseAsync(
+ global::System.Guid projectScoreId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectScoreIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_score/{projectScoreId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectScoreIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectScoreIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectScoreIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectScoreIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectScoreIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectScoreIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectScoreIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectScoreIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectScoreIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectScoreIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTag.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTag.g.cs
index e44a24c..e5516b4 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTag.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTag.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProjectTagResponse(
public async global::System.Threading.Tasks.Task OptionsProjectTagAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectTagAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_tag`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProjectTagAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProjectTagResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/project_tag",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProjectTagResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProjectTagResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProjectTagResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProjectTagResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProjectTagResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProjectTagResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProjectTagResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProjectTagResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProjectTagResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProjectTagResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTagId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTagId.g.cs
index 4facd38..cb2c2f0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTagId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProjectTagId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsProjectTagIdResponse(
global::System.Guid projectTagId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProjectTagIdAsResponseAsync(
+ projectTagId: projectTagId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/project_tag/{project_tag_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// ProjectTag id
+ ///
+ /// 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 OptionsProjectTagIdAsResponseAsync(
+ global::System.Guid projectTagId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsProjectTagIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/project_tag/{projectTagId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsProjectTagIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsProjectTagIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsProjectTagIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsProjectTagIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsProjectTagIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsProjectTagIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsProjectTagIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsProjectTagIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsProjectTagIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsProjectTagIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPrompt.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPrompt.g.cs
index dbbae68..ec1cd3b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPrompt.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPrompt.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsPromptResponse(
public async global::System.Threading.Tasks.Task OptionsPromptAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsPromptAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/prompt`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsPromptAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsPromptResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/prompt",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsPromptResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsPromptResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsPromptResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsPromptResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsPromptResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsPromptResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsPromptResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsPromptResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsPromptResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsPromptResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPromptId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPromptId.g.cs
index 8036762..83e6adb 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPromptId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsPromptId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsPromptIdResponse(
global::System.Guid promptId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsPromptIdAsResponseAsync(
+ promptId: promptId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/prompt/{prompt_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Prompt id
+ ///
+ /// 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 OptionsPromptIdAsResponseAsync(
+ global::System.Guid promptId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsPromptIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/prompt/{promptId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsPromptIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsPromptIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsPromptIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsPromptIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsPromptIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsPromptIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsPromptIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsPromptIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsPromptIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsPromptIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyauto.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyauto.g.cs
index 601d111..1394680 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyauto.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyauto.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProxyproxyautoResponse(
public async global::System.Threading.Tasks.Task OptionsProxyproxyautoAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProxyproxyautoAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/proxy/auto`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProxyproxyautoAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProxyproxyautoResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/proxy/auto",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProxyproxyautoResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProxyproxyautoResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProxyproxyautoResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProxyproxyautoResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProxyproxyautoResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProxyproxyautoResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProxyproxyautoResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProxyproxyautoResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProxyproxyautoResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProxyproxyautoResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxychatCompletions.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxychatCompletions.g.cs
index fa1bf28..9b93258 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxychatCompletions.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxychatCompletions.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
public async global::System.Threading.Tasks.Task OptionsProxyproxychatCompletionsAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProxyproxychatCompletionsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/proxy/chat/completions`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProxyproxychatCompletionsAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/proxy/chat/completions",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProxyproxychatCompletionsResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycompletions.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycompletions.g.cs
index bcfd8c1..7a96be7 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycompletions.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycompletions.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
public async global::System.Threading.Tasks.Task OptionsProxyproxycompletionsAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProxyproxycompletionsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/proxy/completions`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProxyproxycompletionsAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/proxy/completions",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProxyproxycompletionsResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycredentials.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycredentials.g.cs
index 54381e1..2a78651 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycredentials.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxycredentials.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
public async global::System.Threading.Tasks.Task OptionsProxyproxycredentialsAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProxyproxycredentialsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/proxy/credentials`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProxyproxycredentialsAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/proxy/credentials",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProxyproxycredentialsResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyembeddings.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyembeddings.g.cs
index 832d6a5..af3018b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyembeddings.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsProxyproxyembeddings.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
public async global::System.Threading.Tasks.Task OptionsProxyproxyembeddingsAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsProxyproxyembeddingsAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/proxy/embeddings`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsProxyproxyembeddingsAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/proxy/embeddings",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsProxyproxyembeddingsResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRole.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRole.g.cs
index b7c7ae9..2f33930 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRole.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRole.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsRoleResponse(
public async global::System.Threading.Tasks.Task OptionsRoleAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsRoleAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/role`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsRoleAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsRoleResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/role",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsRoleResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsRoleResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsRoleResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsRoleResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsRoleResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsRoleResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsRoleResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsRoleResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsRoleResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsRoleResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRoleId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRoleId.g.cs
index 72c9300..7a63697 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRoleId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsRoleId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsRoleIdResponse(
global::System.Guid roleId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsRoleIdAsResponseAsync(
+ roleId: roleId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/role/{role_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// Role id
+ ///
+ /// 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 OptionsRoleIdAsResponseAsync(
+ global::System.Guid roleId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsRoleIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/role/{roleId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsRoleIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsRoleIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsRoleIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsRoleIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsRoleIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsRoleIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsRoleIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsRoleIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsRoleIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsRoleIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceToken.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceToken.g.cs
index 15b4ba9..28d4411 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceToken.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceToken.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsServiceTokenResponse(
public async global::System.Threading.Tasks.Task OptionsServiceTokenAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsServiceTokenAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/service_token`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsServiceTokenAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsServiceTokenResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/service_token",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsServiceTokenResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsServiceTokenResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsServiceTokenResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsServiceTokenResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsServiceTokenResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsServiceTokenResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsServiceTokenResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsServiceTokenResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsServiceTokenResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsServiceTokenResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceTokenId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceTokenId.g.cs
index f23be88..2b95327 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceTokenId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsServiceTokenId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsServiceTokenIdResponse(
global::System.Guid serviceTokenId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsServiceTokenIdAsResponseAsync(
+ serviceTokenId: serviceTokenId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/service_token/{service_token_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// ServiceToken id
+ ///
+ /// 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 OptionsServiceTokenIdAsResponseAsync(
+ global::System.Guid serviceTokenId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsServiceTokenIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/service_token/{serviceTokenId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsServiceTokenIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsServiceTokenIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsServiceTokenIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsServiceTokenIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsServiceTokenIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsServiceTokenIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsServiceTokenIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsServiceTokenIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsServiceTokenIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsServiceTokenIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframe.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframe.g.cs
index 33f1ba3..cde2e30 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframe.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframe.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsSpanIframeResponse(
public async global::System.Threading.Tasks.Task OptionsSpanIframeAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsSpanIframeAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/span_iframe`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsSpanIframeAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsSpanIframeResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/span_iframe",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsSpanIframeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsSpanIframeResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsSpanIframeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsSpanIframeResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsSpanIframeResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsSpanIframeResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsSpanIframeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsSpanIframeResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsSpanIframeResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsSpanIframeResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframeId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframeId.g.cs
index 19babf4..e1f665f 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframeId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsSpanIframeId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsSpanIframeIdResponse(
global::System.Guid spanIframeId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsSpanIframeIdAsResponseAsync(
+ spanIframeId: spanIframeId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/span_iframe/{span_iframe_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// SpanIframe id
+ ///
+ /// 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 OptionsSpanIframeIdAsResponseAsync(
+ global::System.Guid spanIframeId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsSpanIframeIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/span_iframe/{spanIframeId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsSpanIframeIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsSpanIframeIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsSpanIframeIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsSpanIframeIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsSpanIframeIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsSpanIframeIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsSpanIframeIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsSpanIframeIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsSpanIframeIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsSpanIframeIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUser.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUser.g.cs
index a4fde2d..e8fd5bb 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUser.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUser.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsUserResponse(
public async global::System.Threading.Tasks.Task OptionsUserAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsUserAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/user`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsUserAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsUserResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/user",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsUserResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsUserResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsUserResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsUserResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsUserResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsUserResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsUserResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsUserResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsUserResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsUserResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUserId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUserId.g.cs
index 1b999a8..84ecee3 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUserId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsUserId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsUserIdResponse(
global::System.Guid userId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsUserIdAsResponseAsync(
+ userId: userId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/user/{user_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// User id
+ ///
+ /// 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 OptionsUserIdAsResponseAsync(
+ global::System.Guid userId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsUserIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/user/{userId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsUserIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsUserIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsUserIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsUserIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsUserIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsUserIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsUserIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsUserIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsUserIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsUserIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsView.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsView.g.cs
index 4b8fa45..67cc092 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsView.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsView.g.cs
@@ -24,6 +24,22 @@ partial void ProcessOptionsViewResponse(
public async global::System.Threading.Tasks.Task OptionsViewAsync(
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsViewAsResponseAsync(
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/view`)
+ /// Enable CORS
+ ///
+ /// 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 OptionsViewAsResponseAsync(
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -46,6 +62,7 @@ partial void ProcessOptionsViewResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/view",
baseUri: HttpClient.BaseAddress);
@@ -101,6 +118,8 @@ partial void ProcessOptionsViewResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -111,6 +130,11 @@ partial void ProcessOptionsViewResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -128,6 +152,8 @@ partial void ProcessOptionsViewResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -137,8 +163,7 @@ partial void ProcessOptionsViewResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -147,6 +172,11 @@ partial void ProcessOptionsViewResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -163,14 +193,15 @@ partial void ProcessOptionsViewResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +241,8 @@ partial void ProcessOptionsViewResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -230,6 +263,8 @@ partial void ProcessOptionsViewResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -288,6 +323,10 @@ partial void ProcessOptionsViewResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -309,6 +348,10 @@ partial void ProcessOptionsViewResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsViewId.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsViewId.g.cs
index 58eebf4..b151770 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsViewId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.OptionsViewId.g.cs
@@ -30,6 +30,27 @@ partial void ProcessOptionsViewIdResponse(
global::System.Guid viewId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ await OptionsViewIdAsResponseAsync(
+ viewId: viewId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+ }
+ ///
+ /// Enable CORS (`/v1/view/{view_id}`)
+ /// Enable CORS
+ ///
+ ///
+ /// View id
+ ///
+ /// 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 OptionsViewIdAsResponseAsync(
+ global::System.Guid viewId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -53,6 +74,7 @@ partial void ProcessOptionsViewIdResponse(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/view/{viewId}",
baseUri: HttpClient.BaseAddress);
@@ -109,6 +131,8 @@ partial void ProcessOptionsViewIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -119,6 +143,11 @@ partial void ProcessOptionsViewIdResponse(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -136,6 +165,8 @@ partial void ProcessOptionsViewIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -145,8 +176,7 @@ partial void ProcessOptionsViewIdResponse(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -155,6 +185,11 @@ partial void ProcessOptionsViewIdResponse(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -171,14 +206,15 @@ partial void ProcessOptionsViewIdResponse(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -218,6 +254,8 @@ partial void ProcessOptionsViewIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -238,6 +276,8 @@ partial void ProcessOptionsViewIdResponse(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -296,6 +336,10 @@ partial void ProcessOptionsViewIdResponse(
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
@@ -317,6 +361,10 @@ partial void ProcessOptionsViewIdResponse(
try
{
__response.EnsureSuccessStatusCode();
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CorsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.CorsClient.g.cs
index 8199e41..ceecf27 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CorsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CorsClient.g.cs
@@ -72,10 +72,10 @@ public CorsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CorsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.PostCrossObjectInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.PostCrossObjectInsert.g.cs
index d3fe02f..1b7dec3 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.PostCrossObjectInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.PostCrossObjectInsert.g.cs
@@ -51,6 +51,29 @@ partial void ProcessPostCrossObjectInsertResponseContent(
///
public async global::System.Threading.Tasks.Task PostCrossObjectInsertAsync(
+ global::Braintrust.CrossObjectInsertRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostCrossObjectInsertAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Cross-object insert
+ /// Insert events and feedback across object types
+ ///
+ ///
+ /// 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> PostCrossObjectInsertAsResponseAsync(
+
global::Braintrust.CrossObjectInsertRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -85,6 +108,7 @@ partial void ProcessPostCrossObjectInsertResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/insert",
baseUri: HttpClient.BaseAddress);
@@ -164,6 +188,8 @@ partial void ProcessPostCrossObjectInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -174,6 +200,11 @@ partial void ProcessPostCrossObjectInsertResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -191,6 +222,8 @@ partial void ProcessPostCrossObjectInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -200,8 +233,7 @@ partial void ProcessPostCrossObjectInsertResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -210,6 +242,11 @@ partial void ProcessPostCrossObjectInsertResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -226,14 +263,15 @@ partial void ProcessPostCrossObjectInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -273,6 +311,8 @@ partial void ProcessPostCrossObjectInsertResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -293,6 +333,8 @@ partial void ProcessPostCrossObjectInsertResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -507,9 +549,13 @@ partial void ProcessPostCrossObjectInsertResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.CrossObjectInsertResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.CrossObjectInsertResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -537,9 +583,13 @@ partial void ProcessPostCrossObjectInsertResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.CrossObjectInsertResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.CrossObjectInsertResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.g.cs
index 9a87636..87ad791 100644
--- a/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.CrossObjectClient.g.cs
@@ -72,10 +72,10 @@ public CrossObjectClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public CrossObjectClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.DeleteDatasetSnapshotId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.DeleteDatasetSnapshotId.g.cs
index caabf72..657093d 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.DeleteDatasetSnapshotId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.DeleteDatasetSnapshotId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
global::System.Guid datasetSnapshotId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteDatasetSnapshotIdAsResponseAsync(
+ datasetSnapshotId: datasetSnapshotId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete dataset_snapshot
+ /// Delete a dataset_snapshot object by its id
+ ///
+ ///
+ /// DatasetSnapshot id
+ ///
+ /// 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> DeleteDatasetSnapshotIdAsResponseAsync(
+ global::System.Guid datasetSnapshotId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset_snapshot/{datasetSnapshotId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteDatasetSnapshotIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshot.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshot.g.cs
index e9bb8ee..466b0fa 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshot.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshot.g.cs
@@ -96,6 +96,56 @@ partial void ProcessGetDatasetSnapshotResponseContent(
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetSnapshotAsResponseAsync(
+ limit: limit,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ ids: ids,
+ datasetSnapshotName: datasetSnapshotName,
+ orgName: orgName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List dataset_snapshots
+ /// List out all dataset_snapshots. The dataset_snapshots are sorted by creation date, with the most recently-created dataset_snapshots coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Name of the dataset_snapshot to search for
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ /// 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> GetDatasetSnapshotAsResponseAsync(
+ int? limit = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.Ids? ids = default,
+ string? datasetSnapshotName = default,
+ string? orgName = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -130,16 +180,17 @@ partial void ProcessGetDatasetSnapshotResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset_snapshot",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("starting_after", startingAfter?.ToString())
.AddOptionalParameter("ending_before", endingBefore?.ToString())
.AddOptionalParameter("ids", ids?.ToString())
.AddOptionalParameter("dataset_snapshot_name", datasetSnapshotName)
- .AddOptionalParameter("org_name", orgName)
+ .AddOptionalParameter("org_name", orgName)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -216,6 +267,8 @@ partial void ProcessGetDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -226,6 +279,11 @@ partial void ProcessGetDatasetSnapshotResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -243,6 +301,8 @@ partial void ProcessGetDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -252,8 +312,7 @@ partial void ProcessGetDatasetSnapshotResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -262,6 +321,11 @@ partial void ProcessGetDatasetSnapshotResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -278,14 +342,15 @@ partial void ProcessGetDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -325,6 +390,8 @@ partial void ProcessGetDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -345,6 +412,8 @@ partial void ProcessGetDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -559,9 +628,13 @@ partial void ProcessGetDatasetSnapshotResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetDatasetSnapshotResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetDatasetSnapshotResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -589,9 +662,13 @@ partial void ProcessGetDatasetSnapshotResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetDatasetSnapshotResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetDatasetSnapshotResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshotId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshotId.g.cs
index 3ad70b6..a4b23e2 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshotId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.GetDatasetSnapshotId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
global::System.Guid datasetSnapshotId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetSnapshotIdAsResponseAsync(
+ datasetSnapshotId: datasetSnapshotId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get dataset_snapshot
+ /// Get a dataset_snapshot object by its id
+ ///
+ ///
+ /// DatasetSnapshot id
+ ///
+ /// 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> GetDatasetSnapshotIdAsResponseAsync(
+ global::System.Guid datasetSnapshotId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset_snapshot/{datasetSnapshotId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetDatasetSnapshotIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PatchDatasetSnapshotId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PatchDatasetSnapshotId.g.cs
index 4465655..f3dc606 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PatchDatasetSnapshotId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PatchDatasetSnapshotId.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
public async global::System.Threading.Tasks.Task PatchDatasetSnapshotIdAsync(
global::System.Guid datasetSnapshotId,
+ global::Braintrust.PatchDatasetSnapshot request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchDatasetSnapshotIdAsResponseAsync(
+ datasetSnapshotId: datasetSnapshotId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Partially update dataset_snapshot
+ /// Partially update a dataset_snapshot object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
+ ///
+ ///
+ /// DatasetSnapshot id
+ ///
+ ///
+ /// 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> PatchDatasetSnapshotIdAsResponseAsync(
+ global::System.Guid datasetSnapshotId,
+
global::Braintrust.PatchDatasetSnapshot request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset_snapshot/{datasetSnapshotId}",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPatchDatasetSnapshotIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PostDatasetSnapshot.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PostDatasetSnapshot.g.cs
index 74567d6..cd74ad3 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PostDatasetSnapshot.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PostDatasetSnapshot.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostDatasetSnapshotResponseContent(
///
public async global::System.Threading.Tasks.Task PostDatasetSnapshotAsync(
+ global::Braintrust.CreateDatasetSnapshot request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostDatasetSnapshotAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create dataset_snapshot
+ /// Create a new dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will return the existing dataset_snapshot unmodified
+ ///
+ ///
+ /// 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> PostDatasetSnapshotAsResponseAsync(
+
global::Braintrust.CreateDatasetSnapshot request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostDatasetSnapshotResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset_snapshot",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostDatasetSnapshotResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostDatasetSnapshotResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostDatasetSnapshotResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostDatasetSnapshotResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostDatasetSnapshotResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PutDatasetSnapshot.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PutDatasetSnapshot.g.cs
index 1a5652f..d5dfc77 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PutDatasetSnapshot.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.PutDatasetSnapshot.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPutDatasetSnapshotResponseContent(
///
public async global::System.Threading.Tasks.Task PutDatasetSnapshotAsync(
+ global::Braintrust.CreateDatasetSnapshot request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PutDatasetSnapshotAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create or replace dataset_snapshot
+ /// Create or replace dataset_snapshot. If there is an existing dataset_snapshot with the same name as the one specified in the request, will replace the existing dataset_snapshot with the provided fields
+ ///
+ ///
+ /// 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> PutDatasetSnapshotAsResponseAsync(
+
global::Braintrust.CreateDatasetSnapshot request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPutDatasetSnapshotResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset_snapshot",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPutDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPutDatasetSnapshotResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPutDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPutDatasetSnapshotResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPutDatasetSnapshotResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPutDatasetSnapshotResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPutDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPutDatasetSnapshotResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPutDatasetSnapshotResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.DatasetSnapshot.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPutDatasetSnapshotResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.DatasetSnapshot.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.g.cs
index 94d826f..44fe762 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetSnapshotsClient.g.cs
@@ -72,10 +72,10 @@ public DatasetSnapshotsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DatasetSnapshotsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.DeleteDatasetId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.DeleteDatasetId.g.cs
index 0c42016..a4359ff 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.DeleteDatasetId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.DeleteDatasetId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteDatasetIdResponseContent(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteDatasetIdAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete dataset
+ /// Delete a dataset object by its id
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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> DeleteDatasetIdAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteDatasetIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteDatasetIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteDatasetIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteDatasetIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteDatasetIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteDatasetIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDataset.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDataset.g.cs
index f86219e..544e3d6 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDataset.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDataset.g.cs
@@ -108,6 +108,66 @@ partial void ProcessGetDatasetResponseContent(
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetAsResponseAsync(
+ limit: limit,
+ startingAfter: startingAfter,
+ endingBefore: endingBefore,
+ ids: ids,
+ datasetName: datasetName,
+ projectName: projectName,
+ projectId: projectId,
+ orgName: orgName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List datasets
+ /// List out all datasets. The datasets are sorted by creation date, with the most recently-created datasets coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the final item in the last page you fetched had an id of `foo`, pass `starting_after=foo` to fetch the next page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Pagination cursor id.
+ /// For example, if the initial item in the last page you fetched had an id of `foo`, pass `ending_before=foo` to fetch the previous page. Note: you may only pass one of `starting_after` and `ending_before`
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Name of the dataset to search for
+ ///
+ ///
+ /// Name of the project to search for
+ ///
+ ///
+ /// Project id
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ /// 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> GetDatasetAsResponseAsync(
+ int? limit = default,
+ global::System.Guid? startingAfter = default,
+ global::System.Guid? endingBefore = default,
+ global::Braintrust.Ids? ids = default,
+ string? datasetName = default,
+ string? projectName = default,
+ global::System.Guid? projectId = default,
+ string? orgName = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -144,9 +204,10 @@ partial void ProcessGetDatasetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("starting_after", startingAfter?.ToString())
@@ -155,7 +216,7 @@ partial void ProcessGetDatasetResponseContent(
.AddOptionalParameter("dataset_name", datasetName)
.AddOptionalParameter("project_name", projectName)
.AddOptionalParameter("project_id", projectId?.ToString())
- .AddOptionalParameter("org_name", orgName)
+ .AddOptionalParameter("org_name", orgName)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -234,6 +295,8 @@ partial void ProcessGetDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -244,6 +307,11 @@ partial void ProcessGetDatasetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -261,6 +329,8 @@ partial void ProcessGetDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -270,8 +340,7 @@ partial void ProcessGetDatasetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -280,6 +349,11 @@ partial void ProcessGetDatasetResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -296,14 +370,15 @@ partial void ProcessGetDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -343,6 +418,8 @@ partial void ProcessGetDatasetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -363,6 +440,8 @@ partial void ProcessGetDatasetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -577,9 +656,13 @@ partial void ProcessGetDatasetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetDatasetResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetDatasetResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -607,9 +690,13 @@ partial void ProcessGetDatasetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetId.g.cs
index 39437a2..e3c68d0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetDatasetIdResponseContent(
global::System.Guid datasetId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetIdAsResponseAsync(
+ datasetId: datasetId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get dataset
+ /// Get a dataset object by its id
+ ///
+ ///
+ /// Dataset id
+ ///
+ /// 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> GetDatasetIdAsResponseAsync(
+ global::System.Guid datasetId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetDatasetIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetDatasetIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetDatasetIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetDatasetIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetDatasetIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetDatasetIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdFetch.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdFetch.g.cs
index c4e44b1..8bc3c54 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdFetch.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdFetch.g.cs
@@ -95,6 +95,56 @@ partial void ProcessGetDatasetIdFetchResponseContent(
string? version = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetIdFetchAsResponseAsync(
+ datasetId: datasetId,
+ limit: limit,
+ maxXactId: maxXactId,
+ maxRootSpanId: maxRootSpanId,
+ version: version,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Fetch dataset (GET form)
+ /// Fetch the events in a dataset. Equivalent to the POST form of the same path, but with the parameters in the URL query rather than in the request body. For more complex queries, use the `POST /btql` endpoint.
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// limit the number of traces fetched
+ /// Fetch queries may be paginated if the total result size is expected to be large (e.g. project_logs which accumulate over a long time). Note that fetch queries only support pagination in descending time order (from latest to earliest `_xact_id`. Furthermore, later pages may return rows which showed up in earlier pages, except with an earlier `_xact_id`. This happens because pagination occurs over the whole version history of the event log. You will most likely want to exclude any such duplicate, outdated rows (by `id`) from your combined result set.
+ /// The `limit` parameter controls the number of full traces to return. So you may end up with more individual rows than the specified limit if you are fetching events containing traces.
+ ///
+ ///
+ /// DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. Please prefer the 'cursor' argument going forwards.
+ /// Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
+ /// Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation of `limit` for an overview of paginating fetch queries.
+ ///
+ ///
+ /// DEPRECATION NOTICE: The manually-constructed pagination cursor is deprecated in favor of the explicit 'cursor' returned by object fetch requests. Please prefer the 'cursor' argument going forwards.
+ /// Together, `max_xact_id` and `max_root_span_id` form a pagination cursor
+ /// Since a paginated fetch query returns results in order from latest to earliest, the cursor for the next page can be found as the row with the minimum (earliest) value of the tuple `(_xact_id, root_span_id)`. See the documentation of `limit` for an overview of paginating fetch queries.
+ ///
+ ///
+ /// Retrieve a snapshot of events from a past time
+ /// The version id is essentially a filter on the latest event transaction id. You can use the `max_xact_id` returned by a past fetch as the version to reproduce that exact fetch.
+ ///
+ /// 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> GetDatasetIdFetchAsResponseAsync(
+ global::System.Guid datasetId,
+ int? limit = default,
+ string? maxXactId = default,
+ string? maxRootSpanId = default,
+ string? version = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -128,14 +178,15 @@ partial void ProcessGetDatasetIdFetchResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/fetch",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("max_xact_id", maxXactId)
.AddOptionalParameter("max_root_span_id", maxRootSpanId)
- .AddOptionalParameter("version", version)
+ .AddOptionalParameter("version", version)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -211,6 +262,8 @@ partial void ProcessGetDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -221,6 +274,11 @@ partial void ProcessGetDatasetIdFetchResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -238,6 +296,8 @@ partial void ProcessGetDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -247,8 +307,7 @@ partial void ProcessGetDatasetIdFetchResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -257,6 +316,11 @@ partial void ProcessGetDatasetIdFetchResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -273,14 +337,15 @@ partial void ProcessGetDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -320,6 +385,8 @@ partial void ProcessGetDatasetIdFetchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -340,6 +407,8 @@ partial void ProcessGetDatasetIdFetchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -554,9 +623,13 @@ partial void ProcessGetDatasetIdFetchResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.FetchDatasetEventsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.FetchDatasetEventsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -584,9 +657,13 @@ partial void ProcessGetDatasetIdFetchResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.FetchDatasetEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.FetchDatasetEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdSummarize.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdSummarize.g.cs
index 64a91f5..68f8dbf 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdSummarize.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.GetDatasetIdSummarize.g.cs
@@ -61,6 +61,34 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
bool? summarizeData = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetDatasetIdSummarizeAsResponseAsync(
+ datasetId: datasetId,
+ summarizeData: summarizeData,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Summarize dataset
+ /// Summarize dataset
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// Whether to summarize the data. If false (or omitted), only the metadata will be returned.
+ ///
+ /// 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> GetDatasetIdSummarizeAsResponseAsync(
+ global::System.Guid datasetId,
+ bool? summarizeData = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -91,11 +119,12 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/summarize",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
- .AddOptionalParameter("summarize_data", summarizeData?.ToString().ToLowerInvariant())
+ .AddOptionalParameter("summarize_data", summarizeData?.ToString().ToLowerInvariant())
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -168,6 +197,8 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -178,6 +209,11 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -195,6 +231,8 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -204,8 +242,7 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -214,6 +251,11 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -230,14 +272,15 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -277,6 +320,8 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -297,6 +342,8 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -511,9 +558,13 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.SummarizeDatasetResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.SummarizeDatasetResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -541,9 +592,13 @@ partial void ProcessGetDatasetIdSummarizeResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.SummarizeDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.SummarizeDatasetResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PatchDatasetId.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PatchDatasetId.g.cs
index 629777c..9abdd36 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PatchDatasetId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PatchDatasetId.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPatchDatasetIdResponseContent(
public async global::System.Threading.Tasks.Task PatchDatasetIdAsync(
global::System.Guid datasetId,
+ global::Braintrust.PatchDataset request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchDatasetIdAsResponseAsync(
+ datasetId: datasetId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Partially update dataset
+ /// Partially update a dataset object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// 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> PatchDatasetIdAsResponseAsync(
+ global::System.Guid datasetId,
+
global::Braintrust.PatchDataset request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPatchDatasetIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPatchDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPatchDatasetIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPatchDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPatchDatasetIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPatchDatasetIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPatchDatasetIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPatchDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPatchDatasetIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPatchDatasetIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPatchDatasetIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDataset.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDataset.g.cs
index 80a3ab8..0f04b5c 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDataset.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDataset.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostDatasetResponseContent(
///
public async global::System.Threading.Tasks.Task PostDatasetAsync(
+ global::Braintrust.CreateDataset request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostDatasetAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create dataset
+ /// Create a new dataset. If there is an existing dataset in the project with the same name as the one specified in the request, will return the existing dataset unmodified
+ ///
+ ///
+ /// 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> PostDatasetAsResponseAsync(
+
global::Braintrust.CreateDataset request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostDatasetResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/dataset",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostDatasetResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostDatasetResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostDatasetResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostDatasetResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostDatasetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostDatasetResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostDatasetResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Dataset.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostDatasetResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Dataset.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFeedback.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFeedback.g.cs
index 837ad75..7bdf373 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFeedback.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFeedback.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
public async global::System.Threading.Tasks.Task PostDatasetIdFeedbackAsync(
global::System.Guid datasetId,
+ global::Braintrust.FeedbackDatasetEventRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostDatasetIdFeedbackAsResponseAsync(
+ datasetId: datasetId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Feedback for dataset events
+ /// Log feedback for a set of dataset events
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// 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> PostDatasetIdFeedbackAsResponseAsync(
+ global::System.Guid datasetId,
+
global::Braintrust.FeedbackDatasetEventRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/feedback",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.FeedbackResponseSchema.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.FeedbackResponseSchema.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPostDatasetIdFeedbackResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.FeedbackResponseSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.FeedbackResponseSchema.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFetch.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFetch.g.cs
index fe31fa7..d6debe2 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFetch.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdFetch.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPostDatasetIdFetchResponseContent(
public async global::System.Threading.Tasks.Task PostDatasetIdFetchAsync(
global::System.Guid datasetId,
+ global::Braintrust.FetchEventsRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostDatasetIdFetchAsResponseAsync(
+ datasetId: datasetId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Fetch dataset (POST form)
+ /// Fetch the events in a dataset. Equivalent to the GET form of the same path, but with the parameters in the request body rather than in the URL query. For more complex queries, use the `POST /btql` endpoint.
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// 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> PostDatasetIdFetchAsResponseAsync(
+ global::System.Guid datasetId,
+
global::Braintrust.FetchEventsRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPostDatasetIdFetchResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/fetch",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPostDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPostDatasetIdFetchResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPostDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPostDatasetIdFetchResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPostDatasetIdFetchResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPostDatasetIdFetchResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPostDatasetIdFetchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPostDatasetIdFetchResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPostDatasetIdFetchResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.FetchDatasetEventsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.FetchDatasetEventsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPostDatasetIdFetchResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.FetchDatasetEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.FetchDatasetEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdInsert.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdInsert.g.cs
index c18a10f..9f561b3 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdInsert.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.PostDatasetIdInsert.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPostDatasetIdInsertResponseContent(
public async global::System.Threading.Tasks.Task PostDatasetIdInsertAsync(
global::System.Guid datasetId,
+ global::Braintrust.InsertDatasetEventRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostDatasetIdInsertAsResponseAsync(
+ datasetId: datasetId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Insert dataset events
+ /// Insert a set of events into the dataset
+ ///
+ ///
+ /// Dataset id
+ ///
+ ///
+ /// 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> PostDatasetIdInsertAsResponseAsync(
+ global::System.Guid datasetId,
+
global::Braintrust.InsertDatasetEventRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPostDatasetIdInsertResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/dataset/{datasetId}/insert",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPostDatasetIdInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPostDatasetIdInsertResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPostDatasetIdInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPostDatasetIdInsertResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPostDatasetIdInsertResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPostDatasetIdInsertResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPostDatasetIdInsertResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPostDatasetIdInsertResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPostDatasetIdInsertResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.InsertEventsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.InsertEventsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPostDatasetIdInsertResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.InsertEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.InsertEventsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.g.cs
index 68370cc..839da4b 100644
--- a/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.DatasetsClient.g.cs
@@ -72,10 +72,10 @@ public DatasetsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public DatasetsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.DeleteEnvVarId.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.DeleteEnvVarId.g.cs
index df54fbf..b175132 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.DeleteEnvVarId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.DeleteEnvVarId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessDeleteEnvVarIdResponseContent(
global::System.Guid envVarId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteEnvVarIdAsResponseAsync(
+ envVarId: envVarId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete env_var
+ /// Delete an env_var object by its id
+ ///
+ ///
+ /// EnvVar id
+ ///
+ /// 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> DeleteEnvVarIdAsResponseAsync(
+ global::System.Guid envVarId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessDeleteEnvVarIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/env_var/{envVarId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessDeleteEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessDeleteEnvVarIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessDeleteEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessDeleteEnvVarIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessDeleteEnvVarIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessDeleteEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessDeleteEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessDeleteEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessDeleteEnvVarIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessDeleteEnvVarIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVar.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVar.g.cs
index 02e7289..a8381e0 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVar.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVar.g.cs
@@ -88,6 +88,49 @@ partial void ProcessGetEnvVarResponseContent(
global::System.Guid? objectId = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetEnvVarAsResponseAsync(
+ limit: limit,
+ ids: ids,
+ envVarName: envVarName,
+ objectType: objectType,
+ objectId: objectId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List env_vars
+ /// List out all env_vars. The env_vars are sorted by creation date, with the most recently-created env_vars coming first
+ ///
+ ///
+ /// Limit the number of objects to return
+ ///
+ ///
+ /// Filter search results to a particular set of object IDs. To specify a list of IDs, include the query param multiple times
+ ///
+ ///
+ /// Name of the env_var to search for
+ ///
+ ///
+ /// The type of the object the environment variable is scoped for
+ ///
+ ///
+ /// The id of the object the environment variable is scoped for
+ ///
+ /// 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> GetEnvVarAsResponseAsync(
+ int? limit = default,
+ global::Braintrust.Ids? ids = default,
+ string? envVarName = default,
+ global::Braintrust.EnvVarObjectType? objectType = default,
+ global::System.Guid? objectId = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -121,15 +164,16 @@ partial void ProcessGetEnvVarResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/env_var",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("limit", limit?.ToString())
.AddOptionalParameter("ids", ids?.ToString())
.AddOptionalParameter("env_var_name", envVarName)
.AddOptionalParameter("object_type", objectType?.ToValueString())
- .AddOptionalParameter("object_id", objectId?.ToString())
+ .AddOptionalParameter("object_id", objectId?.ToString())
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -205,6 +249,8 @@ partial void ProcessGetEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -215,6 +261,11 @@ partial void ProcessGetEnvVarResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -232,6 +283,8 @@ partial void ProcessGetEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -241,8 +294,7 @@ partial void ProcessGetEnvVarResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -251,6 +303,11 @@ partial void ProcessGetEnvVarResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -267,14 +324,15 @@ partial void ProcessGetEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -314,6 +372,8 @@ partial void ProcessGetEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -334,6 +394,8 @@ partial void ProcessGetEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -548,9 +610,13 @@ partial void ProcessGetEnvVarResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.GetEnvVarResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.GetEnvVarResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -578,9 +644,13 @@ partial void ProcessGetEnvVarResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.GetEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.GetEnvVarResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVarId.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVarId.g.cs
index 8df144e..969ef26 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVarId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.GetEnvVarId.g.cs
@@ -64,6 +64,29 @@ partial void ProcessGetEnvVarIdResponseContent(
global::System.Guid envVarId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetEnvVarIdAsResponseAsync(
+ envVarId: envVarId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get env_var
+ /// Get an env_var object by its id
+ ///
+ ///
+ /// EnvVar id
+ ///
+ /// 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> GetEnvVarIdAsResponseAsync(
+ global::System.Guid envVarId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -93,6 +116,7 @@ partial void ProcessGetEnvVarIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/env_var/{envVarId}",
baseUri: HttpClient.BaseAddress);
@@ -166,6 +190,8 @@ partial void ProcessGetEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -176,6 +202,11 @@ partial void ProcessGetEnvVarIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -193,6 +224,8 @@ partial void ProcessGetEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -202,8 +235,7 @@ partial void ProcessGetEnvVarIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -212,6 +244,11 @@ partial void ProcessGetEnvVarIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -228,14 +265,15 @@ partial void ProcessGetEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -275,6 +313,8 @@ partial void ProcessGetEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -295,6 +335,8 @@ partial void ProcessGetEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -509,9 +551,13 @@ partial void ProcessGetEnvVarIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -539,9 +585,13 @@ partial void ProcessGetEnvVarIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PatchEnvVarId.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PatchEnvVarId.g.cs
index 31aa642..cfffa5c 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PatchEnvVarId.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PatchEnvVarId.g.cs
@@ -66,6 +66,34 @@ partial void ProcessPatchEnvVarIdResponseContent(
public async global::System.Threading.Tasks.Task PatchEnvVarIdAsync(
global::System.Guid envVarId,
+ global::Braintrust.PatchEnvVarIdRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PatchEnvVarIdAsResponseAsync(
+ envVarId: envVarId,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Partially update env_var
+ /// Partially update an env_var object. Specify the fields to update in the payload. Any object-type fields will be deep-merged with existing content. Currently we do not support removing fields or setting them to null.
+ ///
+ ///
+ /// EnvVar id
+ ///
+ ///
+ /// 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> PatchEnvVarIdAsResponseAsync(
+ global::System.Guid envVarId,
+
global::Braintrust.PatchEnvVarIdRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -101,6 +129,7 @@ partial void ProcessPatchEnvVarIdResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/v1/env_var/{envVarId}",
baseUri: HttpClient.BaseAddress);
@@ -181,6 +210,8 @@ partial void ProcessPatchEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -191,6 +222,11 @@ partial void ProcessPatchEnvVarIdResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -208,6 +244,8 @@ partial void ProcessPatchEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -217,8 +255,7 @@ partial void ProcessPatchEnvVarIdResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -227,6 +264,11 @@ partial void ProcessPatchEnvVarIdResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -243,14 +285,15 @@ partial void ProcessPatchEnvVarIdResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -290,6 +333,8 @@ partial void ProcessPatchEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -310,6 +355,8 @@ partial void ProcessPatchEnvVarIdResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -524,9 +571,13 @@ partial void ProcessPatchEnvVarIdResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -554,9 +605,13 @@ partial void ProcessPatchEnvVarIdResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PostEnvVar.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PostEnvVar.g.cs
index 393ee3f..c4937bd 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PostEnvVar.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PostEnvVar.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPostEnvVarResponseContent(
///
public async global::System.Threading.Tasks.Task PostEnvVarAsync(
+ global::Braintrust.PostEnvVarRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PostEnvVarAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create env_var
+ /// Create a new env_var. If there is an existing env_var with the same name as the one specified in the request, will return the existing env_var unmodified
+ ///
+ ///
+ /// 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> PostEnvVarAsResponseAsync(
+
global::Braintrust.PostEnvVarRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPostEnvVarResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/env_var",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPostEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPostEnvVarResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPostEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPostEnvVarResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPostEnvVarResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPostEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPostEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPostEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPostEnvVarResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPostEnvVarResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PutEnvVar.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PutEnvVar.g.cs
index 427af5f..eac2ab8 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PutEnvVar.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.PutEnvVar.g.cs
@@ -60,6 +60,29 @@ partial void ProcessPutEnvVarResponseContent(
///
public async global::System.Threading.Tasks.Task PutEnvVarAsync(
+ global::Braintrust.PutEnvVarRequest request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await PutEnvVarAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create or replace env_var
+ /// Create or replace env_var. If there is an existing env_var with the same name as the one specified in the request, will replace the existing env_var with the provided fields
+ ///
+ ///
+ /// 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> PutEnvVarAsResponseAsync(
+
global::Braintrust.PutEnvVarRequest request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessPutEnvVarResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/v1/env_var",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessPutEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessPutEnvVarResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessPutEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessPutEnvVarResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessPutEnvVarResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessPutEnvVarResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessPutEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessPutEnvVarResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessPutEnvVarResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.EnvVar.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessPutEnvVarResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.EnvVar.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.g.cs
index 3c9b761..2a8be7f 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvVarsClient.g.cs
@@ -72,10 +72,10 @@ public EnvVarsClient(
/// Client-wide request defaults such as headers, query parameters, retries, and timeout.
/// Dispose the HttpClient when the instance is disposed. True by default.
public EnvVarsClient(
- global::System.Net.Http.HttpClient? httpClient = null,
- global::System.Uri? baseUri = null,
- global::System.Collections.Generic.List? authorizations = null,
- global::Braintrust.AutoSDKClientOptions? options = null,
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Braintrust.AutoSDKClientOptions? options,
bool disposeHttpClient = true)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.CreateEnvironment.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.CreateEnvironment.g.cs
index 2e47691..3e4f393 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.CreateEnvironment.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.CreateEnvironment.g.cs
@@ -60,6 +60,29 @@ partial void ProcessCreateEnvironmentResponseContent(
///
public async global::System.Threading.Tasks.Task CreateEnvironmentAsync(
+ global::Braintrust.CreateEnvironment request,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await CreateEnvironmentAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create environment
+ /// Create a new environment
+ ///
+ ///
+ /// 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> CreateEnvironmentAsResponseAsync(
+
global::Braintrust.CreateEnvironment request,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
@@ -94,6 +117,7 @@ partial void ProcessCreateEnvironmentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/environment",
baseUri: HttpClient.BaseAddress);
@@ -173,6 +197,8 @@ partial void ProcessCreateEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -183,6 +209,11 @@ partial void ProcessCreateEnvironmentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -200,6 +231,8 @@ partial void ProcessCreateEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -209,8 +242,7 @@ partial void ProcessCreateEnvironmentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -219,6 +251,11 @@ partial void ProcessCreateEnvironmentResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -235,14 +272,15 @@ partial void ProcessCreateEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -282,6 +320,8 @@ partial void ProcessCreateEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -302,6 +342,8 @@ partial void ProcessCreateEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -516,9 +558,13 @@ partial void ProcessCreateEnvironmentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -546,9 +592,13 @@ partial void ProcessCreateEnvironmentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.DeleteEnvironment.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.DeleteEnvironment.g.cs
index 9f44af8..4272b80 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.DeleteEnvironment.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.DeleteEnvironment.g.cs
@@ -61,6 +61,26 @@ partial void ProcessDeleteEnvironmentResponseContent(
global::System.Guid environmentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await DeleteEnvironmentAsResponseAsync(
+ environmentId: environmentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Delete environment
+ ///
+ ///
+ /// 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> DeleteEnvironmentAsResponseAsync(
+ global::System.Guid environmentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -90,6 +110,7 @@ partial void ProcessDeleteEnvironmentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/environment/{environmentId}",
baseUri: HttpClient.BaseAddress);
@@ -163,6 +184,8 @@ partial void ProcessDeleteEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -173,6 +196,11 @@ partial void ProcessDeleteEnvironmentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -190,6 +218,8 @@ partial void ProcessDeleteEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -199,8 +229,7 @@ partial void ProcessDeleteEnvironmentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -209,6 +238,11 @@ partial void ProcessDeleteEnvironmentResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -225,14 +259,15 @@ partial void ProcessDeleteEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -272,6 +307,8 @@ partial void ProcessDeleteEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -292,6 +329,8 @@ partial void ProcessDeleteEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -506,9 +545,13 @@ partial void ProcessDeleteEnvironmentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -536,9 +579,13 @@ partial void ProcessDeleteEnvironmentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.GetEnvironment.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.GetEnvironment.g.cs
index 55f6771..5749096 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.GetEnvironment.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.GetEnvironment.g.cs
@@ -61,6 +61,26 @@ partial void ProcessGetEnvironmentResponseContent(
global::System.Guid environmentId,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetEnvironmentAsResponseAsync(
+ environmentId: environmentId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get environment
+ ///
+ ///
+ /// 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> GetEnvironmentAsResponseAsync(
+ global::System.Guid environmentId,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -90,6 +110,7 @@ partial void ProcessGetEnvironmentResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: $"/environment/{environmentId}",
baseUri: HttpClient.BaseAddress);
@@ -163,6 +184,8 @@ partial void ProcessGetEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -173,6 +196,11 @@ partial void ProcessGetEnvironmentResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -190,6 +218,8 @@ partial void ProcessGetEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -199,8 +229,7 @@ partial void ProcessGetEnvironmentResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -209,6 +238,11 @@ partial void ProcessGetEnvironmentResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -225,14 +259,15 @@ partial void ProcessGetEnvironmentResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -272,6 +307,8 @@ partial void ProcessGetEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -292,6 +329,8 @@ partial void ProcessGetEnvironmentResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -506,9 +545,13 @@ partial void ProcessGetEnvironmentResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.Environment.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -536,9 +579,13 @@ partial void ProcessGetEnvironmentResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.Environment.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
diff --git a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.ListEnvironments.g.cs b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.ListEnvironments.g.cs
index c904366..442ec68 100644
--- a/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.ListEnvironments.g.cs
+++ b/src/libs/Braintrust/Generated/Braintrust.EnvironmentsClient.ListEnvironments.g.cs
@@ -74,6 +74,37 @@ partial void ProcessListEnvironmentsResponseContent(
string? orgName = default,
global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await ListEnvironmentsAsResponseAsync(
+ ids: ids,
+ name: name,
+ orgName: orgName,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// List environments
+ /// List out all environments. The environments are sorted by creation date, with the most recently-created environments first.
+ ///
+ ///
+ /// Filter by environment IDs. Supports a single ID or multiple values.
+ ///
+ ///
+ ///
+ /// Filter search results to within a particular organization
+ ///
+ /// 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> ListEnvironmentsAsResponseAsync(
+ global::Braintrust.AnyOf>? ids = default,
+ string? name = default,
+ string? orgName = default,
+ global::Braintrust.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
{
PrepareArguments(
client: HttpClient);
@@ -105,13 +136,14 @@ partial void ProcessListEnvironmentsResponseContent(
global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
{
+
var __pathBuilder = new global::Braintrust.PathBuilder(
path: "/environment",
- baseUri: HttpClient.BaseAddress);
+ baseUri: HttpClient.BaseAddress);
__pathBuilder
.AddOptionalParameter("ids", ids?.ToString())
.AddOptionalParameter("name", name)
- .AddOptionalParameter("org_name", orgName)
+ .AddOptionalParameter("org_name", orgName)
;
var __path = __pathBuilder.ToString();
__path = global::Braintrust.AutoSDKRequestOptionsSupport.AppendQueryParameters(
@@ -185,6 +217,8 @@ partial void ProcessListEnvironmentsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
try
{
@@ -195,6 +229,11 @@ partial void ProcessListEnvironmentsResponseContent(
}
catch (global::System.Net.Http.HttpRequestException __exception)
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
@@ -212,6 +251,8 @@ partial void ProcessListEnvironmentsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
if (!__willRetry)
{
@@ -221,8 +262,7 @@ partial void ProcessListEnvironmentsResponseContent(
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -231,6 +271,11 @@ partial void ProcessListEnvironmentsResponseContent(
__attempt < __maxAttempts &&
global::Braintrust.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
{
+ var __retryDelay = global::Braintrust.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
await global::Braintrust.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
clientOptions: Options,
context: global::Braintrust.AutoSDKRequestOptionsSupport.CreateHookContext(
@@ -247,14 +292,15 @@ partial void ProcessListEnvironmentsResponseContent(
attempt: __attempt,
maxAttempts: __maxAttempts,
willRetry: true,
+ retryDelay: __retryDelay,
+ retryReason: "status:" + ((int)__response.StatusCode).ToString(global::System.Globalization.CultureInfo.InvariantCulture),
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
__response.Dispose();
__response = null;
__httpRequest.Dispose();
__httpRequest = null;
await global::Braintrust.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
- clientOptions: Options,
- requestOptions: requestOptions,
+ retryDelay: __retryDelay,
cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
continue;
}
@@ -294,6 +340,8 @@ partial void ProcessListEnvironmentsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
else
@@ -314,6 +362,8 @@ partial void ProcessListEnvironmentsResponseContent(
attempt: __attemptNumber,
maxAttempts: __maxAttempts,
willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
}
// The request was unacceptable, often due to missing a required parameter
@@ -528,9 +578,13 @@ partial void ProcessListEnvironmentsResponseContent(
{
__response.EnsureSuccessStatusCode();
- return
- global::Braintrust.ListEnvironmentsResponse.FromJson(__content, JsonSerializerContext) ??
+ var __value = global::Braintrust.ListEnvironmentsResponse.FromJson(__content, JsonSerializerContext) ??
throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Braintrust.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Braintrust.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
}
catch (global::System.Exception __ex)
{
@@ -558,9 +612,13 @@ partial void ProcessListEnvironmentsResponseContent(
#endif
).ConfigureAwait(false);
- return
- await global::Braintrust.ListEnvironmentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ var __value = await global::Braintrust.ListEnvironmentsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Braintrust.AutoSDKHttpResponse