diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendComposition.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendComposition.g.cs
new file mode 100644
index 00000000..4c2e2857
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendComposition.g.cs
@@ -0,0 +1,530 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AiSpendClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetSpendCompositionServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetSpendCompositionSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetSpendCompositionSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetSpendCompositionSecurityRequirement0,
+ };
+ partial void PrepareGetSpendCompositionArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Opik.SpendMetricRequest request);
+ partial void PrepareGetSpendCompositionRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Opik.SpendMetricRequest request);
+ partial void ProcessGetSpendCompositionResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSpendCompositionResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ /// 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 GetSpendCompositionAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSpendCompositionAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ /// 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> GetSpendCompositionAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSpendCompositionArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSpendCompositionSecurityRequirements,
+ operationName: "GetSpendCompositionAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: "/v1/private/ai-spend/composition",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSpendCompositionServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSpendCompositionRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendComposition",
+ methodName: "GetSpendCompositionAsync",
+ pathTemplate: "\"/v1/private/ai-spend/composition\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendComposition",
+ methodName: "GetSpendCompositionAsync",
+ pathTemplate: "\"/v1/private/ai-spend/composition\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendComposition",
+ methodName: "GetSpendCompositionAsync",
+ pathTemplate: "\"/v1/private/ai-spend/composition\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSpendCompositionResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendComposition",
+ methodName: "GetSpendCompositionAsync",
+ pathTemplate: "\"/v1/private/ai-spend/composition\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendComposition",
+ methodName: "GetSpendCompositionAsync",
+ pathTemplate: "\"/v1/private/ai-spend/composition\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Opik.ErrorMessage? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSpendCompositionResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.SpendCompositionResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.SpendCompositionResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 GetSpendCompositionAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Opik.SpendMetricRequest
+ {
+ ProjectId = projectId,
+ ProjectName = projectName,
+ IntervalStart = intervalStart,
+ IntervalEnd = intervalEnd,
+ UserId = userId,
+ StartBeforeEnd = startBeforeEnd,
+ ProjectProvided = projectProvided,
+ };
+
+ return await GetSpendCompositionAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendLaneBreakdown.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendLaneBreakdown.g.cs
new file mode 100644
index 00000000..e44c1a79
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendLaneBreakdown.g.cs
@@ -0,0 +1,542 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AiSpendClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetSpendLaneBreakdownServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetSpendLaneBreakdownSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetSpendLaneBreakdownSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetSpendLaneBreakdownSecurityRequirement0,
+ };
+ partial void PrepareGetSpendLaneBreakdownArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref string laneKey,
+ global::Opik.SpendMetricRequest request);
+ partial void PrepareGetSpendLaneBreakdownRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ string laneKey,
+ global::Opik.SpendMetricRequest request);
+ partial void ProcessGetSpendLaneBreakdownResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSpendLaneBreakdownResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ /// 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 GetSpendLaneBreakdownAsync(
+ string laneKey,
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSpendLaneBreakdownAsResponseAsync(
+ laneKey: laneKey,
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ /// 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> GetSpendLaneBreakdownAsResponseAsync(
+ string laneKey,
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSpendLaneBreakdownArguments(
+ httpClient: HttpClient,
+ laneKey: ref laneKey,
+ request: request);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSpendLaneBreakdownSecurityRequirements,
+ operationName: "GetSpendLaneBreakdownAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: $"/v1/private/ai-spend/composition/{laneKey}/breakdown",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSpendLaneBreakdownServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSpendLaneBreakdownRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ laneKey: laneKey!,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendLaneBreakdown",
+ methodName: "GetSpendLaneBreakdownAsync",
+ pathTemplate: "$\"/v1/private/ai-spend/composition/{laneKey}/breakdown\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendLaneBreakdown",
+ methodName: "GetSpendLaneBreakdownAsync",
+ pathTemplate: "$\"/v1/private/ai-spend/composition/{laneKey}/breakdown\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendLaneBreakdown",
+ methodName: "GetSpendLaneBreakdownAsync",
+ pathTemplate: "$\"/v1/private/ai-spend/composition/{laneKey}/breakdown\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSpendLaneBreakdownResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendLaneBreakdown",
+ methodName: "GetSpendLaneBreakdownAsync",
+ pathTemplate: "$\"/v1/private/ai-spend/composition/{laneKey}/breakdown\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendLaneBreakdown",
+ methodName: "GetSpendLaneBreakdownAsync",
+ pathTemplate: "$\"/v1/private/ai-spend/composition/{laneKey}/breakdown\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Opik.ErrorMessage? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSpendLaneBreakdownResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.SpendBreakdownResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.SpendBreakdownResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 GetSpendLaneBreakdownAsync(
+ string laneKey,
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Opik.SpendMetricRequest
+ {
+ ProjectId = projectId,
+ ProjectName = projectName,
+ IntervalStart = intervalStart,
+ IntervalEnd = intervalEnd,
+ UserId = userId,
+ StartBeforeEnd = startBeforeEnd,
+ ProjectProvided = projectProvided,
+ };
+
+ return await GetSpendLaneBreakdownAsync(
+ laneKey: laneKey,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendRecommendations.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendRecommendations.g.cs
new file mode 100644
index 00000000..19770857
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendRecommendations.g.cs
@@ -0,0 +1,530 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AiSpendClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetSpendRecommendationsServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetSpendRecommendationsSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetSpendRecommendationsSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetSpendRecommendationsSecurityRequirement0,
+ };
+ partial void PrepareGetSpendRecommendationsArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Opik.SpendMetricRequest request);
+ partial void PrepareGetSpendRecommendationsRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Opik.SpendMetricRequest request);
+ partial void ProcessGetSpendRecommendationsResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSpendRecommendationsResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ /// 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 GetSpendRecommendationsAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSpendRecommendationsAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ /// 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> GetSpendRecommendationsAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSpendRecommendationsArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSpendRecommendationsSecurityRequirements,
+ operationName: "GetSpendRecommendationsAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: "/v1/private/ai-spend/recommendations",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSpendRecommendationsServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSpendRecommendationsRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendRecommendations",
+ methodName: "GetSpendRecommendationsAsync",
+ pathTemplate: "\"/v1/private/ai-spend/recommendations\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendRecommendations",
+ methodName: "GetSpendRecommendationsAsync",
+ pathTemplate: "\"/v1/private/ai-spend/recommendations\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendRecommendations",
+ methodName: "GetSpendRecommendationsAsync",
+ pathTemplate: "\"/v1/private/ai-spend/recommendations\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSpendRecommendationsResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendRecommendations",
+ methodName: "GetSpendRecommendationsAsync",
+ pathTemplate: "\"/v1/private/ai-spend/recommendations\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendRecommendations",
+ methodName: "GetSpendRecommendationsAsync",
+ pathTemplate: "\"/v1/private/ai-spend/recommendations\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Opik.ErrorMessage? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSpendRecommendationsResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.SpendRecommendationsResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.SpendRecommendationsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 GetSpendRecommendationsAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Opik.SpendMetricRequest
+ {
+ ProjectId = projectId,
+ ProjectName = projectName,
+ IntervalStart = intervalStart,
+ IntervalEnd = intervalEnd,
+ UserId = userId,
+ StartBeforeEnd = startBeforeEnd,
+ ProjectProvided = projectProvided,
+ };
+
+ return await GetSpendRecommendationsAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendSummary.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendSummary.g.cs
new file mode 100644
index 00000000..83200da6
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendSummary.g.cs
@@ -0,0 +1,530 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AiSpendClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetSpendSummaryServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetSpendSummarySecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetSpendSummarySecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetSpendSummarySecurityRequirement0,
+ };
+ partial void PrepareGetSpendSummaryArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ global::Opik.SpendMetricRequest request);
+ partial void PrepareGetSpendSummaryRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::Opik.SpendMetricRequest request);
+ partial void ProcessGetSpendSummaryResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSpendSummaryResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ /// 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 GetSpendSummaryAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSpendSummaryAsResponseAsync(
+
+ request: request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ /// 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> GetSpendSummaryAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSpendSummaryArguments(
+ httpClient: HttpClient,
+ request: request);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSpendSummarySecurityRequirements,
+ operationName: "GetSpendSummaryAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: "/v1/private/ai-spend/summary",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSpendSummaryServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSpendSummaryRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendSummary",
+ methodName: "GetSpendSummaryAsync",
+ pathTemplate: "\"/v1/private/ai-spend/summary\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendSummary",
+ methodName: "GetSpendSummaryAsync",
+ pathTemplate: "\"/v1/private/ai-spend/summary\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendSummary",
+ methodName: "GetSpendSummaryAsync",
+ pathTemplate: "\"/v1/private/ai-spend/summary\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSpendSummaryResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendSummary",
+ methodName: "GetSpendSummaryAsync",
+ pathTemplate: "\"/v1/private/ai-spend/summary\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendSummary",
+ methodName: "GetSpendSummaryAsync",
+ pathTemplate: "\"/v1/private/ai-spend/summary\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Opik.ErrorMessage? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSpendSummaryResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.WorkspaceMetricsSummaryResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.WorkspaceMetricsSummaryResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 GetSpendSummaryAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Opik.SpendMetricRequest
+ {
+ ProjectId = projectId,
+ ProjectName = projectName,
+ IntervalStart = intervalStart,
+ IntervalEnd = intervalEnd,
+ UserId = userId,
+ StartBeforeEnd = startBeforeEnd,
+ ProjectProvided = projectProvided,
+ };
+
+ return await GetSpendSummaryAsync(
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendUsers.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendUsers.g.cs
new file mode 100644
index 00000000..c56b0d0a
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.GetSpendUsers.g.cs
@@ -0,0 +1,602 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AiSpendClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetSpendUsersServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetSpendUsersSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetSpendUsersSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetSpendUsersSecurityRequirement0,
+ };
+ partial void PrepareGetSpendUsersArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref int? page,
+ ref int? size,
+ ref string? sorting,
+ ref string? name,
+ global::Opik.SpendMetricRequest request);
+ partial void PrepareGetSpendUsersRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ int? page,
+ int? size,
+ string? sorting,
+ string? name,
+ global::Opik.SpendMetricRequest request);
+ partial void ProcessGetSpendUsersResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetSpendUsersResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ /// 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 GetSpendUsersAsync(
+
+ global::Opik.SpendMetricRequest request,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetSpendUsersAsResponseAsync(
+
+ request: request,
+ page: page,
+ size: size,
+ sorting: sorting,
+ name: name,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ /// 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> GetSpendUsersAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ request = request ?? throw new global::System.ArgumentNullException(nameof(request));
+
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetSpendUsersArguments(
+ httpClient: HttpClient,
+ page: ref page,
+ size: ref size,
+ sorting: ref sorting,
+ name: ref name,
+ request: request);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetSpendUsersSecurityRequirements,
+ operationName: "GetSpendUsersAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: "/v1/private/ai-spend/users",
+ baseUri: ResolveBaseUri(
+ servers: s_GetSpendUsersServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ __pathBuilder
+ .AddOptionalParameter("page", page?.ToString())
+ .AddOptionalParameter("size", size?.ToString())
+ .AddOptionalParameter("sorting", sorting)
+ .AddOptionalParameter("name", name)
+ ;
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Post,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ var __httpRequestContentBody = request.ToJson(JsonSerializerContext);
+ var __httpRequestContent = new global::System.Net.Http.StringContent(
+ content: __httpRequestContentBody,
+ encoding: global::System.Text.Encoding.UTF8,
+ mediaType: "application/json");
+ __httpRequest.Content = __httpRequestContent;
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetSpendUsersRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ page: page,
+ size: size,
+ sorting: sorting,
+ name: name,
+ request: request);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendUsers",
+ methodName: "GetSpendUsersAsync",
+ pathTemplate: "\"/v1/private/ai-spend/users\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendUsers",
+ methodName: "GetSpendUsersAsync",
+ pathTemplate: "\"/v1/private/ai-spend/users\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendUsers",
+ methodName: "GetSpendUsersAsync",
+ pathTemplate: "\"/v1/private/ai-spend/users\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetSpendUsersResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendUsers",
+ methodName: "GetSpendUsersAsync",
+ pathTemplate: "\"/v1/private/ai-spend/users\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetSpendUsers",
+ methodName: "GetSpendUsersAsync",
+ pathTemplate: "\"/v1/private/ai-spend/users\"",
+ httpMethod: "POST",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ // Bad Request
+ if ((int)__response.StatusCode == 400)
+ {
+ string? __content_400 = null;
+ global::System.Exception? __exception_400 = null;
+ global::Opik.ErrorMessage? __value_400 = null;
+ try
+ {
+ if (__effectiveReadResponseAsString)
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ else
+ {
+ __content_400 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false);
+
+ __value_400 = global::Opik.ErrorMessage.FromJson(__content_400, JsonSerializerContext);
+ }
+ }
+ catch (global::System.Exception __ex)
+ {
+ __exception_400 = __ex;
+ }
+
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content_400 ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __exception_400,
+ responseBody: __content_400,
+ responseObject: __value_400,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetSpendUsersResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.SpendUserPage.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.SpendUserPage.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// 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 GetSpendUsersAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __request = new global::Opik.SpendMetricRequest
+ {
+ ProjectId = projectId,
+ ProjectName = projectName,
+ IntervalStart = intervalStart,
+ IntervalEnd = intervalEnd,
+ UserId = userId,
+ StartBeforeEnd = startBeforeEnd,
+ ProjectProvided = projectProvided,
+ };
+
+ return await GetSpendUsersAsync(
+ page: page,
+ size: size,
+ sorting: sorting,
+ name: name,
+ request: __request,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken).ConfigureAwait(false);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AiSpendClient.g.cs b/src/libs/Opik/Generated/Opik.AiSpendClient.g.cs
new file mode 100644
index 00000000..af1dca2a
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AiSpendClient.g.cs
@@ -0,0 +1,285 @@
+
+#nullable enable
+
+namespace Opik
+{
+ ///
+ /// Coding-agent spend analytics
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public sealed partial class AiSpendClient : global::Opik.IAiSpendClient, global::System.IDisposable
+ {
+ ///
+ /// Local server
+ ///
+ public const string DefaultBaseUrl = "http://localhost:5173/api";
+
+ private bool _disposeHttpClient = true;
+
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ public System.Uri? BaseUri => ResolveDisplayedBaseUri();
+
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ public bool ReadResponseAsString { get; set; }
+#if DEBUG
+ = true;
+#endif
+
+ ///
+ public global::Opik.AutoSDKClientOptions Options { get; }
+
+
+ internal global::Opik.AutoSDKServerConfiguration AutoSDKServerConfiguration { get; set; } = new global::Opik.AutoSDKServerConfiguration();
+ ///
+ ///
+ ///
+ public global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; } = global::Opik.SourceGenerationContext.Default;
+
+
+
+ private static readonly global::Opik.AutoSDKServer[] s_availableServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers => s_availableServers;
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Opik.AutoSDKServer? SelectedServer
+ {
+ get => ResolveSelectedServer();
+ set => SelectServer(value);
+ }
+
+ ///
+ /// Creates a new instance of the AiSpendClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public AiSpendClient(
+ global::System.Net.Http.HttpClient? httpClient = null,
+ global::System.Uri? baseUri = null,
+ global::System.Collections.Generic.List? authorizations = null,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri,
+ authorizations,
+ options: null,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the AiSpendClient with explicit options but no base URL override.
+ /// Skips passing baseUri so the default base URL from the OpenAPI spec applies.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public AiSpendClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Collections.Generic.List? authorizations,
+ global::Opik.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true) : this(
+ httpClient,
+ baseUri: null,
+ authorizations,
+ options,
+ disposeHttpClient: disposeHttpClient)
+ {
+ }
+
+ ///
+ /// Creates a new instance of the AiSpendClient.
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ /// The HttpClient instance. If not provided, a new one will be created.
+ /// The base URL for the API. If not provided, the default baseUri from OpenAPI spec will be used.
+ /// The authorizations to use for the requests.
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ /// Dispose the HttpClient when the instance is disposed. True by default.
+ public AiSpendClient(
+ global::System.Net.Http.HttpClient? httpClient,
+ global::System.Uri? baseUri,
+ global::System.Collections.Generic.List? authorizations,
+ global::Opik.AutoSDKClientOptions? options,
+ bool disposeHttpClient = true)
+ {
+
+ HttpClient = httpClient ?? new global::System.Net.Http.HttpClient();
+ if (baseUri is not null)
+ {
+ HttpClient.BaseAddress ??= baseUri;
+ }
+ Authorizations = authorizations ?? new global::System.Collections.Generic.List();
+ Options = options ?? new global::Opik.AutoSDKClientOptions();
+ _disposeHttpClient = disposeHttpClient;
+
+ AutoSDKServerConfiguration.ExplicitBaseUri = baseUri ?? httpClient?.BaseAddress;
+
+ Initialized(HttpClient);
+ }
+
+ ///
+ public void Dispose()
+ {
+ if (_disposeHttpClient)
+ {
+ HttpClient.Dispose();
+ }
+ }
+
+ partial void Initialized(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareArguments(
+ global::System.Net.Http.HttpClient client);
+ partial void PrepareRequest(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpRequestMessage request);
+ partial void ProcessResponse(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response);
+ partial void ProcessResponseContent(
+ global::System.Net.Http.HttpClient client,
+ global::System.Net.Http.HttpResponseMessage response,
+ ref string content);
+
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId)
+ {
+ if (string.IsNullOrWhiteSpace(serverId))
+ {
+ return false;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, serverId, global::System.StringComparison.OrdinalIgnoreCase))
+ {
+ AutoSDKServerConfiguration.SelectedServer = server;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer()
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ }
+
+ private global::Opik.AutoSDKServer? ResolveSelectedServer()
+ {
+ var selectedServer = AutoSDKServerConfiguration.SelectedServer;
+ if (selectedServer is null)
+ {
+ return null;
+ }
+
+ foreach (var server in s_availableServers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server;
+ }
+ }
+
+ return null;
+ }
+
+ private void SelectServer(global::Opik.AutoSDKServer? server)
+ {
+ if (server is null)
+ {
+ AutoSDKServerConfiguration.SelectedServer = null;
+ return;
+ }
+
+ foreach (var candidate in s_availableServers)
+ {
+ if (string.Equals(candidate.Id, server.Id, global::System.StringComparison.Ordinal))
+ {
+ AutoSDKServerConfiguration.SelectedServer = candidate;
+ AutoSDKServerConfiguration.ExplicitBaseUri = null;
+ return;
+ }
+ }
+
+ throw new global::System.ArgumentException("The provided server is not available for this client.", nameof(server));
+ }
+
+ private global::System.Uri? ResolveDisplayedBaseUri()
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ return ResolveSelectedServer()?.Uri ?? (s_availableServers.Length > 0 ? s_availableServers[0].Uri : HttpClient.BaseAddress);
+ }
+
+ private global::System.Uri? ResolveBaseUri(
+ global::Opik.AutoSDKServer[] servers,
+ string defaultBaseUrl)
+ {
+ if (AutoSDKServerConfiguration.ExplicitBaseUri is global::System.Uri explicitBaseUri)
+ {
+ return explicitBaseUri;
+ }
+
+ if (AutoSDKServerConfiguration.SelectedServer is global::Opik.AutoSDKServer selectedServer)
+ {
+ foreach (var server in servers)
+ {
+ if (string.Equals(server.Id, selectedServer.Id, global::System.StringComparison.Ordinal))
+ {
+ return server.Uri;
+ }
+ }
+ }
+
+ if (servers.Length > 0)
+ {
+ return servers[0].Uri;
+ }
+
+ return string.IsNullOrWhiteSpace(defaultBaseUrl)
+ ? HttpClient.BaseAddress
+ : new global::System.Uri(defaultBaseUrl, global::System.UriKind.RelativeOrAbsolute);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.CreateAnnotationQueue.g.cs b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.CreateAnnotationQueue.g.cs
index fa434a61..f3323daf 100644
--- a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.CreateAnnotationQueue.g.cs
+++ b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.CreateAnnotationQueue.g.cs
@@ -512,6 +512,7 @@ await CreateAnnotationQueueAsResponseAsync(
///
///
///
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -525,6 +526,7 @@ await CreateAnnotationQueueAsResponseAsync(
bool? commentsEnabled = default,
global::System.Collections.Generic.IList? feedbackDefinitionNames = default,
int? annotatorsPerItem = default,
+ int? lockTimeoutSeconds = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -539,6 +541,7 @@ await CreateAnnotationQueueAsResponseAsync(
CommentsEnabled = commentsEnabled,
FeedbackDefinitionNames = feedbackDefinitionNames,
AnnotatorsPerItem = annotatorsPerItem,
+ LockTimeoutSeconds = lockTimeoutSeconds,
};
await CreateAnnotationQueueAsync(
diff --git a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.GetAnnotationQueueLocks.g.cs b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.GetAnnotationQueueLocks.g.cs
new file mode 100644
index 00000000..287e5118
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.GetAnnotationQueueLocks.g.cs
@@ -0,0 +1,441 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AnnotationQueuesClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_GetAnnotationQueueLocksServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_GetAnnotationQueueLocksSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_GetAnnotationQueueLocksSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_GetAnnotationQueueLocksSecurityRequirement0,
+ };
+ partial void PrepareGetAnnotationQueueLocksArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid queueId);
+ partial void PrepareGetAnnotationQueueLocksRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid queueId);
+ partial void ProcessGetAnnotationQueueLocksResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessGetAnnotationQueueLocksResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Get all active locks for an annotation queue
+ /// Returns lock status for all actively locked items in the queue
+ ///
+ ///
+ /// 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 GetAnnotationQueueLocksAsync(
+ global::System.Guid queueId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await GetAnnotationQueueLocksAsResponseAsync(
+ queueId: queueId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Get all active locks for an annotation queue
+ /// Returns lock status for all actively locked items in the queue
+ ///
+ ///
+ /// 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> GetAnnotationQueueLocksAsResponseAsync(
+ global::System.Guid queueId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareGetAnnotationQueueLocksArguments(
+ httpClient: HttpClient,
+ queueId: ref queueId);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_GetAnnotationQueueLocksSecurityRequirements,
+ operationName: "GetAnnotationQueueLocksAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: $"/v1/private/annotation-queues/{queueId}/locks",
+ baseUri: ResolveBaseUri(
+ servers: s_GetAnnotationQueueLocksServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Get,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareGetAnnotationQueueLocksRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ queueId: queueId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAnnotationQueueLocks",
+ methodName: "GetAnnotationQueueLocksAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/locks\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAnnotationQueueLocks",
+ methodName: "GetAnnotationQueueLocksAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/locks\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAnnotationQueueLocks",
+ methodName: "GetAnnotationQueueLocksAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/locks\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessGetAnnotationQueueLocksResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAnnotationQueueLocks",
+ methodName: "GetAnnotationQueueLocksAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/locks\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "GetAnnotationQueueLocks",
+ methodName: "GetAnnotationQueueLocksAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/locks\"",
+ httpMethod: "GET",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessGetAnnotationQueueLocksResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.LocksResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.LocksResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.LockAnnotationQueueItem.g.cs b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.LockAnnotationQueueItem.g.cs
new file mode 100644
index 00000000..09af0059
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.LockAnnotationQueueItem.g.cs
@@ -0,0 +1,450 @@
+
+#nullable enable
+
+namespace Opik
+{
+ public partial class AnnotationQueuesClient
+ {
+
+ private static readonly global::Opik.AutoSDKServer[] s_LockAnnotationQueueItemServers = new global::Opik.AutoSDKServer[]
+ { new global::Opik.AutoSDKServer(
+ id: "http-localhost-api",
+ name: "Local server",
+ url: "http://localhost:5173/api",
+ description: "Local server"),
+ new global::Opik.AutoSDKServer(
+ id: "https-www-comet-com-opik-api",
+ name: "Opik Cloud",
+ url: "https://www.comet.com/opik/api",
+ description: "Opik Cloud"),
+ };
+
+
+ private static readonly global::Opik.EndPointSecurityRequirement s_LockAnnotationQueueItemSecurityRequirement0 =
+ new global::Opik.EndPointSecurityRequirement
+ {
+ Authorizations = new global::Opik.EndPointAuthorizationRequirement[]
+ { new global::Opik.EndPointAuthorizationRequirement
+ {
+ Type = "Http",
+ SchemeId = "HttpBearer",
+ Location = "Header",
+ Name = "Bearer",
+ FriendlyName = "Bearer",
+ },
+ },
+ };
+ private static readonly global::Opik.EndPointSecurityRequirement[] s_LockAnnotationQueueItemSecurityRequirements =
+ new global::Opik.EndPointSecurityRequirement[]
+ { s_LockAnnotationQueueItemSecurityRequirement0,
+ };
+ partial void PrepareLockAnnotationQueueItemArguments(
+ global::System.Net.Http.HttpClient httpClient,
+ ref global::System.Guid queueId,
+ ref global::System.Guid itemId);
+ partial void PrepareLockAnnotationQueueItemRequest(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpRequestMessage httpRequestMessage,
+ global::System.Guid queueId,
+ global::System.Guid itemId);
+ partial void ProcessLockAnnotationQueueItemResponse(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage);
+
+ partial void ProcessLockAnnotationQueueItemResponseContent(
+ global::System.Net.Http.HttpClient httpClient,
+ global::System.Net.Http.HttpResponseMessage httpResponseMessage,
+ ref string content);
+
+ ///
+ /// Create or extend annotation queue item lock
+ /// Claim an annotation queue item for the current user, or extend an existing lock
+ ///
+ ///
+ ///
+ /// 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 LockAnnotationQueueItemAsync(
+ global::System.Guid queueId,
+ global::System.Guid itemId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ var __response = await LockAnnotationQueueItemAsResponseAsync(
+ queueId: queueId,
+ itemId: itemId,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken
+ ).ConfigureAwait(false);
+
+ return __response.Body;
+ }
+ ///
+ /// Create or extend annotation queue item lock
+ /// Claim an annotation queue item for the current user, or extend an existing lock
+ ///
+ ///
+ ///
+ /// 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> LockAnnotationQueueItemAsResponseAsync(
+ global::System.Guid queueId,
+ global::System.Guid itemId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default)
+ {
+ PrepareArguments(
+ client: HttpClient);
+ PrepareLockAnnotationQueueItemArguments(
+ httpClient: HttpClient,
+ queueId: ref queueId,
+ itemId: ref itemId);
+
+
+ var __authorizations = global::Opik.EndPointSecurityResolver.ResolveAuthorizations(
+ availableAuthorizations: Authorizations,
+ securityRequirements: s_LockAnnotationQueueItemSecurityRequirements,
+ operationName: "LockAnnotationQueueItemAsync");
+
+ using var __timeoutCancellationTokenSource = global::Opik.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ cancellationToken: cancellationToken);
+ var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken;
+ var __effectiveReadResponseAsString = global::Opik.AutoSDKRequestOptionsSupport.GetReadResponseAsString(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ fallbackValue: ReadResponseAsString);
+ var __maxAttempts = global::Opik.AutoSDKRequestOptionsSupport.GetMaxAttempts(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ supportsRetry: true);
+
+ global::System.Net.Http.HttpRequestMessage __CreateHttpRequest()
+ {
+
+ var __pathBuilder = new global::Opik.PathBuilder(
+ path: $"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock",
+ baseUri: ResolveBaseUri(
+ servers: s_LockAnnotationQueueItemServers,
+ defaultBaseUrl: "http://localhost:5173/api"));
+ var __path = __pathBuilder.ToString();
+ __path = global::Opik.AutoSDKRequestOptionsSupport.AppendQueryParameters(
+ path: __path,
+ clientParameters: Options.QueryParameters,
+ requestParameters: requestOptions?.QueryParameters);
+ var __httpRequest = new global::System.Net.Http.HttpRequestMessage(
+ method: global::System.Net.Http.HttpMethod.Put,
+ requestUri: new global::System.Uri(__path, global::System.UriKind.RelativeOrAbsolute));
+#if NET6_0_OR_GREATER
+ __httpRequest.Version = global::System.Net.HttpVersion.Version11;
+ __httpRequest.VersionPolicy = global::System.Net.Http.HttpVersionPolicy.RequestVersionOrHigher;
+#endif
+
+ foreach (var __authorization in __authorizations)
+ {
+ if (__authorization.Type == "Http" ||
+ __authorization.Type == "OAuth2" ||
+ __authorization.Type == "OpenIdConnect")
+ {
+ __httpRequest.Headers.Authorization = new global::System.Net.Http.Headers.AuthenticationHeaderValue(
+ scheme: __authorization.Name,
+ parameter: __authorization.Value);
+ }
+ else if (__authorization.Type == "ApiKey" &&
+ __authorization.Location == "Header")
+ {
+ __httpRequest.Headers.Add(__authorization.Name, __authorization.Value);
+ }
+ }
+ global::Opik.AutoSDKRequestOptionsSupport.ApplyHeaders(
+ request: __httpRequest,
+ clientHeaders: Options.Headers,
+ requestHeaders: requestOptions?.Headers);
+
+ PrepareRequest(
+ client: HttpClient,
+ request: __httpRequest);
+ PrepareLockAnnotationQueueItemRequest(
+ httpClient: HttpClient,
+ httpRequestMessage: __httpRequest,
+ queueId: queueId!,
+ itemId: itemId!);
+
+ return __httpRequest;
+ }
+
+ global::System.Net.Http.HttpRequestMessage? __httpRequest = null;
+ global::System.Net.Http.HttpResponseMessage? __response = null;
+ var __attemptNumber = 0;
+ try
+ {
+ for (var __attempt = 1; __attempt <= __maxAttempts; __attempt++)
+ {
+ __attemptNumber = __attempt;
+ __httpRequest = __CreateHttpRequest();
+ await global::Opik.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "LockAnnotationQueueItem",
+ methodName: "LockAnnotationQueueItemAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ try
+ {
+ __response = await HttpClient.SendAsync(
+ request: __httpRequest,
+ completionOption: global::System.Net.Http.HttpCompletionOption.ResponseContentRead,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ }
+ catch (global::System.Net.Http.HttpRequestException __exception)
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: null,
+ attempt: __attempt);
+ var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested;
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "LockAnnotationQueueItem",
+ methodName: "LockAnnotationQueueItemAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: null,
+ exception: __exception,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attempt,
+ maxAttempts: __maxAttempts,
+ willRetry: __willRetry,
+ retryDelay: __willRetry ? __retryDelay : (global::System.TimeSpan?)null,
+ retryReason: "exception",
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ if (!__willRetry)
+ {
+ throw;
+ }
+
+ __httpRequest.Dispose();
+ __httpRequest = null;
+ await global::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ if (__response != null &&
+ __attempt < __maxAttempts &&
+ global::Opik.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode))
+ {
+ var __retryDelay = global::Opik.AutoSDKRequestOptionsSupport.GetRetryDelay(
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ response: __response,
+ attempt: __attempt);
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "LockAnnotationQueueItem",
+ methodName: "LockAnnotationQueueItemAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ 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::Opik.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync(
+ retryDelay: __retryDelay,
+ cancellationToken: __effectiveCancellationToken).ConfigureAwait(false);
+ continue;
+ }
+
+ break;
+ }
+
+ if (__response == null)
+ {
+ throw new global::System.InvalidOperationException("No response received.");
+ }
+
+ using (__response)
+ {
+
+ ProcessResponse(
+ client: HttpClient,
+ response: __response);
+ ProcessLockAnnotationQueueItemResponse(
+ httpClient: HttpClient,
+ httpResponseMessage: __response);
+ if (__response.IsSuccessStatusCode)
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "LockAnnotationQueueItem",
+ methodName: "LockAnnotationQueueItemAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+ else
+ {
+ await global::Opik.AutoSDKRequestOptionsSupport.OnAfterErrorAsync(
+ clientOptions: Options,
+ context: global::Opik.AutoSDKRequestOptionsSupport.CreateHookContext(
+ operationId: "LockAnnotationQueueItem",
+ methodName: "LockAnnotationQueueItemAsync",
+ pathTemplate: "$\"/v1/private/annotation-queues/{queueId}/items/{itemId}/lock\"",
+ httpMethod: "PUT",
+ baseUri: BaseUri,
+ request: __httpRequest!,
+ response: __response,
+ exception: null,
+ clientOptions: Options,
+ requestOptions: requestOptions,
+ attempt: __attemptNumber,
+ maxAttempts: __maxAttempts,
+ willRetry: false,
+ retryDelay: null,
+ retryReason: global::System.String.Empty,
+ cancellationToken: __effectiveCancellationToken)).ConfigureAwait(false);
+ }
+
+ if (__effectiveReadResponseAsString)
+ {
+ var __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ ProcessResponseContent(
+ client: HttpClient,
+ response: __response,
+ content: ref __content);
+ ProcessLockAnnotationQueueItemResponseContent(
+ httpClient: HttpClient,
+ httpResponseMessage: __response,
+ content: ref __content);
+
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+
+ var __value = global::Opik.LockResponse.FromJson(__content, JsonSerializerContext) ??
+ throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" ");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+ else
+ {
+ try
+ {
+ __response.EnsureSuccessStatusCode();
+ using var __content = await __response.Content.ReadAsStreamAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+
+ var __value = await global::Opik.LockResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ??
+ throw new global::System.InvalidOperationException("Response deserialization failed.");
+ return new global::Opik.AutoSDKHttpResponse(
+ statusCode: __response.StatusCode,
+ headers: global::Opik.AutoSDKHttpResponse.CreateHeaders(__response),
+ requestUri: __response.RequestMessage?.RequestUri,
+ body: __value);
+ }
+ catch (global::System.Exception __ex)
+ {
+ string? __content = null;
+ try
+ {
+ __content = await __response.Content.ReadAsStringAsync(
+ #if NET5_0_OR_GREATER
+ __effectiveCancellationToken
+ #endif
+ ).ConfigureAwait(false);
+ }
+ catch (global::System.Exception)
+ {
+ }
+
+ throw global::Opik.ApiException.Create(
+ statusCode: __response.StatusCode,
+ message: __content ?? __response.ReasonPhrase ?? string.Empty,
+ innerException: __ex,
+ responseBody: __content,
+ responseHeaders: global::System.Linq.Enumerable.ToDictionary(
+ __response.Headers,
+ h => h.Key,
+ h => h.Value));
+ }
+ }
+
+ }
+ }
+ finally
+ {
+ __httpRequest?.Dispose();
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs
index 9b883541..6b189770 100644
--- a/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs
+++ b/src/libs/Opik/Generated/Opik.AnnotationQueuesClient.UpdateAnnotationQueue.g.cs
@@ -482,6 +482,7 @@ await UpdateAnnotationQueueAsResponseAsync(
///
///
///
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -493,6 +494,7 @@ await UpdateAnnotationQueueAsResponseAsync(
bool? commentsEnabled = default,
global::System.Collections.Generic.IList? feedbackDefinitionNames = default,
int? annotatorsPerItem = default,
+ int? lockTimeoutSeconds = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -504,6 +506,7 @@ await UpdateAnnotationQueueAsResponseAsync(
CommentsEnabled = commentsEnabled,
FeedbackDefinitionNames = feedbackDefinitionNames,
AnnotatorsPerItem = annotatorsPerItem,
+ LockTimeoutSeconds = lockTimeoutSeconds,
};
await UpdateAnnotationQueueAsync(
diff --git a/src/libs/Opik/Generated/Opik.ExperimentsClient.ExperimentItemsBulk.g.cs b/src/libs/Opik/Generated/Opik.ExperimentsClient.ExperimentItemsBulk.g.cs
index 06c1f92c..fbab2a21 100644
--- a/src/libs/Opik/Generated/Opik.ExperimentsClient.ExperimentItemsBulk.g.cs
+++ b/src/libs/Opik/Generated/Opik.ExperimentsClient.ExperimentItemsBulk.g.cs
@@ -382,7 +382,7 @@ await ExperimentItemsBulkAsResponseAsync(
h => h.Key,
h => h.Value));
}
- // Experiment dataset mismatch
+ // Conflict
if ((int)__response.StatusCode == 409)
{
string? __content_409 = null;
@@ -545,6 +545,9 @@ await ExperimentItemsBulkAsResponseAsync(
///
/// Optional experiment ID. If provided, items will be added to the existing experiment and experimentName will be ignored. If not provided or experiment with that ID doesn't exist, a new experiment will be created with the given experimentName
///
+ ///
+ /// Project for traces auto-created from items that provide evaluate_task_result (i.e. without an explicit trace). If null, the default project is used; relying on this fallback is deprecated, please provide project_name explicitly.
+ ///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -554,6 +557,7 @@ await ExperimentItemsBulkAsResponseAsync(
string datasetName,
global::System.Collections.Generic.IList items,
global::System.Guid? experimentId = default,
+ string? projectName = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default)
{
@@ -562,6 +566,7 @@ await ExperimentItemsBulkAsResponseAsync(
ExperimentName = experimentName,
DatasetName = datasetName,
ExperimentId = experimentId,
+ ProjectName = projectName,
Items = items,
};
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendComposition.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendComposition.g.cs
new file mode 100644
index 00000000..2e192ca6
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendComposition.g.cs
@@ -0,0 +1,58 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAiSpendClient
+ {
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendCompositionAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSpendCompositionAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend composition
+ /// Get coding-agent token-flow composition (Sankey)
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendCompositionAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendLaneBreakdown.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendLaneBreakdown.g.cs
new file mode 100644
index 00000000..0925a5e0
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendLaneBreakdown.g.cs
@@ -0,0 +1,64 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAiSpendClient
+ {
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendLaneBreakdownAsync(
+ string laneKey,
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSpendLaneBreakdownAsResponseAsync(
+ string laneKey,
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend lane breakdown
+ /// Get the per-item breakdown for a composition lane
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendLaneBreakdownAsync(
+ string laneKey,
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendRecommendations.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendRecommendations.g.cs
new file mode 100644
index 00000000..b78f6ca9
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendRecommendations.g.cs
@@ -0,0 +1,58 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAiSpendClient
+ {
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendRecommendationsAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSpendRecommendationsAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend recommendations
+ /// Get coding-agent cost-saving recommendations
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendRecommendationsAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendSummary.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendSummary.g.cs
new file mode 100644
index 00000000..5dbd1261
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendSummary.g.cs
@@ -0,0 +1,58 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAiSpendClient
+ {
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendSummaryAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSpendSummaryAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend summary
+ /// Get coding-agent spend KPI summary
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendSummaryAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendUsers.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendUsers.g.cs
new file mode 100644
index 00000000..7c297ae8
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.GetSpendUsers.g.cs
@@ -0,0 +1,100 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAiSpendClient
+ {
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendUsersAsync(
+
+ global::Opik.SpendMetricRequest request,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetSpendUsersAsResponseAsync(
+
+ global::Opik.SpendMetricRequest request,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get spend user leaderboard
+ /// Get coding-agent spend per user
+ ///
+ ///
+ /// Default Value: 1
+ ///
+ ///
+ /// Default Value: 25
+ ///
+ ///
+ ///
+ /// Filter users by name or email (partial match, case insensitive)
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetSpendUsersAsync(
+ global::System.DateTime intervalStart,
+ global::System.DateTime intervalEnd,
+ int? page = default,
+ int? size = default,
+ string? sorting = default,
+ string? name = default,
+ global::System.Guid? projectId = default,
+ string? projectName = default,
+ string? userId = default,
+ bool? startBeforeEnd = default,
+ bool? projectProvided = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAiSpendClient.g.cs b/src/libs/Opik/Generated/Opik.IAiSpendClient.g.cs
new file mode 100644
index 00000000..9d891927
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAiSpendClient.g.cs
@@ -0,0 +1,70 @@
+
+#nullable enable
+
+namespace Opik
+{
+ ///
+ /// Coding-agent spend analytics
+ /// If no httpClient is provided, a new one will be created.
+ /// If no baseUri is provided, the default baseUri from OpenAPI spec will be used.
+ ///
+ public partial interface IAiSpendClient : global::System.IDisposable
+ {
+ ///
+ /// The HttpClient instance.
+ ///
+ public global::System.Net.Http.HttpClient HttpClient { get; }
+
+ ///
+ /// The base URL for the API.
+ ///
+ public System.Uri? BaseUri { get; }
+
+
+ ///
+ /// The server options available for this client.
+ ///
+ public global::System.Collections.Generic.IReadOnlyList AvailableServers { get; }
+
+ ///
+ /// The currently selected server for this client, if any.
+ ///
+ public global::Opik.AutoSDKServer? SelectedServer { get; set; }
+
+ ///
+ /// Selects one of the generated server options by id.
+ ///
+ public bool TrySelectServer(string serverId);
+
+ ///
+ /// Clears the currently selected server.
+ ///
+ public void ClearSelectedServer();
+
+ ///
+ /// The authorizations to use for the requests.
+ ///
+ public global::System.Collections.Generic.List Authorizations { get; }
+
+ ///
+ /// Gets or sets a value indicating whether the response content should be read as a string.
+ /// True by default in debug builds, false otherwise.
+ /// When false, successful responses are deserialized directly from the response stream for better performance.
+ /// Error responses are always read as strings regardless of this setting,
+ /// ensuring is populated.
+ ///
+ public bool ReadResponseAsString { get; set; }
+ ///
+ /// Client-wide request defaults such as headers, query parameters, retries, and timeout.
+ ///
+ public global::Opik.AutoSDKClientOptions Options { get; }
+
+
+ ///
+ ///
+ ///
+ global::System.Text.Json.Serialization.JsonSerializerContext JsonSerializerContext { get; set; }
+
+
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.CreateAnnotationQueue.g.cs b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.CreateAnnotationQueue.g.cs
index c94a4269..160d6c8b 100644
--- a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.CreateAnnotationQueue.g.cs
+++ b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.CreateAnnotationQueue.g.cs
@@ -43,6 +43,7 @@ public partial interface IAnnotationQueuesClient
///
///
///
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -56,6 +57,7 @@ public partial interface IAnnotationQueuesClient
bool? commentsEnabled = default,
global::System.Collections.Generic.IList? feedbackDefinitionNames = default,
int? annotatorsPerItem = default,
+ int? lockTimeoutSeconds = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.GetAnnotationQueueLocks.g.cs b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.GetAnnotationQueueLocks.g.cs
new file mode 100644
index 00000000..eaf06c13
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.GetAnnotationQueueLocks.g.cs
@@ -0,0 +1,32 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAnnotationQueuesClient
+ {
+ ///
+ /// Get all active locks for an annotation queue
+ /// Returns lock status for all actively locked items in the queue
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetAnnotationQueueLocksAsync(
+ global::System.Guid queueId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get all active locks for an annotation queue
+ /// Returns lock status for all actively locked items in the queue
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetAnnotationQueueLocksAsResponseAsync(
+ global::System.Guid queueId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.LockAnnotationQueueItem.g.cs b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.LockAnnotationQueueItem.g.cs
new file mode 100644
index 00000000..f81d1c26
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.LockAnnotationQueueItem.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IAnnotationQueuesClient
+ {
+ ///
+ /// Create or extend annotation queue item lock
+ /// Claim an annotation queue item for the current user, or extend an existing lock
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task LockAnnotationQueueItemAsync(
+ global::System.Guid queueId,
+ global::System.Guid itemId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Create or extend annotation queue item lock
+ /// Claim an annotation queue item for the current user, or extend an existing lock
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> LockAnnotationQueueItemAsResponseAsync(
+ global::System.Guid queueId,
+ global::System.Guid itemId,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.UpdateAnnotationQueue.g.cs b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.UpdateAnnotationQueue.g.cs
index b5763304..ab441411 100644
--- a/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.UpdateAnnotationQueue.g.cs
+++ b/src/libs/Opik/Generated/Opik.IAnnotationQueuesClient.UpdateAnnotationQueue.g.cs
@@ -45,6 +45,7 @@ public partial interface IAnnotationQueuesClient
///
///
///
+ ///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
///
@@ -56,6 +57,7 @@ public partial interface IAnnotationQueuesClient
bool? commentsEnabled = default,
global::System.Collections.Generic.IList? feedbackDefinitionNames = default,
int? annotatorsPerItem = default,
+ int? lockTimeoutSeconds = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Opik/Generated/Opik.IExperimentsClient.ExperimentItemsBulk.g.cs b/src/libs/Opik/Generated/Opik.IExperimentsClient.ExperimentItemsBulk.g.cs
index 526706e3..173e37af 100644
--- a/src/libs/Opik/Generated/Opik.IExperimentsClient.ExperimentItemsBulk.g.cs
+++ b/src/libs/Opik/Generated/Opik.IExperimentsClient.ExperimentItemsBulk.g.cs
@@ -39,6 +39,9 @@ public partial interface IExperimentsClient
///
/// Optional experiment ID. If provided, items will be added to the existing experiment and experimentName will be ignored. If not provided or experiment with that ID doesn't exist, a new experiment will be created with the given experimentName
///
+ ///
+ /// Project for traces auto-created from items that provide evaluate_task_result (i.e. without an explicit trace). If null, the default project is used; relying on this fallback is deprecated, please provide project_name explicitly.
+ ///
///
/// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
/// The token to cancel the operation with
@@ -48,6 +51,7 @@ public partial interface IExperimentsClient
string datasetName,
global::System.Collections.Generic.IList items,
global::System.Guid? experimentId = default,
+ string? projectName = default,
global::Opik.AutoSDKRequestOptions? requestOptions = default,
global::System.Threading.CancellationToken cancellationToken = default);
}
diff --git a/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Authorize.g.cs b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Authorize.g.cs
new file mode 100644
index 00000000..f29997d1
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Authorize.g.cs
@@ -0,0 +1,56 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IMcpOAuthClient
+ {
+ ///
+ /// OAuth Authorization Endpoint
+ /// OAuth 2.1 authorization endpoint (RFC 6749 ยง3.1). Validates the client and PKCE parameters, then redirects to the login or consent page
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task AuthorizeAsync(
+ string clientId,
+ string redirectUri,
+ string? responseType = default,
+ string? codeChallenge = default,
+ string? codeChallengeMethod = default,
+ string? resource = default,
+ string? state = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// OAuth Authorization Endpoint
+ /// OAuth 2.1 authorization endpoint (RFC 6749 ยง3.1). Validates the client and PKCE parameters, then redirects to the login or consent page
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task AuthorizeAsResponseAsync(
+ string clientId,
+ string redirectUri,
+ string? responseType = default,
+ string? codeChallenge = default,
+ string? codeChallengeMethod = default,
+ string? resource = default,
+ string? state = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Consent.g.cs b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Consent.g.cs
new file mode 100644
index 00000000..ad32f702
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.Consent.g.cs
@@ -0,0 +1,62 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IMcpOAuthClient
+ {
+ ///
+ /// Submit Authorization Consent
+ /// Submit the user's consent, issue an authorization code, and return the client redirect target
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ConsentAsync(
+
+ global::Opik.ConsentRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Submit Authorization Consent
+ /// Submit the user's consent, issue an authorization code, and return the client redirect target
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> ConsentAsResponseAsync(
+
+ global::Opik.ConsentRequest request,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Submit Authorization Consent
+ /// Submit the user's consent, issue an authorization code, and return the client redirect target
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task ConsentAsync(
+ string clientId,
+ string redirectUri,
+ string codeChallenge,
+ string codeChallengeMethod,
+ string resource,
+ string? state = default,
+ string? workspaceId = default,
+ string? workspaceName = default,
+ string? csrf = default,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IMcpOAuthClient.GetAuthorizeContext.g.cs b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.GetAuthorizeContext.g.cs
new file mode 100644
index 00000000..33f38b09
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.IMcpOAuthClient.GetAuthorizeContext.g.cs
@@ -0,0 +1,36 @@
+#nullable enable
+
+namespace Opik
+{
+ public partial interface IMcpOAuthClient
+ {
+ ///
+ /// Get Authorization Consent Context
+ /// Get the client details, eligible workspaces, and a CSRF token used to render the consent screen
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task GetAuthorizeContextAsync(
+ string clientId,
+ string redirectUri,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ ///
+ /// Get Authorization Consent Context
+ /// Get the client details, eligible workspaces, and a CSRF token used to render the consent screen
+ ///
+ ///
+ ///
+ /// Per-request overrides such as headers, query parameters, timeout, retries, and response buffering.
+ /// The token to cancel the operation with
+ ///
+ global::System.Threading.Tasks.Task> GetAuthorizeContextAsResponseAsync(
+ string clientId,
+ string redirectUri,
+ global::Opik.AutoSDKRequestOptions? requestOptions = default,
+ global::System.Threading.CancellationToken cancellationToken = default);
+ }
+}
\ No newline at end of file
diff --git a/src/libs/Opik/Generated/Opik.IOpikClient.g.cs b/src/libs/Opik/Generated/Opik.IOpikClient.g.cs
index 5d54aef4..9446c8a9 100644
--- a/src/libs/Opik/Generated/Opik.IOpikClient.g.cs
+++ b/src/libs/Opik/Generated/Opik.IOpikClient.g.cs
@@ -93,6 +93,11 @@ public partial interface IOpikClient : global::System.IDisposable
///
public AgentConfigsClient AgentConfigs { get; }
+ ///
+ /// Coding-agent spend analytics.
+ ///
+ public AiSpendClient AiSpend { get; }
+
///
/// Alert resources.
///
diff --git a/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpact.g.cs b/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpact.g.cs
new file mode 100644
index 00000000..b5251054
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpact.g.cs
@@ -0,0 +1,53 @@
+#nullable enable
+
+namespace Opik.JsonConverters
+{
+ ///
+ public sealed class ItemImpactJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Opik.ItemImpact Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Opik.ItemImpactExtensions.ToEnum(stringValue) ?? default;
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Opik.ItemImpact)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Opik.ItemImpact);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Opik.ItemImpact value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ writer.WriteStringValue(global::Opik.ItemImpactExtensions.ToValueString(value));
+ }
+ }
+}
diff --git a/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpactNullable.g.cs b/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpactNullable.g.cs
new file mode 100644
index 00000000..b07c69e3
--- /dev/null
+++ b/src/libs/Opik/Generated/Opik.JsonConverters.ItemImpactNullable.g.cs
@@ -0,0 +1,60 @@
+#nullable enable
+
+namespace Opik.JsonConverters
+{
+ ///
+ public sealed class ItemImpactNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter
+ {
+ ///
+ public override global::Opik.ItemImpact? Read(
+ ref global::System.Text.Json.Utf8JsonReader reader,
+ global::System.Type typeToConvert,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ switch (reader.TokenType)
+ {
+ case global::System.Text.Json.JsonTokenType.String:
+ {
+ var stringValue = reader.GetString();
+ if (stringValue != null)
+ {
+ return global::Opik.ItemImpactExtensions.ToEnum(stringValue);
+ }
+
+ break;
+ }
+ case global::System.Text.Json.JsonTokenType.Number:
+ {
+ var numValue = reader.GetInt32();
+ return (global::Opik.ItemImpact)numValue;
+ }
+ case global::System.Text.Json.JsonTokenType.Null:
+ {
+ return default(global::Opik.ItemImpact?);
+ }
+ default:
+ throw new global::System.ArgumentOutOfRangeException(nameof(reader));
+ }
+
+ return default;
+ }
+
+ ///
+ public override void Write(
+ global::System.Text.Json.Utf8JsonWriter writer,
+ global::Opik.ItemImpact? value,
+ global::System.Text.Json.JsonSerializerOptions options)
+ {
+ writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer));
+
+ if (value == null)
+ {
+ writer.WriteNullValue();
+ }
+ else
+ {
+ writer.WriteStringValue(global::Opik.ItemImpactExtensions.ToValueString(value.Value));
+ }
+ }
+ }
+}
diff --git a/src/libs/Opik/Generated/Opik.JsonSerializerContext.g.cs b/src/libs/Opik/Generated/Opik.JsonSerializerContext.g.cs
index 6cc68f9a..6ad6279d 100644
--- a/src/libs/Opik/Generated/Opik.JsonSerializerContext.g.cs
+++ b/src/libs/Opik/Generated/Opik.JsonSerializerContext.g.cs
@@ -37,6 +37,10 @@ namespace Opik
typeof(global::Opik.JsonConverters.AgentConfigValueHistoryTypeNullableJsonConverter),
+ typeof(global::Opik.JsonConverters.ItemImpactJsonConverter),
+
+ typeof(global::Opik.JsonConverters.ItemImpactNullableJsonConverter),
+
typeof(global::Opik.JsonConverters.AlertAlertTypeJsonConverter),
typeof(global::Opik.JsonConverters.AlertAlertTypeNullableJsonConverter),
@@ -912,8 +916,13 @@ namespace Opik
typeof(global::Opik.JsonConverters.UnixTimestampJsonConverter),
})]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.JsonSerializerContextTypes))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AuthorizationServerMetadata))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ConsentResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(string))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ConsentRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AuthorizeContext))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceInfo))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AuthorizationServerMetadata))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.BiInformation))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(long))]
@@ -955,8 +964,27 @@ namespace Opik
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ErrorMessageHistory))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AgentConfigRemoveValues))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AgentConfigEnvSetByName))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Alert))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.HarnessEntry))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Lane))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(bool))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Side))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendCompositionResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendMetricRequest))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Item))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ItemImpact), TypeInfoPropertyName = "ItemImpact2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendBreakdownResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendRecommendationsResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Result))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceMetricsSummaryResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendUserPage))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.SpendUserRow))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Alert))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AlertAlertType), TypeInfoPropertyName = "AlertAlertType2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Webhook))]
@@ -1000,7 +1028,6 @@ namespace Opik
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnnotationQueueReviewer))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.FeedbackScoreAverage))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(double))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnnotationQueueWrite))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnnotationQueueWriteScope), TypeInfoPropertyName = "AnnotationQueueWriteScope2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnnotationQueueBatch))]
@@ -1015,6 +1042,10 @@ namespace Opik
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.FeedbackScoreAveragePublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ItemLockInfo))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.LocksResponse))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.LockResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnnotationQueueUpdate))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AssertionResultBatch))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AssertionResultBatchEntityType), TypeInfoPropertyName = "AssertionResultBatchEntityType2")]
@@ -1384,33 +1415,6 @@ namespace Opik
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ChunkedOutputJsonNodeType))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetItemStreamRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetUpdate))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetUpdateVisibility), TypeInfoPropertyName = "DatasetUpdateVisibility2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionDiff))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionDiffStats))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionTag))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionPagePublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionRestorePublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionRetrieveRequestPublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionUpdatePublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Environment))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentWrite))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentPagePublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentPublic))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentUpdate))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentBatchUpdate))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdate))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentScore))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdateType), TypeInfoPropertyName = "ExperimentUpdateType2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdateStatus), TypeInfoPropertyName = "ExperimentUpdateStatus2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AssertionScoreAverage))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Experiment))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentType), TypeInfoPropertyName = "ExperimentType2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentEvaluationMethod), TypeInfoPropertyName = "ExperimentEvaluationMethod2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.PercentageValues))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
internal sealed partial class SourceGenerationContextChunk0 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
@@ -1446,6 +1450,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
typeof(global::Opik.JsonConverters.AgentConfigValueHistoryTypeNullableJsonConverter),
+ typeof(global::Opik.JsonConverters.ItemImpactJsonConverter),
+
+ typeof(global::Opik.JsonConverters.ItemImpactNullableJsonConverter),
+
typeof(global::Opik.JsonConverters.AlertAlertTypeJsonConverter),
typeof(global::Opik.JsonConverters.AlertAlertTypeNullableJsonConverter),
@@ -2320,6 +2328,33 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
typeof(global::Opik.JsonConverters.UnixTimestampJsonConverter),
})]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetUpdateVisibility), TypeInfoPropertyName = "DatasetUpdateVisibility2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionDiff))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionDiffStats))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionTag))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionPagePublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionRestorePublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionRetrieveRequestPublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DatasetVersionUpdatePublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Environment))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentWrite))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentPagePublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentPublic))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.EnvironmentUpdate))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentBatchUpdate))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdate))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentScore))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdateType), TypeInfoPropertyName = "ExperimentUpdateType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentUpdateStatus), TypeInfoPropertyName = "ExperimentUpdateStatus2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AssertionScoreAverage))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Experiment))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentType), TypeInfoPropertyName = "ExperimentType2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentEvaluationMethod), TypeInfoPropertyName = "ExperimentEvaluationMethod2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.PercentageValues))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.ExperimentStatus), TypeInfoPropertyName = "ExperimentStatus2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.PromptVersionLink))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
@@ -2741,16 +2776,13 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Permission))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceUserPermissions))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.Result))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceMetricsSummaryRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.DataPointDouble))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceMetricResponse))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceMetricRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceConfiguration))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceVersion))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceVersionOpikVersion), TypeInfoPropertyName = "WorkspaceVersionOpikVersion2")]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.WorkspaceMetricsSummaryResponse))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.CreateDatasetItemsFromCsvRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.CreateDatasetItemsFromJsonRequest))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.CreateDatasetItemsFromJsonRequestFormat), TypeInfoPropertyName = "CreateDatasetItemsFromJsonRequestFormat2")]
@@ -2782,6 +2814,7 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnyOf), TypeInfoPropertyName = "AnyOfTraceThreadErrorMessage2")]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Opik.AnyOf), TypeInfoPropertyName = "AnyOfTracePublicErrorMessagePublic2")]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
@@ -2791,35 +2824,10 @@ internal sealed partial class SourceGenerationContextChunk0 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
internal sealed partial class SourceGenerationContextChunk1 : global::System.Text.Json.Serialization.JsonSerializerContext
{
}
@@ -2855,6 +2863,10 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex
typeof(global::Opik.JsonConverters.AgentConfigValueHistoryTypeNullableJsonConverter),
+ typeof(global::Opik.JsonConverters.ItemImpactJsonConverter),
+
+ typeof(global::Opik.JsonConverters.ItemImpactNullableJsonConverter),
+
typeof(global::Opik.JsonConverters.AlertAlertTypeJsonConverter),
typeof(global::Opik.JsonConverters.AlertAlertTypeNullableJsonConverter),
@@ -3729,6 +3741,36 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex
typeof(global::Opik.JsonConverters.UnixTimestampJsonConverter),
})]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
+ [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
@@ -3839,7 +3881,6 @@ internal sealed partial class SourceGenerationContextChunk1 : global::System.Tex
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
- [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List>))]
[global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.List))]
@@ -3907,6 +3948,8 @@ private SourceGenerationContext(global::System.Text.Json.JsonSerializerOptions o
options.Converters.Add(new global::Opik.JsonConverters.AgentBlueprintHistoryTypeNullableJsonConverter());
options.Converters.Add(new global::Opik.JsonConverters.AgentConfigValueHistoryTypeJsonConverter());
options.Converters.Add(new global::Opik.JsonConverters.AgentConfigValueHistoryTypeNullableJsonConverter());
+ options.Converters.Add(new global::Opik.JsonConverters.ItemImpactJsonConverter());
+ options.Converters.Add(new global::Opik.JsonConverters.ItemImpactNullableJsonConverter());
options.Converters.Add(new global::Opik.JsonConverters.AlertAlertTypeJsonConverter());
options.Converters.Add(new global::Opik.JsonConverters.AlertAlertTypeNullableJsonConverter());
options.Converters.Add(new global::Opik.JsonConverters.AlertTriggerEventTypeJsonConverter());
diff --git a/src/libs/Opik/Generated/Opik.JsonSerializerContextTypes.g.cs b/src/libs/Opik/Generated/Opik.JsonSerializerContextTypes.g.cs
index 36305276..5a1d4e4a 100644
--- a/src/libs/Opik/Generated/Opik.JsonSerializerContextTypes.g.cs
+++ b/src/libs/Opik/Generated/Opik.JsonSerializerContextTypes.g.cs
@@ -28,7 +28,7 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::Opik.AuthorizationServerMetadata? Type0 { get; set; }
+ public global::Opik.ConsentResponse? Type0 { get; set; }
///
///
///
@@ -36,4479 +36,4595 @@ public sealed partial class JsonSerializerContextTypes
///
///
///
- public global::System.Collections.Generic.IList? Type2 { get; set; }
+ public global::Opik.ConsentRequest? Type2 { get; set; }
///
///
///
- public global::Opik.BiInformation? Type3 { get; set; }
+ public global::Opik.AuthorizeContext? Type3 { get; set; }
///
///
///
- public long? Type4 { get; set; }
+ public global::System.Collections.Generic.IList? Type4 { get; set; }
///
///
///
- public global::Opik.BiInformationResponse? Type5 { get; set; }
+ public global::Opik.WorkspaceInfo? Type5 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type6 { get; set; }
+ public global::Opik.AuthorizationServerMetadata? Type6 { get; set; }
///
///
///
- public global::Opik.SpansCountResponse? Type7 { get; set; }
+ public global::System.Collections.Generic.IList? Type7 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type8 { get; set; }
+ public global::Opik.BiInformation? Type8 { get; set; }
///
///
///
- public global::Opik.WorkspaceSpansCount? Type9 { get; set; }
+ public long? Type9 { get; set; }
///
///
///
- public int? Type10 { get; set; }
+ public global::Opik.BiInformationResponse? Type10 { get; set; }
///
///
///
- public global::Opik.TraceCountResponse? Type11 { get; set; }
+ public global::System.Collections.Generic.IList? Type11 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type12 { get; set; }
+ public global::Opik.SpansCountResponse? Type12 { get; set; }
///
///
///
- public global::Opik.WorkspaceTraceCount? Type13 { get; set; }
+ public global::System.Collections.Generic.IList? Type13 { get; set; }
///
///
///
- public global::Opik.ErrorMessageWrite? Type14 { get; set; }
+ public global::Opik.WorkspaceSpansCount? Type14 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintWrite? Type15 { get; set; }
+ public int? Type15 { get; set; }
///
///
///
- public global::System.Guid? Type16 { get; set; }
+ public global::Opik.TraceCountResponse? Type16 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintWriteType? Type17 { get; set; }
+ public global::System.Collections.Generic.IList? Type17 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type18 { get; set; }
+ public global::Opik.WorkspaceTraceCount? Type18 { get; set; }
///
///
///
- public global::Opik.AgentConfigValueWrite? Type19 { get; set; }
+ public global::Opik.ErrorMessageWrite? Type19 { get; set; }
///
///
///
- public global::Opik.AgentConfigCreateWrite? Type20 { get; set; }
+ public global::Opik.AgentBlueprintWrite? Type20 { get; set; }
///
///
///
- public global::Opik.AgentConfigValueWriteType? Type21 { get; set; }
+ public global::System.Guid? Type21 { get; set; }
///
///
///
- public global::Opik.ErrorMessage? Type22 { get; set; }
+ public global::Opik.AgentBlueprintWriteType? Type22 { get; set; }
///
///
///
- public global::Opik.AgentConfigEnv? Type23 { get; set; }
+ public global::System.Collections.Generic.IList? Type23 { get; set; }
///
///
///
- public global::System.DateTime? Type24 { get; set; }
+ public global::Opik.AgentConfigValueWrite? Type24 { get; set; }
///
///
///
- public global::Opik.AgentConfigEnvUpdate? Type25 { get; set; }
+ public global::Opik.AgentConfigCreateWrite? Type25 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type26 { get; set; }
+ public global::Opik.AgentConfigValueWriteType? Type26 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintPublic? Type27 { get; set; }
+ public global::Opik.ErrorMessage? Type27 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintPublicType? Type28 { get; set; }
+ public global::Opik.AgentConfigEnv? Type28 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type29 { get; set; }
+ public global::System.DateTime? Type29 { get; set; }
///
///
///
- public global::Opik.AgentConfigValuePublic? Type30 { get; set; }
+ public global::Opik.AgentConfigEnvUpdate? Type30 { get; set; }
///
///
///
- public global::Opik.AgentConfigValuePublicType? Type31 { get; set; }
+ public global::System.Collections.Generic.IList? Type31 { get; set; }
///
///
///
- public global::Opik.ErrorMessagePublic? Type32 { get; set; }
+ public global::Opik.AgentBlueprintPublic? Type32 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintHistory? Type33 { get; set; }
+ public global::Opik.AgentBlueprintPublicType? Type33 { get; set; }
///
///
///
- public global::Opik.AgentBlueprintHistoryType? Type34 { get; set; }
+ public global::System.Collections.Generic.IList? Type34 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type35 { get; set; }
+ public global::Opik.AgentConfigValuePublic? Type35 { get; set; }
///
///
///
- public global::Opik.AgentConfigValueHistory? Type36 { get; set; }
+ public global::Opik.AgentConfigValuePublicType? Type36 { get; set; }
///
///
///
- public global::Opik.AgentConfigValueHistoryType? Type37 { get; set; }
+ public global::Opik.ErrorMessagePublic? Type37 { get; set; }
///
///
///
- public global::Opik.BlueprintPageHistory? Type38 { get; set; }
+ public global::Opik.AgentBlueprintHistory? Type38 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type39 { get; set; }
+ public global::Opik.AgentBlueprintHistoryType? Type39 { get; set; }
///
///
///
- public global::Opik.ErrorMessageHistory? Type40 { get; set; }
+ public global::System.Collections.Generic.IList? Type40 { get; set; }
///
///
///
- public global::Opik.AgentConfigRemoveValues? Type41 { get; set; }
+ public global::Opik.AgentConfigValueHistory? Type41 { get; set; }
///
///
///
- public global::Opik.AgentConfigEnvSetByName? Type42 { get; set; }
+ public global::Opik.AgentConfigValueHistoryType? Type42 { get; set; }
///
///
///
- public global::Opik.Alert? Type43 { get; set; }
+ public global::Opik.BlueprintPageHistory? Type43 { get; set; }
///
///
///
- public bool? Type44 { get; set; }
+ public global::System.Collections.Generic.IList? Type44 { get; set; }
///
///
///
- public global::Opik.AlertAlertType? Type45 { get; set; }
+ public global::Opik.ErrorMessageHistory? Type45 { get; set; }
///
///
///
- public global::System.Collections.Generic.Dictionary? Type46 { get; set; }
+ public global::Opik.AgentConfigRemoveValues? Type46 { get; set; }
///
///
///
- public global::Opik.Webhook? Type47 { get; set; }
+ public global::Opik.AgentConfigEnvSetByName? Type47 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type48 { get; set; }
+ public global::Opik.HarnessEntry? Type48 { get; set; }
///
///
///
- public global::Opik.AlertTrigger? Type49 { get; set; }
+ public double? Type49 { get; set; }
///
///
///
- public global::Opik.AlertTriggerEventType? Type50 { get; set; }
+ public global::Opik.Lane? Type50 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type51 { get; set; }
+ public bool? Type51 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfig? Type52 { get; set; }
+ public global::Opik.Side? Type52 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfigType? Type53 { get; set; }
+ public global::System.Collections.Generic.IList? Type53 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfigWrite? Type54 { get; set; }
+ public global::Opik.SpendCompositionResponse? Type54 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfigWriteType? Type55 { get; set; }
+ public global::System.Collections.Generic.IList? Type55 { get; set; }
///
///
///
- public global::Opik.AlertTriggerWrite? Type56 { get; set; }
+ public global::Opik.SpendMetricRequest? Type56 { get; set; }
///
///
///
- public global::Opik.AlertTriggerWriteEventType? Type57 { get; set; }
+ public global::Opik.Item? Type57 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type58 { get; set; }
+ public global::Opik.ItemImpact? Type58 { get; set; }
///
///
///
- public global::Opik.AlertWrite? Type59 { get; set; }
+ public global::Opik.SpendBreakdownResponse? Type59 { get; set; }
///
///
///
- public global::Opik.AlertWriteAlertType? Type60 { get; set; }
+ public global::System.Collections.Generic.IList? Type60 { get; set; }
///
///
///
- public global::Opik.WebhookWrite? Type61 { get; set; }
+ public global::Opik.SpendRecommendationsResponse? Type61 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type62 { get; set; }
+ public global::Opik.Result? Type62 { get; set; }
///
///
///
- public global::Opik.BatchDelete? Type63 { get; set; }
+ public global::Opik.WorkspaceMetricsSummaryResponse? Type63 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type64 { get; set; }
+ public global::System.Collections.Generic.IList? Type64 { get; set; }
///
///
///
- public global::Opik.AlertPagePublic? Type65 { get; set; }
+ public global::Opik.SpendUserPage? Type65 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type66 { get; set; }
+ public global::System.Collections.Generic.IList? Type66 { get; set; }
///
///
///
- public global::Opik.AlertPublic? Type67 { get; set; }
+ public global::Opik.SpendUserRow? Type67 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfigPublic? Type68 { get; set; }
+ public global::Opik.Alert? Type68 { get; set; }
///
///
///
- public global::Opik.AlertTriggerConfigPublicType? Type69 { get; set; }
+ public global::Opik.AlertAlertType? Type69 { get; set; }
///
///
///
- public global::Opik.AlertTriggerPublic? Type70 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type70 { get; set; }
///
///
///
- public global::Opik.AlertTriggerPublicEventType? Type71 { get; set; }
+ public global::Opik.Webhook? Type71 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type72 { get; set; }
+ public global::System.Collections.Generic.IList? Type72 { get; set; }
///
///
///
- public global::Opik.AlertPublicAlertType? Type73 { get; set; }
+ public global::Opik.AlertTrigger? Type73 { get; set; }
///
///
///
- public global::Opik.WebhookPublic? Type74 { get; set; }
+ public global::Opik.AlertTriggerEventType? Type74 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type75 { get; set; }
+ public global::System.Collections.Generic.IList? Type75 { get; set; }
///
///
///
- public global::Opik.WebhookExamples? Type76 { get; set; }
+ public global::Opik.AlertTriggerConfig? Type76 { get; set; }
///
///
///
- public global::System.Collections.Generic.Dictionary? Type77 { get; set; }
+ public global::Opik.AlertTriggerConfigType? Type77 { get; set; }
///
///
///
- public object? Type78 { get; set; }
+ public global::Opik.AlertTriggerConfigWrite? Type78 { get; set; }
///
///
///
- public global::Opik.WebhookTestResult? Type79 { get; set; }
+ public global::Opik.AlertTriggerConfigWriteType? Type79 { get; set; }
///
///
///
- public global::Opik.WebhookTestResultStatus? Type80 { get; set; }
+ public global::Opik.AlertTriggerWrite? Type80 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueItemIds? Type81 { get; set; }
+ public global::Opik.AlertTriggerWriteEventType? Type81 { get; set; }
///
///
///
- public global::Opik.AnnotationQueue? Type82 { get; set; }
+ public global::System.Collections.Generic.IList? Type82 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueScope? Type83 { get; set; }
+ public global::Opik.AlertWrite? Type83 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type84 { get; set; }
+ public global::Opik.AlertWriteAlertType? Type84 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueReviewer? Type85 { get; set; }
+ public global::Opik.WebhookWrite? Type85 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type86 { get; set; }
+ public global::System.Collections.Generic.IList? Type86 { get; set; }
///
///
///
- public global::Opik.FeedbackScoreAverage? Type87 { get; set; }
+ public global::Opik.BatchDelete? Type87 { get; set; }
///
///
///
- public double? Type88 { get; set; }
+ public global::System.Collections.Generic.IList? Type88 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueWrite? Type89 { get; set; }
+ public global::Opik.AlertPagePublic? Type89 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueWriteScope? Type90 { get; set; }
+ public global::System.Collections.Generic.IList? Type90 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueBatch? Type91 { get; set; }
+ public global::Opik.AlertPublic? Type91 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type92 { get; set; }
+ public global::Opik.AlertTriggerConfigPublic? Type92 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueBatchWrite? Type93 { get; set; }
+ public global::Opik.AlertTriggerConfigPublicType? Type93 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type94 { get; set; }
+ public global::Opik.AlertTriggerPublic? Type94 { get; set; }
///
///
///
- public global::Opik.AnnotationQueuePagePublic? Type95 { get; set; }
+ public global::Opik.AlertTriggerPublicEventType? Type95 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type96 { get; set; }
+ public global::System.Collections.Generic.IList? Type96 { get; set; }
///
///
///
- public global::Opik.AnnotationQueuePublic? Type97 { get; set; }
+ public global::Opik.AlertPublicAlertType? Type97 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueReviewerPublic? Type98 { get; set; }
+ public global::Opik.WebhookPublic? Type98 { get; set; }
///
///
///
- public global::Opik.AnnotationQueuePublicScope? Type99 { get; set; }
+ public global::System.Collections.Generic.IList? Type99 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type100 { get; set; }
+ public global::Opik.WebhookExamples? Type100 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type101 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type101 { get; set; }
///
///
///
- public global::Opik.FeedbackScoreAveragePublic? Type102 { get; set; }
+ public object? Type102 { get; set; }
///
///
///
- public global::Opik.AnnotationQueueUpdate? Type103 { get; set; }
+ public global::Opik.WebhookTestResult? Type103 { get; set; }
///
///
///
- public global::Opik.AssertionResultBatch? Type104 { get; set; }
+ public global::Opik.WebhookTestResultStatus? Type104 { get; set; }
///
///
///
- public global::Opik.AssertionResultBatchEntityType? Type105 { get; set; }
+ public global::Opik.AnnotationQueueItemIds? Type105 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type106 { get; set; }
+ public global::Opik.AnnotationQueue? Type106 { get; set; }
///
///
///
- public global::Opik.AssertionResultBatchItem? Type107 { get; set; }
+ public global::Opik.AnnotationQueueScope? Type107 { get; set; }
///
///
///
- public global::Opik.AssertionResultBatchItemStatus? Type108 { get; set; }
+ public global::System.Collections.Generic.IList? Type108 { get; set; }
///
///
///
- public global::Opik.AssertionResultBatchItemSource? Type109 { get; set; }
+ public global::Opik.AnnotationQueueReviewer? Type109 { get; set; }
///
///
///
- public global::Opik.Attachment? Type110 { get; set; }
+ public global::System.Collections.Generic.IList? Type110 { get; set; }
///
///
///
- public global::Opik.AttachmentPage? Type111 { get; set; }
+ public global::Opik.FeedbackScoreAverage? Type111 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type112 { get; set; }
+ public global::Opik.AnnotationQueueWrite? Type112 { get; set; }
///
///
///
- public global::Opik.CompleteMultipartUploadRequest? Type113 { get; set; }
+ public global::Opik.AnnotationQueueWriteScope? Type113 { get; set; }
///
///
///
- public global::Opik.CompleteMultipartUploadRequestEntityType? Type114 { get; set; }
+ public global::Opik.AnnotationQueueBatch? Type114 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type115 { get; set; }
+ public global::System.Collections.Generic.IList? Type115 { get; set; }
///
///
///
- public global::Opik.MultipartUploadPart? Type116 { get; set; }
+ public global::Opik.AnnotationQueueBatchWrite? Type116 { get; set; }
///
///
///
- public global::Opik.DeleteAttachmentsRequest? Type117 { get; set; }
+ public global::System.Collections.Generic.IList? Type117 { get; set; }
///
///
///
- public global::Opik.DeleteAttachmentsRequestEntityType? Type118 { get; set; }
+ public global::Opik.AnnotationQueuePagePublic? Type118 { get; set; }
///
///
///
- public global::Opik.StartMultipartUploadResponse? Type119 { get; set; }
+ public global::System.Collections.Generic.IList? Type119 { get; set; }
///
///
///
- public global::Opik.StartMultipartUploadRequest? Type120 { get; set; }
+ public global::Opik.AnnotationQueuePublic? Type120 { get; set; }
///
///
///
- public global::Opik.StartMultipartUploadRequestEntityType? Type121 { get; set; }
+ public global::Opik.AnnotationQueueReviewerPublic? Type121 { get; set; }
///
///
///
- public global::Opik.AuthDetailsHolder? Type122 { get; set; }
+ public global::Opik.AnnotationQueuePublicScope? Type122 { get; set; }
///
///
///
- public global::Opik.WorkspaceNameHolder? Type123 { get; set; }
+ public global::System.Collections.Generic.IList? Type123 { get; set; }
///
///
///
- public global::Opik.AudioUrl? Type124 { get; set; }
+ public global::System.Collections.Generic.IList? Type124 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluator? Type125 { get; set; }
+ public global::Opik.FeedbackScoreAveragePublic? Type125 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type126 { get; set; }
+ public global::Opik.ItemLockInfo? Type126 { get; set; }
///
///
///
- public global::Opik.ProjectReference? Type127 { get; set; }
+ public global::Opik.LocksResponse? Type127 { get; set; }
///
///
///
- public float? Type128 { get; set; }
+ public global::System.Collections.Generic.Dictionary? Type128 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorType? Type129 { get; set; }
+ public global::Opik.LockResponse? Type129 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorAction? Type130 { get; set; }
+ public global::Opik.AnnotationQueueUpdate? Type130 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorDiscriminator? Type131 { get; set; }
+ public global::Opik.AssertionResultBatch? Type131 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorDiscriminatorType? Type132 { get; set; }
+ public global::Opik.AssertionResultBatchEntityType? Type132 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorLlmAsJudge? Type133 { get; set; }
+ public global::System.Collections.Generic.IList? Type133 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorLlmAsJudgeVariant2? Type134 { get; set; }
+ public global::Opik.AssertionResultBatchItem? Type134 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type135 { get; set; }
+ public global::Opik.AssertionResultBatchItemStatus? Type135 { get; set; }
///
///
///
- public global::Opik.TraceFilter? Type136 { get; set; }
+ public global::Opik.AssertionResultBatchItemSource? Type136 { get; set; }
///
///
///
- public global::Opik.LlmAsJudgeCode? Type137 { get; set; }
+ public global::Opik.Attachment? Type137 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorSpanLlmAsJudge? Type138 { get; set; }
+ public global::Opik.AttachmentPage? Type138 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorSpanLlmAsJudgeVariant2? Type139 { get; set; }
+ public global::System.Collections.Generic.IList? Type139 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type140 { get; set; }
+ public global::Opik.CompleteMultipartUploadRequest? Type140 { get; set; }
///
///
///
- public global::Opik.SpanFilter? Type141 { get; set; }
+ public global::Opik.CompleteMultipartUploadRequestEntityType? Type141 { get; set; }
///
///
///
- public global::Opik.SpanLlmAsJudgeCode? Type142 { get; set; }
+ public global::System.Collections.Generic.IList? Type142 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorSpanUserDefinedMetricPython? Type143 { get; set; }
+ public global::Opik.MultipartUploadPart? Type143 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorSpanUserDefinedMetricPythonVariant2? Type144 { get; set; }
+ public global::Opik.DeleteAttachmentsRequest? Type144 { get; set; }
///
///
///
- public global::Opik.SpanUserDefinedMetricPythonCode? Type145 { get; set; }
+ public global::Opik.DeleteAttachmentsRequestEntityType? Type145 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorTraceThreadLlmAsJudge? Type146 { get; set; }
+ public global::Opik.StartMultipartUploadResponse? Type146 { get; set; }
///
///
///
- public global::Opik.AutomationRuleEvaluatorTraceThreadLlmAsJudgeVariant2? Type147 { get; set; }
+ public global::Opik.StartMultipartUploadRequest? Type147 { get; set; }
///
///
///
- public global::System.Collections.Generic.IList? Type148 { get; set; }
+ public global::Opik.StartMultipartUploadRequestEntityType? Type148 { get; set; }
///