diff --git a/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs b/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs index 0af127d..9f0e34d 100644 --- a/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/APIEndpointsApiGroupCommand.g.cs @@ -16,6 +16,7 @@ public static Command Create() command.Subcommands.Add(ApiEndpointsGetProjectCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsGetStatusCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsImportProjectMediaCommandApiCommand.Create()); + command.Subcommands.Add(ApiEndpointsListAgentModelsCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsListJobsCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsListProjectsCommandApiCommand.Create()); command.Subcommands.Add(ApiEndpointsPublishJobCommandApiCommand.Create()); diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsAgentEditJobCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsAgentEditJobCommandApiCommand.g.cs index 144cdfd..7e03868 100644 --- a/src/cli/Descript.CLI/Commands/ApiEndpointsAgentEditJobCommandApiCommand.g.cs +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsAgentEditJobCommandApiCommand.g.cs @@ -39,7 +39,15 @@ provided. Requires `project_id`. private static Option Model { get; } = new( name: @"--model") { - Description = @"AI model to use for editing. Defaults to the default model. + Description = @"AI model to use for editing. Accepts a canonical model id +(e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`, +`gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`, +`claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`, +`gemini-flash`). Call [GET /agent/models](#operation/listAgentModels) +to discover the current set of supported models and aliases. + +Defaults to `auto` when omitted, which selects a recommended +model for your account. ", }; diff --git a/src/cli/Descript.CLI/Commands/ApiEndpointsListAgentModelsCommandApiCommand.g.cs b/src/cli/Descript.CLI/Commands/ApiEndpointsListAgentModelsCommandApiCommand.g.cs new file mode 100644 index 0000000..1398378 --- /dev/null +++ b/src/cli/Descript.CLI/Commands/ApiEndpointsListAgentModelsCommandApiCommand.g.cs @@ -0,0 +1,77 @@ +#nullable enable +#pragma warning disable CS0618 + +using System.CommandLine; + +namespace Descript.CLI.Commands; + +internal static partial class ApiEndpointsListAgentModelsCommandApiCommand +{ + + + private static string FormatResponse(ParseResult parseResult, global::Descript.ListAgentModelsResponse value, global::System.Text.Json.Serialization.JsonSerializerContext context, bool truncateLongStrings) + { + string? text = null; + CustomizeResponseText(parseResult, value, ref text); + if (!string.IsNullOrWhiteSpace(text)) + { + return text; + } + + var hints = new Dictionary(StringComparer.OrdinalIgnoreCase) + { + }; + CustomizeResponseFormatHints(hints); + return CliRuntime.FormatHumanReadable(value, context, truncateLongStrings, hints); + } + + static partial void CustomizeResponseText(ParseResult parseResult, global::Descript.ListAgentModelsResponse value, ref string? text); + static partial void CustomizeResponseFormatHints(Dictionary hints); + + + public static Command Create() + { + var command = new Command(@"list-agent-models", @"List agent models +List the currently available agent models and the aliases that resolve to them. + +The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any +value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target +the latest +recommended model for a given tier without chasing version bumps — for example, +passing `claude-opus` always routes to whichever Claude Opus version Descript +currently recommends. + +Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing +users a relative price/performance signal. Exact pricing is reported per job via +the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob). + +When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which +selects a recommended model for your account. `auto` is a `medium`-cost option. For an +`auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports +`auto`; for an explicit model or alias it reports the canonical id that ran. +"); + + + + command.SetAction(async (ParseResult parseResult, CancellationToken cancellationToken) => + await CliRuntime.RunAsync(async () => + { + + using var client = await CliRuntime.CreateClientAsync(parseResult, cancellationToken).ConfigureAwait(false); + + + var response = await client.ApiEndpoints.ListAgentModelsAsync( + + cancellationToken: cancellationToken).ConfigureAwait(false); + + + await CliRuntime.WriteResponseAsync( + parseResult, + response, + global::Descript.SourceGenerationContext.Default, + FormatResponse, + cancellationToken).ConfigureAwait(false); + }, cancellationToken).ConfigureAwait(false)); + return command; + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs index b314982..fa3a714 100644 --- a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.AgentEditJob.g.cs @@ -721,7 +721,14 @@ partial void ProcessAgentEditJobResponseContent( /// Example: 39677a40-1c43-4c36-8449-46cfbc4de2b5 /// /// - /// AI model to use for editing. Defaults to the default model. + /// AI model to use for editing. Accepts a canonical model id
+ /// (e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`,
+ /// `gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`,
+ /// `claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`,
+ /// `gemini-flash`). Call [GET /agent/models](#operation/listAgentModels)
+ /// to discover the current set of supported models and aliases.
+ /// Defaults to `auto` when omitted, which selects a recommended
+ /// model for your account. /// /// /// Natural language instruction for the agent to execute.
diff --git a/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListAgentModels.g.cs b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListAgentModels.g.cs new file mode 100644 index 0000000..473ed3c --- /dev/null +++ b/src/libs/Descript/Generated/Descript.ApiEndpointsClient.ListAgentModels.g.cs @@ -0,0 +1,517 @@ + +#nullable enable + +namespace Descript +{ + public partial class ApiEndpointsClient + { + + + private static readonly global::Descript.EndPointSecurityRequirement s_ListAgentModelsSecurityRequirement0 = + new global::Descript.EndPointSecurityRequirement + { + Authorizations = new global::Descript.EndPointAuthorizationRequirement[] + { new global::Descript.EndPointAuthorizationRequirement + { + Type = "Http", + SchemeId = "HttpBearer", + Location = "Header", + Name = "Bearer", + FriendlyName = "Bearer", + }, + }, + }; + private static readonly global::Descript.EndPointSecurityRequirement[] s_ListAgentModelsSecurityRequirements = + new global::Descript.EndPointSecurityRequirement[] + { s_ListAgentModelsSecurityRequirement0, + }; + partial void PrepareListAgentModelsArguments( + global::System.Net.Http.HttpClient httpClient); + partial void PrepareListAgentModelsRequest( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpRequestMessage httpRequestMessage); + partial void ProcessListAgentModelsResponse( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage); + + partial void ProcessListAgentModelsResponseContent( + global::System.Net.Http.HttpClient httpClient, + global::System.Net.Http.HttpResponseMessage httpResponseMessage, + ref string content); + + /// + /// List agent models
+ /// List the currently available agent models and the aliases that resolve to them.
+ /// The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any
+ /// value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target
+ /// the latest
+ /// recommended model for a given tier without chasing version bumps — for example,
+ /// passing `claude-opus` always routes to whichever Claude Opus version Descript
+ /// currently recommends.
+ /// Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing
+ /// users a relative price/performance signal. Exact pricing is reported per job via
+ /// the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob).
+ /// When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which
+ /// selects a recommended model for your account. `auto` is a `medium`-cost option. For an
+ /// `auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports
+ /// `auto`; for an explicit model or alias it reports the canonical id that ran. + ///
+ /// 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 ListAgentModelsAsync( + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + var __response = await ListAgentModelsAsResponseAsync( + requestOptions: requestOptions, + cancellationToken: cancellationToken + ).ConfigureAwait(false); + + return __response.Body; + } + /// + /// List agent models
+ /// List the currently available agent models and the aliases that resolve to them.
+ /// The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any
+ /// value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target
+ /// the latest
+ /// recommended model for a given tier without chasing version bumps — for example,
+ /// passing `claude-opus` always routes to whichever Claude Opus version Descript
+ /// currently recommends.
+ /// Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing
+ /// users a relative price/performance signal. Exact pricing is reported per job via
+ /// the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob).
+ /// When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which
+ /// selects a recommended model for your account. `auto` is a `medium`-cost option. For an
+ /// `auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports
+ /// `auto`; for an explicit model or alias it reports the canonical id that ran. + ///
+ /// 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> ListAgentModelsAsResponseAsync( + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default) + { + PrepareArguments( + client: HttpClient); + PrepareListAgentModelsArguments( + httpClient: HttpClient); + + + var __authorizations = global::Descript.EndPointSecurityResolver.ResolveAuthorizations( + availableAuthorizations: Authorizations, + securityRequirements: s_ListAgentModelsSecurityRequirements, + operationName: "ListAgentModelsAsync"); + + using var __timeoutCancellationTokenSource = global::Descript.AutoSDKRequestOptionsSupport.CreateTimeoutCancellationTokenSource( + clientOptions: Options, + requestOptions: requestOptions, + cancellationToken: cancellationToken); + var __effectiveCancellationToken = __timeoutCancellationTokenSource?.Token ?? cancellationToken; + var __effectiveReadResponseAsString = global::Descript.AutoSDKRequestOptionsSupport.GetReadResponseAsString( + clientOptions: Options, + requestOptions: requestOptions, + fallbackValue: ReadResponseAsString); + var __maxAttempts = global::Descript.AutoSDKRequestOptionsSupport.GetMaxAttempts( + clientOptions: Options, + requestOptions: requestOptions, + supportsRetry: true); + + global::System.Net.Http.HttpRequestMessage __CreateHttpRequest() + { + + var __pathBuilder = new global::Descript.PathBuilder( + path: "/agent/models", + baseUri: HttpClient.BaseAddress); + var __path = __pathBuilder.ToString(); + __path = global::Descript.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::Descript.AutoSDKRequestOptionsSupport.ApplyHeaders( + request: __httpRequest, + clientHeaders: Options.Headers, + requestHeaders: requestOptions?.Headers); + + PrepareRequest( + client: HttpClient, + request: __httpRequest); + PrepareListAgentModelsRequest( + httpClient: HttpClient, + httpRequestMessage: __httpRequest); + + 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::Descript.AutoSDKRequestOptionsSupport.OnBeforeRequestAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAgentModels", + methodName: "ListAgentModelsAsync", + pathTemplate: "\"/agent/models\"", + 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::Descript.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: null, + attempt: __attempt); + var __willRetry = __attempt < __maxAttempts && !__effectiveCancellationToken.IsCancellationRequested; + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAgentModels", + methodName: "ListAgentModelsAsync", + pathTemplate: "\"/agent/models\"", + 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::Descript.AutoSDKRequestOptionsSupport.DelayBeforeRetryAsync( + retryDelay: __retryDelay, + cancellationToken: __effectiveCancellationToken).ConfigureAwait(false); + continue; + } + + if (__response != null && + __attempt < __maxAttempts && + global::Descript.AutoSDKRequestOptionsSupport.ShouldRetryStatusCode(__response.StatusCode)) + { + var __retryDelay = global::Descript.AutoSDKRequestOptionsSupport.GetRetryDelay( + clientOptions: Options, + requestOptions: requestOptions, + response: __response, + attempt: __attempt); + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAgentModels", + methodName: "ListAgentModelsAsync", + pathTemplate: "\"/agent/models\"", + 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::Descript.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); + ProcessListAgentModelsResponse( + httpClient: HttpClient, + httpResponseMessage: __response); + if (__response.IsSuccessStatusCode) + { + await global::Descript.AutoSDKRequestOptionsSupport.OnAfterSuccessAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAgentModels", + methodName: "ListAgentModelsAsync", + pathTemplate: "\"/agent/models\"", + 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::Descript.AutoSDKRequestOptionsSupport.OnAfterErrorAsync( + clientOptions: Options, + context: global::Descript.AutoSDKRequestOptionsSupport.CreateHookContext( + operationId: "ListAgentModels", + methodName: "ListAgentModelsAsync", + pathTemplate: "\"/agent/models\"", + 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); + } + // Unauthorized - missing or invalid authentication token + if ((int)__response.StatusCode == 401) + { + string? __content_401 = null; + global::System.Exception? __exception_401 = null; + global::Descript.Error401? __value_401 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_401 = global::Descript.Error401.FromJson(__content_401, JsonSerializerContext); + } + else + { + __content_401 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_401 = global::Descript.Error401.FromJson(__content_401, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_401 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_401 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_401, + responseBody: __content_401, + responseObject: __value_401, + responseHeaders: global::System.Linq.Enumerable.ToDictionary( + __response.Headers, + h => h.Key, + h => h.Value)); + } + // Too many requests - rate limit exceeded. Use the `Retry-After` header to determine when to retry. + if ((int)__response.StatusCode == 429) + { + string? __content_429 = null; + global::System.Exception? __exception_429 = null; + global::Descript.Error429? __value_429 = null; + try + { + if (__effectiveReadResponseAsString) + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + __value_429 = global::Descript.Error429.FromJson(__content_429, JsonSerializerContext); + } + else + { + __content_429 = await __response.Content.ReadAsStringAsync(__effectiveCancellationToken).ConfigureAwait(false); + + __value_429 = global::Descript.Error429.FromJson(__content_429, JsonSerializerContext); + } + } + catch (global::System.Exception __ex) + { + __exception_429 = __ex; + } + + + throw global::Descript.ApiException.Create( + statusCode: __response.StatusCode, + message: __content_429 ?? __response.ReasonPhrase ?? string.Empty, + innerException: __exception_429, + responseBody: __content_429, + responseObject: __value_429, + 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); + ProcessListAgentModelsResponseContent( + httpClient: HttpClient, + httpResponseMessage: __response, + content: ref __content); + + try + { + __response.EnsureSuccessStatusCode(); + + var __value = global::Descript.ListAgentModelsResponse.FromJson(__content, JsonSerializerContext) ?? + throw new global::System.InvalidOperationException($"Response deserialization failed for \"{__content}\" "); + return new global::Descript.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Descript.AutoSDKHttpResponse.CreateHeaders(__response), + requestUri: __response.RequestMessage?.RequestUri, + body: __value); + } + catch (global::System.Exception __ex) + { + throw global::Descript.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::Descript.ListAgentModelsResponse.FromJsonStreamAsync(__content, JsonSerializerContext).ConfigureAwait(false) ?? + throw new global::System.InvalidOperationException("Response deserialization failed."); + return new global::Descript.AutoSDKHttpResponse( + statusCode: __response.StatusCode, + headers: global::Descript.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::Descript.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/Descript/Generated/Descript.IApiEndpointsClient.AgentEditJob.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.AgentEditJob.g.cs index 715918d..4724ffc 100644 --- a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.AgentEditJob.g.cs +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.AgentEditJob.g.cs @@ -96,7 +96,14 @@ public partial interface IApiEndpointsClient /// Example: 39677a40-1c43-4c36-8449-46cfbc4de2b5 /// /// - /// AI model to use for editing. Defaults to the default model. + /// AI model to use for editing. Accepts a canonical model id
+ /// (e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`,
+ /// `gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`,
+ /// `claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`,
+ /// `gemini-flash`). Call [GET /agent/models](#operation/listAgentModels)
+ /// to discover the current set of supported models and aliases.
+ /// Defaults to `auto` when omitted, which selects a recommended
+ /// model for your account. /// /// /// Natural language instruction for the agent to execute.
diff --git a/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListAgentModels.g.cs b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListAgentModels.g.cs new file mode 100644 index 0000000..8894967 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.IApiEndpointsClient.ListAgentModels.g.cs @@ -0,0 +1,54 @@ +#nullable enable + +namespace Descript +{ + public partial interface IApiEndpointsClient + { + /// + /// List agent models
+ /// List the currently available agent models and the aliases that resolve to them.
+ /// The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any
+ /// value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target
+ /// the latest
+ /// recommended model for a given tier without chasing version bumps — for example,
+ /// passing `claude-opus` always routes to whichever Claude Opus version Descript
+ /// currently recommends.
+ /// Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing
+ /// users a relative price/performance signal. Exact pricing is reported per job via
+ /// the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob).
+ /// When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which
+ /// selects a recommended model for your account. `auto` is a `medium`-cost option. For an
+ /// `auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports
+ /// `auto`; for an explicit model or alias it reports the canonical id that ran. + ///
+ /// 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 ListAgentModelsAsync( + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + /// + /// List agent models
+ /// List the currently available agent models and the aliases that resolve to them.
+ /// The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any
+ /// value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target
+ /// the latest
+ /// recommended model for a given tier without chasing version bumps — for example,
+ /// passing `claude-opus` always routes to whichever Claude Opus version Descript
+ /// currently recommends.
+ /// Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing
+ /// users a relative price/performance signal. Exact pricing is reported per job via
+ /// the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob).
+ /// When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which
+ /// selects a recommended model for your account. `auto` is a `medium`-cost option. For an
+ /// `auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports
+ /// `auto`; for an explicit model or alias it reports the canonical id that ran. + ///
+ /// 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> ListAgentModelsAsResponseAsync( + global::Descript.AutoSDKRequestOptions? requestOptions = default, + global::System.Threading.CancellationToken cancellationToken = default); + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCost.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCost.g.cs new file mode 100644 index 0000000..b630f52 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCost.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class ListAgentModelsResponseAliaseCostJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.ListAgentModelsResponseAliaseCost 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::Descript.ListAgentModelsResponseAliaseCostExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.ListAgentModelsResponseAliaseCost)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.ListAgentModelsResponseAliaseCost); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.ListAgentModelsResponseAliaseCost value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.ListAgentModelsResponseAliaseCostExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCostNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCostNullable.g.cs new file mode 100644 index 0000000..392be7a --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAliaseCostNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class ListAgentModelsResponseAliaseCostNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.ListAgentModelsResponseAliaseCost? 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::Descript.ListAgentModelsResponseAliaseCostExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.ListAgentModelsResponseAliaseCost)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.ListAgentModelsResponseAliaseCost?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.ListAgentModelsResponseAliaseCost? 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::Descript.ListAgentModelsResponseAliaseCostExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCost.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCost.g.cs new file mode 100644 index 0000000..87585aa --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCost.g.cs @@ -0,0 +1,53 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class ListAgentModelsResponseAvailableModelCostJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.ListAgentModelsResponseAvailableModelCost 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::Descript.ListAgentModelsResponseAvailableModelCostExtensions.ToEnum(stringValue) ?? default; + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.ListAgentModelsResponseAvailableModelCost)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.ListAgentModelsResponseAvailableModelCost); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.ListAgentModelsResponseAvailableModelCost value, + global::System.Text.Json.JsonSerializerOptions options) + { + writer = writer ?? throw new global::System.ArgumentNullException(nameof(writer)); + + writer.WriteStringValue(global::Descript.ListAgentModelsResponseAvailableModelCostExtensions.ToValueString(value)); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostNullable.g.cs b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostNullable.g.cs new file mode 100644 index 0000000..81e834b --- /dev/null +++ b/src/libs/Descript/Generated/Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostNullable.g.cs @@ -0,0 +1,60 @@ +#nullable enable + +namespace Descript.JsonConverters +{ + /// + public sealed class ListAgentModelsResponseAvailableModelCostNullableJsonConverter : global::System.Text.Json.Serialization.JsonConverter + { + /// + public override global::Descript.ListAgentModelsResponseAvailableModelCost? 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::Descript.ListAgentModelsResponseAvailableModelCostExtensions.ToEnum(stringValue); + } + + break; + } + case global::System.Text.Json.JsonTokenType.Number: + { + var numValue = reader.GetInt32(); + return (global::Descript.ListAgentModelsResponseAvailableModelCost)numValue; + } + case global::System.Text.Json.JsonTokenType.Null: + { + return default(global::Descript.ListAgentModelsResponseAvailableModelCost?); + } + default: + throw new global::System.ArgumentOutOfRangeException(nameof(reader)); + } + + return default; + } + + /// + public override void Write( + global::System.Text.Json.Utf8JsonWriter writer, + global::Descript.ListAgentModelsResponseAvailableModelCost? 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::Descript.ListAgentModelsResponseAvailableModelCostExtensions.ToValueString(value.Value)); + } + } + } +} diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs index a24c8cf..3b286f3 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContext.g.cs @@ -153,6 +153,14 @@ namespace Descript typeof(global::Descript.JsonConverters.ListProjectsDirectionNullableJsonConverter), + typeof(global::Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostJsonConverter), + + typeof(global::Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostNullableJsonConverter), + + typeof(global::Descript.JsonConverters.ListAgentModelsResponseAliaseCostJsonConverter), + + typeof(global::Descript.JsonConverters.ListAgentModelsResponseAliaseCostNullableJsonConverter), + typeof(global::Descript.JsonConverters.GetProjectResponseMediaFilesTypeJsonConverter), typeof(global::Descript.JsonConverters.GetProjectResponseMediaFilesTypeNullableJsonConverter), @@ -279,6 +287,13 @@ namespace Descript [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.Dictionary))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ImportProjectMediaResponseUploadUrls2))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.AgentEditJobResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListAgentModelsResponse))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListAgentModelsResponseAvailableModel))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListAgentModelsResponseAvailableModelCost), TypeInfoPropertyName = "ListAgentModelsResponseAvailableModelCost2")] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::System.Collections.Generic.IList))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListAgentModelsResponseAliase))] + [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListAgentModelsResponseAliaseCost), TypeInfoPropertyName = "ListAgentModelsResponseAliaseCost2")] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.PublishJobResponse))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(byte[]))] [global::System.Text.Json.Serialization.JsonSerializable(typeof(global::Descript.ListJobsResponse))] @@ -302,6 +317,8 @@ namespace Descript [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))] diff --git a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs index 28240f2..02fdccf 100644 --- a/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs +++ b/src/libs/Descript/Generated/Descript.JsonSerializerContextTypes.g.cs @@ -440,71 +440,99 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::Descript.PublishJobResponse? Type103 { get; set; } + public global::Descript.ListAgentModelsResponse? Type103 { get; set; } /// /// /// - public byte[]? Type104 { get; set; } + public global::System.Collections.Generic.IList? Type104 { get; set; } /// /// /// - public global::Descript.ListJobsResponse? Type105 { get; set; } + public global::Descript.ListAgentModelsResponseAvailableModel? Type105 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type106 { get; set; } + public global::Descript.ListAgentModelsResponseAvailableModelCost? Type106 { get; set; } /// /// /// - public global::Descript.ListJobsResponsePagination? Type107 { get; set; } + public global::System.Collections.Generic.IList? Type107 { get; set; } /// /// /// - public global::Descript.ListProjectsResponse? Type108 { get; set; } + public global::Descript.ListAgentModelsResponseAliase? Type108 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type109 { get; set; } + public global::Descript.ListAgentModelsResponseAliaseCost? Type109 { get; set; } /// /// /// - public global::Descript.ListProjectsResponseDataItem? Type110 { get; set; } + public global::Descript.PublishJobResponse? Type110 { get; set; } /// /// /// - public global::Descript.ListProjectsResponsePagination? Type111 { get; set; } + public byte[]? Type111 { get; set; } /// /// /// - public global::Descript.GetProjectResponse? Type112 { get; set; } + public global::Descript.ListJobsResponse? Type112 { get; set; } /// /// /// - public global::System.Collections.Generic.Dictionary? Type113 { get; set; } + public global::System.Collections.Generic.IList? Type113 { get; set; } /// /// /// - public global::Descript.GetProjectResponseMediaFiles2? Type114 { get; set; } + public global::Descript.ListJobsResponsePagination? Type114 { get; set; } /// /// /// - public global::Descript.GetProjectResponseMediaFilesType? Type115 { get; set; } + public global::Descript.ListProjectsResponse? Type115 { get; set; } /// /// /// - public global::System.Collections.Generic.IList? Type116 { get; set; } + public global::System.Collections.Generic.IList? Type116 { get; set; } /// /// /// - public global::Descript.GetProjectResponseComposition? Type117 { get; set; } + public global::Descript.ListProjectsResponseDataItem? Type117 { get; set; } /// /// /// - public global::Descript.GetStatusResponse? Type118 { get; set; } + public global::Descript.ListProjectsResponsePagination? Type118 { get; set; } /// /// /// - public global::Descript.GetStatusResponseStatus? Type119 { get; set; } + public global::Descript.GetProjectResponse? Type119 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.Dictionary? Type120 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseMediaFiles2? Type121 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseMediaFilesType? Type122 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.IList? Type123 { get; set; } + /// + /// + /// + public global::Descript.GetProjectResponseComposition? Type124 { get; set; } + /// + /// + /// + public global::Descript.GetStatusResponse? Type125 { get; set; } + /// + /// + /// + public global::Descript.GetStatusResponseStatus? Type126 { get; set; } /// /// @@ -529,14 +557,22 @@ public sealed partial class JsonSerializerContextTypes /// /// /// - public global::System.Collections.Generic.List? ListType5 { get; set; } + public global::System.Collections.Generic.List? ListType5 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType6 { get; set; } + /// + /// + /// + public global::System.Collections.Generic.List? ListType7 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType6 { get; set; } + public global::System.Collections.Generic.List? ListType8 { get; set; } /// /// /// - public global::System.Collections.Generic.List? ListType7 { get; set; } + public global::System.Collections.Generic.List? ListType9 { get; set; } } } \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.AgentEditJobRequest.g.cs b/src/libs/Descript/Generated/Descript.Models.AgentEditJobRequest.g.cs index 4ebf00c..1f52581 100644 --- a/src/libs/Descript/Generated/Descript.Models.AgentEditJobRequest.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.AgentEditJobRequest.g.cs @@ -42,7 +42,14 @@ public sealed partial class AgentEditJobRequest public string? CompositionId { get; set; } /// - /// AI model to use for editing. Defaults to the default model. + /// AI model to use for editing. Accepts a canonical model id
+ /// (e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`,
+ /// `gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`,
+ /// `claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`,
+ /// `gemini-flash`). Call [GET /agent/models](#operation/listAgentModels)
+ /// to discover the current set of supported models and aliases.
+ /// Defaults to `auto` when omitted, which selects a recommended
+ /// model for your account. ///
[global::System.Text.Json.Serialization.JsonPropertyName("model")] public string? Model { get; set; } @@ -120,7 +127,14 @@ public sealed partial class AgentEditJobRequest /// Example: 39677a40-1c43-4c36-8449-46cfbc4de2b5 /// /// - /// AI model to use for editing. Defaults to the default model. + /// AI model to use for editing. Accepts a canonical model id
+ /// (e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`,
+ /// `gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`,
+ /// `claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`,
+ /// `gemini-flash`). Call [GET /agent/models](#operation/listAgentModels)
+ /// to discover the current set of supported models and aliases.
+ /// Defaults to `auto` when omitted, which selects a recommended
+ /// model for your account. /// /// /// Access level for team members when creating a new project.
diff --git a/src/libs/Descript/Generated/Descript.Models.AgentEditJobResponse.g.cs b/src/libs/Descript/Generated/Descript.Models.AgentEditJobResponse.g.cs index f6341e5..423bc03 100644 --- a/src/libs/Descript/Generated/Descript.Models.AgentEditJobResponse.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.AgentEditJobResponse.g.cs @@ -44,6 +44,19 @@ public sealed partial class AgentEditJobResponse [global::System.Text.Json.Serialization.JsonRequired] public required string ProjectUrl { get; set; } + /// + /// Model reported for this request: the canonical id for an explicit
+ /// model or alias (e.g. `claude-opus-4.8` for `claude-opus`), or
+ /// `auto` for an `auto` request. Lets you confirm the selection
+ /// immediately, without waiting for the job result. Matches
+ /// `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob).
+ /// Example: claude-opus-4.8 + ///
+ /// claude-opus-4.8 + [global::System.Text.Json.Serialization.JsonPropertyName("resolved_model")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResolvedModel { get; set; } + /// /// Additional properties that are not explicitly defined in the schema /// @@ -69,6 +82,14 @@ public sealed partial class AgentEditJobResponse /// URL to access the project in Descript web app
/// Example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb /// + /// + /// Model reported for this request: the canonical id for an explicit
+ /// model or alias (e.g. `claude-opus-4.8` for `claude-opus`), or
+ /// `auto` for an `auto` request. Lets you confirm the selection
+ /// immediately, without waiting for the job result. Matches
+ /// `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob).
+ /// Example: claude-opus-4.8 + /// #if NET7_0_OR_GREATER [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] #endif @@ -76,12 +97,14 @@ public AgentEditJobResponse( global::System.Guid jobId, global::System.Guid driveId, global::System.Guid projectId, - string projectUrl) + string projectUrl, + string resolvedModel) { this.JobId = jobId; this.DriveId = driveId; this.ProjectId = projectId; this.ProjectUrl = projectUrl ?? throw new global::System.ArgumentNullException(nameof(projectUrl)); + this.ResolvedModel = resolvedModel ?? throw new global::System.ArgumentNullException(nameof(resolvedModel)); } /// diff --git a/src/libs/Descript/Generated/Descript.Models.AgentErrorResult.g.cs b/src/libs/Descript/Generated/Descript.Models.AgentErrorResult.g.cs index 8af805c..5ed5e23 100644 --- a/src/libs/Descript/Generated/Descript.Models.AgentErrorResult.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.AgentErrorResult.g.cs @@ -34,6 +34,16 @@ public sealed partial class AgentErrorResult [global::System.Text.Json.Serialization.JsonPropertyName("error_code")] public string? ErrorCode { get; set; } + /// + /// Model reported for this job: the canonical id for an explicit model or
+ /// alias, or `auto` for an `auto` request. Present on jobs submitted via the
+ /// public API after the model-aliases launch; older jobs may omit it.
+ /// Example: claude-opus-4.8 + ///
+ /// claude-opus-4.8 + [global::System.Text.Json.Serialization.JsonPropertyName("resolved_model")] + public string? ResolvedModel { get; set; } + /// /// Conversation ID for this agent session, if one was created before the error occurred.
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 @@ -63,6 +73,12 @@ public sealed partial class AgentErrorResult /// Machine-readable error code
/// Example: agent_execution_failed /// + /// + /// Model reported for this job: the canonical id for an explicit model or
+ /// alias, or `auto` for an `auto` request. Present on jobs submitted via the
+ /// public API after the model-aliases launch; older jobs may omit it.
+ /// Example: claude-opus-4.8 + /// /// /// Conversation ID for this agent session, if one was created before the error occurred.
/// Example: a1b2c3d4-e5f6-7890-abcd-ef1234567890 @@ -74,11 +90,13 @@ public AgentErrorResult( string errorMessage, global::Descript.AgentErrorResultStatus status, string? errorCode, + string? resolvedModel, global::System.Guid? conversationId) { this.Status = status; this.ErrorMessage = errorMessage ?? throw new global::System.ArgumentNullException(nameof(errorMessage)); this.ErrorCode = errorCode; + this.ResolvedModel = resolvedModel; this.ConversationId = conversationId; } diff --git a/src/libs/Descript/Generated/Descript.Models.AgentSuccessResult.g.cs b/src/libs/Descript/Generated/Descript.Models.AgentSuccessResult.g.cs index 128d3cb..8e6539a 100644 --- a/src/libs/Descript/Generated/Descript.Models.AgentSuccessResult.g.cs +++ b/src/libs/Descript/Generated/Descript.Models.AgentSuccessResult.g.cs @@ -51,6 +51,17 @@ public sealed partial class AgentSuccessResult [global::System.Text.Json.Serialization.JsonPropertyName("ai_credits_used")] public int? AiCreditsUsed { get; set; } + /// + /// Model reported for this job: the canonical id for an explicit model or
+ /// alias (e.g. `claude-opus-4.8` for `claude-opus`), or `auto` for an
+ /// `auto` request. Present on jobs submitted via the public API after the
+ /// model-aliases launch; older jobs may omit it.
+ /// Example: claude-opus-4.8 + ///
+ /// claude-opus-4.8 + [global::System.Text.Json.Serialization.JsonPropertyName("resolved_model")] + public string? ResolvedModel { get; set; } + /// /// Conversation ID for this agent session. Pass this value as `conversation_id` in a
/// subsequent [POST /jobs/agent](#operation/agentEditJob) request to continue the conversation.
@@ -89,6 +100,13 @@ public sealed partial class AgentSuccessResult /// AI credits consumed by this operation
/// Example: 5 /// + /// + /// Model reported for this job: the canonical id for an explicit model or
+ /// alias (e.g. `claude-opus-4.8` for `claude-opus`), or `auto` for an
+ /// `auto` request. Present on jobs submitted via the public API after the
+ /// model-aliases launch; older jobs may omit it.
+ /// Example: claude-opus-4.8 + /// /// /// Conversation ID for this agent session. Pass this value as `conversation_id` in a
/// subsequent [POST /jobs/agent](#operation/agentEditJob) request to continue the conversation.
@@ -103,6 +121,7 @@ public AgentSuccessResult( global::Descript.AgentSuccessResultStatus status, int? mediaSecondsUsed, int? aiCreditsUsed, + string? resolvedModel, global::System.Guid? conversationId) { this.Status = status; @@ -110,6 +129,7 @@ public AgentSuccessResult( this.ProjectChanged = projectChanged; this.MediaSecondsUsed = mediaSecondsUsed; this.AiCreditsUsed = aiCreditsUsed; + this.ResolvedModel = resolvedModel; this.ConversationId = conversationId; } diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.Json.g.cs new file mode 100644 index 0000000..395df6e --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class ListAgentModelsResponse + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponse? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.ListAgentModelsResponse), + jsonSerializerContext) as global::Descript.ListAgentModelsResponse; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponse? FromJson( + string json) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Descript.ListAgentModelsResponse? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Descript.ListAgentModelsResponse), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ListAgentModelsResponse; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.g.cs new file mode 100644 index 0000000..08d4f2c --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponse.g.cs @@ -0,0 +1,69 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class ListAgentModelsResponse + { + /// + /// Canonical model ids currently advertised by the public agent API,
+ /// each tagged with a coarse cost tier. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("availableModels")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList AvailableModels { get; set; } + + /// + /// Friendly aliases that resolve to one of the `availableModels` at
+ /// request time. Pass any alias `id` as `model` and the agent job
+ /// result's `result.resolved_model` (on
+ /// [GET /jobs/{job_id}](#operation/getJob)) will report the canonical
+ /// id that actually ran. + ///
+ [global::System.Text.Json.Serialization.JsonPropertyName("aliases")] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::System.Collections.Generic.IList Aliases { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Canonical model ids currently advertised by the public agent API,
+ /// each tagged with a coarse cost tier. + /// + /// + /// Friendly aliases that resolve to one of the `availableModels` at
+ /// request time. Pass any alias `id` as `model` and the agent job
+ /// result's `result.resolved_model` (on
+ /// [GET /jobs/{job_id}](#operation/getJob)) will report the canonical
+ /// id that actually ran. + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListAgentModelsResponse( + global::System.Collections.Generic.IList availableModels, + global::System.Collections.Generic.IList aliases) + { + this.AvailableModels = availableModels ?? throw new global::System.ArgumentNullException(nameof(availableModels)); + this.Aliases = aliases ?? throw new global::System.ArgumentNullException(nameof(aliases)); + } + + /// + /// Initializes a new instance of the class. + /// + public ListAgentModelsResponse() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.Json.g.cs new file mode 100644 index 0000000..6a5047d --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class ListAgentModelsResponseAliase + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponseAliase? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.ListAgentModelsResponseAliase), + jsonSerializerContext) as global::Descript.ListAgentModelsResponseAliase; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponseAliase? FromJson( + string json) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Descript.ListAgentModelsResponseAliase? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Descript.ListAgentModelsResponseAliase), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ListAgentModelsResponseAliase; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.g.cs new file mode 100644 index 0000000..5c0a573 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliase.g.cs @@ -0,0 +1,96 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class ListAgentModelsResponseAliase + { + /// + /// Alias id callers can pass as `model`.
+ /// Example: claude-opus + ///
+ /// claude-opus + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Canonical model id this alias currently resolves to.
+ /// Example: claude-opus-4.8 + ///
+ /// claude-opus-4.8 + [global::System.Text.Json.Serialization.JsonPropertyName("resolvesTo")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string ResolvesTo { get; set; } + + /// + /// Human-readable description of the alias's intent.
+ /// Example: Tracks stable Anthropic Claude Opus + ///
+ /// Tracks stable Anthropic Claude Opus + [global::System.Text.Json.Serialization.JsonPropertyName("description")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Description { get; set; } + + /// + /// Relative cost tier of the model this alias resolves to.
+ /// Example: high + ///
+ /// high + [global::System.Text.Json.Serialization.JsonPropertyName("cost")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.ListAgentModelsResponseAliaseCostJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Descript.ListAgentModelsResponseAliaseCost Cost { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Alias id callers can pass as `model`.
+ /// Example: claude-opus + /// + /// + /// Canonical model id this alias currently resolves to.
+ /// Example: claude-opus-4.8 + /// + /// + /// Human-readable description of the alias's intent.
+ /// Example: Tracks stable Anthropic Claude Opus + /// + /// + /// Relative cost tier of the model this alias resolves to.
+ /// Example: high + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListAgentModelsResponseAliase( + string id, + string resolvesTo, + string description, + global::Descript.ListAgentModelsResponseAliaseCost cost) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.ResolvesTo = resolvesTo ?? throw new global::System.ArgumentNullException(nameof(resolvesTo)); + this.Description = description ?? throw new global::System.ArgumentNullException(nameof(description)); + this.Cost = cost; + } + + /// + /// Initializes a new instance of the class. + /// + public ListAgentModelsResponseAliase() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliaseCost.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliaseCost.g.cs new file mode 100644 index 0000000..ae532f2 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAliaseCost.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Relative cost tier of the model this alias resolves to.
+ /// Example: high + ///
+ public enum ListAgentModelsResponseAliaseCost + { + /// + /// + /// + High, + /// + /// + /// + Low, + /// + /// + /// + Medium, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListAgentModelsResponseAliaseCostExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListAgentModelsResponseAliaseCost value) + { + return value switch + { + ListAgentModelsResponseAliaseCost.High => "high", + ListAgentModelsResponseAliaseCost.Low => "low", + ListAgentModelsResponseAliaseCost.Medium => "medium", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListAgentModelsResponseAliaseCost? ToEnum(string value) + { + return value switch + { + "high" => ListAgentModelsResponseAliaseCost.High, + "low" => ListAgentModelsResponseAliaseCost.Low, + "medium" => ListAgentModelsResponseAliaseCost.Medium, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.Json.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.Json.g.cs new file mode 100644 index 0000000..20ee5ff --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.Json.g.cs @@ -0,0 +1,141 @@ +#nullable enable + +namespace Descript +{ + public sealed partial class ListAgentModelsResponseAvailableModel + { + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerContext. + /// + public string ToJson( + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Serialize( + this, + this.GetType(), + jsonSerializerContext); + } + + /// + /// Serializes the current instance to a JSON string using the generated default JsonSerializerContext. + /// + public string ToJson() + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + /// + /// Serializes the current instance to a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public string ToJson( + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return ToJson(global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Serialize( + this, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponseAvailableModel? FromJson( + string json, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + typeof(global::Descript.ListAgentModelsResponseAvailableModel), + jsonSerializerContext) as global::Descript.ListAgentModelsResponseAvailableModel; + } + + /// + /// Deserializes a JSON string using the generated default JsonSerializerContext. + /// + public static global::Descript.ListAgentModelsResponseAvailableModel? FromJson( + string json) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON string using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::Descript.ListAgentModelsResponseAvailableModel? FromJson( + string json, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJson( + json, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.Deserialize( + json, + jsonSerializerOptions); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerContext. + /// + public static async global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.Serialization.JsonSerializerContext jsonSerializerContext) + { + return (await global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + typeof(global::Descript.ListAgentModelsResponseAvailableModel), + jsonSerializerContext).ConfigureAwait(false)) as global::Descript.ListAgentModelsResponseAvailableModel; + } + + /// + /// Deserializes a JSON stream using the generated default JsonSerializerContext. + /// + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + /// + /// Deserializes a JSON stream using the provided JsonSerializerOptions. + /// +#if NET8_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")] + [global::System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")] +#endif + public static global::System.Threading.Tasks.ValueTask FromJsonStreamAsync( + global::System.IO.Stream jsonStream, + global::System.Text.Json.JsonSerializerOptions? jsonSerializerOptions = null) + { + if (jsonSerializerOptions is null) + { + return FromJsonStreamAsync( + jsonStream, + global::Descript.SourceGenerationContext.Default); + } + + return global::System.Text.Json.JsonSerializer.DeserializeAsync( + jsonStream, + jsonSerializerOptions); + } + } +} diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.g.cs new file mode 100644 index 0000000..04303b9 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModel.g.cs @@ -0,0 +1,66 @@ + +#nullable enable + +namespace Descript +{ + /// + /// + /// + public sealed partial class ListAgentModelsResponseAvailableModel + { + /// + /// Canonical model id to pass as `model` on `POST /jobs/agent`.
+ /// Example: claude-opus-4.8 + ///
+ /// claude-opus-4.8 + [global::System.Text.Json.Serialization.JsonPropertyName("id")] + [global::System.Text.Json.Serialization.JsonRequired] + public required string Id { get; set; } + + /// + /// Relative cost tier for this model.
+ /// Example: high + ///
+ /// high + [global::System.Text.Json.Serialization.JsonPropertyName("cost")] + [global::System.Text.Json.Serialization.JsonConverter(typeof(global::Descript.JsonConverters.ListAgentModelsResponseAvailableModelCostJsonConverter))] + [global::System.Text.Json.Serialization.JsonRequired] + public required global::Descript.ListAgentModelsResponseAvailableModelCost Cost { get; set; } + + /// + /// Additional properties that are not explicitly defined in the schema + /// + [global::System.Text.Json.Serialization.JsonExtensionData] + public global::System.Collections.Generic.IDictionary AdditionalProperties { get; set; } = new global::System.Collections.Generic.Dictionary(); + + /// + /// Initializes a new instance of the class. + /// + /// + /// Canonical model id to pass as `model` on `POST /jobs/agent`.
+ /// Example: claude-opus-4.8 + /// + /// + /// Relative cost tier for this model.
+ /// Example: high + /// +#if NET7_0_OR_GREATER + [global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers] +#endif + public ListAgentModelsResponseAvailableModel( + string id, + global::Descript.ListAgentModelsResponseAvailableModelCost cost) + { + this.Id = id ?? throw new global::System.ArgumentNullException(nameof(id)); + this.Cost = cost; + } + + /// + /// Initializes a new instance of the class. + /// + public ListAgentModelsResponseAvailableModel() + { + } + + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModelCost.g.cs b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModelCost.g.cs new file mode 100644 index 0000000..949d990 --- /dev/null +++ b/src/libs/Descript/Generated/Descript.Models.ListAgentModelsResponseAvailableModelCost.g.cs @@ -0,0 +1,58 @@ + +#nullable enable + +namespace Descript +{ + /// + /// Relative cost tier for this model.
+ /// Example: high + ///
+ public enum ListAgentModelsResponseAvailableModelCost + { + /// + /// + /// + High, + /// + /// + /// + Low, + /// + /// + /// + Medium, + } + + /// + /// Enum extensions to do fast conversions without the reflection. + /// + public static class ListAgentModelsResponseAvailableModelCostExtensions + { + /// + /// Converts an enum to a string. + /// + public static string ToValueString(this ListAgentModelsResponseAvailableModelCost value) + { + return value switch + { + ListAgentModelsResponseAvailableModelCost.High => "high", + ListAgentModelsResponseAvailableModelCost.Low => "low", + ListAgentModelsResponseAvailableModelCost.Medium => "medium", + _ => throw new global::System.ArgumentOutOfRangeException(nameof(value), value, null), + }; + } + /// + /// Converts an string to a enum. + /// + public static ListAgentModelsResponseAvailableModelCost? ToEnum(string value) + { + return value switch + { + "high" => ListAgentModelsResponseAvailableModelCost.High, + "low" => ListAgentModelsResponseAvailableModelCost.Low, + "medium" => ListAgentModelsResponseAvailableModelCost.Medium, + _ => null, + }; + } + } +} \ No newline at end of file diff --git a/src/libs/Descript/Generated/autosdk.generated-examples.json b/src/libs/Descript/Generated/autosdk.generated-examples.json index 35ceb9a..2456b06 100644 --- a/src/libs/Descript/Generated/autosdk.generated-examples.json +++ b/src/libs/Descript/Generated/autosdk.generated-examples.json @@ -6,7 +6,7 @@ "Slug": "agenteditjob", "Description": "Use a background agent to create and edit projects using a natural language prompt.\n\n- **Edit existing project**: Provide a \u0060project_id\u0060 to edit an existing project\n- **Target a specific composition**: Provide both \u0060project_id\u0060 and \u0060composition_id\u0060 to direct the agent to a specific composition within the project\n- **Create new project**: Provide a \u0060project_name\u0060 instead of \u0060project_id\u0060 to create a new project\n\n### Common use cases\n- Create new content: \u0022create a 30-second video about cooking tips\u0022\n- Apply audio effects: \u0022add studio sound to every clip\u0022\n- Remove filler words: \u0022remove all filler words from the transcript\u0022\n- Create highlights: \u0022create a 30-second highlight reel\u0022\n- Content editing: \u0022remove the section from 1:30 to 2:15\u0022\n\n### Async Operations\n\nAgent edits run in the background and return a \u0060job_id\u0060. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint.\n\n### Dynamic webhook\n\nIf \u0060callback_url\u0060 is provided, Descript will POST the job status to that URL when the job completes or fails.\nThe payload will match the format returned by [GET /jobs/{job_id}](#operation/getJob).", "Language": "csharp", - "Code": "using var client = new DescriptClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Descript.AgentEditJobRequest\u003E(\n @\u0022{\n \u0022\u0022project_id\u0022\u0022: \u0022\u00229f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022\u0022,\n \u0022\u0022model\u0022\u0022: \u0022\u0022haiku-4.5\u0022\u0022,\n \u0022\u0022prompt\u0022\u0022: \u0022\u0022add studio sound to every clip\u0022\u0022\n}\u0022)!;\n\nvar response = await client.ApiEndpoints.AgentEditJobAsync(\n request: request\n);", + "Code": "using var client = new DescriptClient(apiKey);\n\nvar request = global::System.Text.Json.JsonSerializer.Deserialize\u003Cglobal::Descript.AgentEditJobRequest\u003E(\n @\u0022{\n \u0022\u0022project_id\u0022\u0022: \u0022\u00229f36ee32-5a2c-47e7-b1a3-94991d3e3ddb\u0022\u0022,\n \u0022\u0022model\u0022\u0022: \u0022\u0022claude-haiku-4.5\u0022\u0022,\n \u0022\u0022prompt\u0022\u0022: \u0022\u0022add studio sound to every clip\u0022\u0022\n}\u0022)!;\n\nvar response = await client.ApiEndpoints.AgentEditJobAsync(\n request: request\n);", "Format": "sdk", "OperationId": "agentEditJob", "Setup": "This example assumes \u0060using Descript;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." @@ -79,6 +79,17 @@ }, { "Order": 8, + "Title": "List agent models", + "Slug": "listagentmodels", + "Description": "List the currently available agent models and the aliases that resolve to them.\n\nThe \u0060model\u0060 parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any\nvalue listed under \u0060availableModels[].id\u0060 or \u0060aliases[].id\u0060. Aliases let you target\nthe latest\nrecommended model for a given tier without chasing version bumps \u2014 for example,\npassing \u0060claude-opus\u0060 always routes to whichever Claude Opus version Descript\ncurrently recommends.\n\nCost tiers are coarse buckets \u2014 \u0060low\u0060, \u0060medium\u0060, \u0060high\u0060 \u2014 useful for showing\nusers a relative price/performance signal. Exact pricing is reported per job via\nthe \u0060ai_credits_used\u0060 field on [GET /jobs/{job_id}](#operation/getJob).\n\nWhen \u0060model\u0060 is omitted on \u0060POST /jobs/agent\u0060, the request defaults to \u0060auto\u0060, which\nselects a recommended model for your account. \u0060auto\u0060 is a \u0060medium\u0060-cost option. For an\n\u0060auto\u0060 request, \u0060result.resolved_model\u0060 on [GET /jobs/{job_id}](#operation/getJob) reports\n\u0060auto\u0060; for an explicit model or alias it reports the canonical id that ran.", + "Language": "csharp", + "Code": "using var client = new DescriptClient(apiKey);\nvar response = await client.ApiEndpoints.ListAgentModelsAsync();\n\n// Example response:\n// {\n// \u0022availableModels\u0022: [\n// {\n// \u0022id\u0022: \u0022auto\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-opus-4.8\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-opus-4.7\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-opus-4.6\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-sonnet-5\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-sonnet-4.6\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-haiku-4.5\u0022,\n// \u0022cost\u0022: \u0022low\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gpt-5.5\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gpt-5.4\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gemini-3.5-flash\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gemini-3.1-pro\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// }\n// ],\n// \u0022aliases\u0022: [\n// {\n// \u0022id\u0022: \u0022claude-opus\u0022,\n// \u0022resolvesTo\u0022: \u0022claude-opus-4.8\u0022,\n// \u0022description\u0022: \u0022Tracks stable Anthropic Claude Opus\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-sonnet\u0022,\n// \u0022resolvesTo\u0022: \u0022claude-sonnet-4.6\u0022,\n// \u0022description\u0022: \u0022Tracks stable Anthropic Claude Sonnet\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// },\n// {\n// \u0022id\u0022: \u0022claude-haiku\u0022,\n// \u0022resolvesTo\u0022: \u0022claude-haiku-4.5\u0022,\n// \u0022description\u0022: \u0022Tracks stable Anthropic Claude Haiku\u0022,\n// \u0022cost\u0022: \u0022low\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gpt\u0022,\n// \u0022resolvesTo\u0022: \u0022gpt-5.5\u0022,\n// \u0022description\u0022: \u0022Tracks stable OpenAI GPT\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gemini-pro\u0022,\n// \u0022resolvesTo\u0022: \u0022gemini-3.1-pro\u0022,\n// \u0022description\u0022: \u0022Tracks stable Google Gemini Pro\u0022,\n// \u0022cost\u0022: \u0022high\u0022\n// },\n// {\n// \u0022id\u0022: \u0022gemini-flash\u0022,\n// \u0022resolvesTo\u0022: \u0022gemini-3.5-flash\u0022,\n// \u0022description\u0022: \u0022Tracks stable Google Gemini Flash\u0022,\n// \u0022cost\u0022: \u0022medium\u0022\n// }\n// ]\n// }", + "Format": "sdk", + "OperationId": "listAgentModels", + "Setup": "This example assumes \u0060using Descript;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." + }, + { + "Order": 9, "Title": "List jobs", "Slug": "listjobs", "Description": "List recent jobs with optional filtering by project or job type.\n\nBy default, jobs created within the last 7 days are returned. Use \u0060created_after\u0060 and\n\u0060created_before\u0060 to customize the time range. The maximum lookback is 30 days.\n\nResults are paginated. Use the \u0060cursor\u0060 from the response \u0060pagination.next_cursor\u0060 to\nfetch subsequent pages.\n\nQuery parameters allow you to filter the results:\n* Filter by \u0060project_id\u0060 to see all jobs for a project\n* Filter by \u0060type\u0060 to see specific job types (import/project_media, agent)", @@ -89,7 +100,7 @@ "Setup": "This example assumes \u0060using Descript;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 9, + "Order": 10, "Title": "List projects", "Slug": "listprojects", "Description": "List projects accessible to the authenticated user within a drive.\n\nThe drive is determined from the access token.\n\nResults are paginated. Use the \u0060cursor\u0060 from the response \u0060pagination.next_cursor\u0060\nto fetch subsequent pages.", @@ -100,7 +111,7 @@ "Setup": "This example assumes \u0060using Descript;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 10, + "Order": 11, "Title": "Publish project media", "Slug": "publishjob", "Description": "Publish a project composition to create a shareable link and download the exported file.\n\nPublishes a specific composition from a project, rendering the output as video or audio\nat the specified resolution. When the job completes successfully the result contains both:\n\n- \u0060share_url\u0060: a public URL that can be used to view the published content on Descript\u0027s share site.\n- \u0060download_url\u0060: a time-limited signed URL to download the exported media file directly,\n along with \u0060download_url_expires_at\u0060 indicating when the link expires.\n\n### Republishing\n\nPublishing the same composition a second time automatically reuses the previous share URL,\noverwriting its content \u2014 so bookmarks and links handed out for the first publish keep working.\nRepublish matching is keyed on \u0060(project_id, composition_id, media_type)\u0060, so a Video publish\nand an Audio publish of the same composition produce two separate share URLs.\n\n### Async Operations\n\nPublish jobs run in the background and return a \u0060job_id\u0060. Monitor progress via the [GET /jobs/{job_id}](#operation/getJob) endpoint,\nwhich returns the \u0060share_url\u0060, \u0060download_url\u0060, and \u0060download_url_expires_at\u0060 fields once the job finishes.\n\n### Dynamic webhook\n\nIf \u0060callback_url\u0060 is provided, Descript will POST the job status to that URL when the job completes or fails.\nThe payload will match the format returned by [GET /jobs/{job_id}](#operation/getJob).", @@ -111,7 +122,7 @@ "Setup": "This example assumes \u0060using Descript;\u0060 is in scope and \u0060apiKey\u0060 contains the required credential." }, { - "Order": 11, + "Order": 12, "Title": "Create Import URL", "Slug": "posteditindescriptschema", "Description": "Create an Import URL by sending a Project schema to Descript API from your service\u0027s backend.\n\n### Import Schema\nOur import schemas are specified as a minimal JSON list of files which is detailed in full at the bottom of this\nsection. At it\u0027s smallest, the request body looks like:\n\n\u0060\u0060\u0060\n{\n \u0022partner_drive_id\u0022: \u0022162c61d1-6ced-4b25-a622-7dba922983ee\u0022,\n \u0022project_schema\u0022: {\n \u0022schema_version\u0022: \u00221.0.0\u0022,\n \u0022files\u0022: [{\u0022uri\u0022: \u0022https://descriptusercontent.com/jane.wav?signature=d182bca64bf94a1483d2fd16b579f955\u0022}]\n }\n}\n\u0060\u0060\u0060\n\n### File Access\nThe file paths provided in the schema need to either be public or pre-signed URIs with enough time before\nexpiration for failures and retries, we suggest URIs that won\u0027t expire for 48 hours. We ask that the files have\nalready been saved when the import link is generated to minimize cases where we\u0027re waiting for eventually\nconsistent storage of files that will never be written. We will, however, wait for eventual consistency of the\nstorage layer and retry fetching files before eventually timing out.\n\nFiles must be hosted on preapproved hosts as our import process has an allow list which it checks URIs against.\nFiles will be requested with \u0060User-Agent: Descriptbot/1.0\u0060 (version may change) for tracking purposes.\n\n### Import link expiration\nImport links are no longer valid after a user imports their data once. Viewing an already used import link will\nnot allow for importing again and will not provide access to a previously created Descript Project. Partners are\nable to generate a new import link at any time, regardless of if a previous import link has been used.\n\nThe API does not currently provide partners with a link to the Descript Project, though users will be redirected\nto it from Descript\u0027s web interface the first time they import files, and can always find the Project in Descript.\n\nImport links expire after 3 hours and attempting to use an import link after the pre-signed links in the schema\nfile have expired will result in an error, so we recommend generating the import link after the user has clicked\nthe Edit in Descript button.\n\n### Supported media specification\nWe recommend sending the highest quality, uncompressed versions of files available to you. If you have multiple\ntracks, we recommend prioritizing sending us the full multi-track sequence over a combined file.\n\n* Audio: WAV, FLAC, AAC, MP3\n* Video: h264, HEVC (container: MOV, MP4)", @@ -122,7 +133,7 @@ "Setup": null }, { - "Order": 12, + "Order": 13, "Title": "Get Published Project Metadata", "Slug": "getpublishedprojectmetadata", "Description": "Retrieve metadata for a published Descript project by its URL slug. This endpoint provides information\nabout the published project including title, duration, publisher details, privacy settings, and subtitles.\n\nThis endpoint requires authentication using a personal token and is subject to rate limiting of 1000\nrequests per hour per user.", diff --git a/src/libs/Descript/openapi.yaml b/src/libs/Descript/openapi.yaml index 522b73b..ccf35c4 100644 --- a/src/libs/Descript/openapi.yaml +++ b/src/libs/Descript/openapi.yaml @@ -764,7 +764,15 @@ paths: model: type: string description: | - AI model to use for editing. Defaults to the default model. + AI model to use for editing. Accepts a canonical model id + (e.g. `claude-opus-4.8`, `claude-sonnet-4.6`, `gpt-5.5`, + `gemini-3.5-flash`) or a friendly alias (`auto`, `claude-opus`, + `claude-sonnet`, `claude-haiku`, `gpt`, `gemini-pro`, + `gemini-flash`). Call [GET /agent/models](#operation/listAgentModels) + to discover the current set of supported models and aliases. + + Defaults to `auto` when omitted, which selects a recommended + model for your account. prompt: type: string description: | @@ -811,7 +819,7 @@ paths: summary: Add Studio Sound effect value: project_id: 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb - model: haiku-4.5 + model: claude-haiku-4.5 prompt: add studio sound to every clip remove_filler_words: summary: Remove filler words @@ -866,11 +874,21 @@ paths: format: uri description: URL to access the project in Descript web app example: https://web.descript.com/9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb + resolved_model: + type: string + description: | + Model reported for this request: the canonical id for an explicit + model or alias (e.g. `claude-opus-4.8` for `claude-opus`), or + `auto` for an `auto` request. Lets you confirm the selection + immediately, without waiting for the job result. Matches + `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob). + example: claude-opus-4.8 required: - job_id - drive_id - project_id - project_url + - resolved_model '400': description: | Invalid input: @@ -950,6 +968,162 @@ paths: message: No composition matching '5b507b2b-e3ef-4146-a0d0-6741df516973' found in project 9f36ee32-5a2c-47e7-b1a3-94991d3e3ddb '429': $ref: '#/components/responses/Error429Response' + /agent/models: + get: + tags: + - API Endpoints + summary: List agent models + security: + - bearerAuth: [] + description: | + List the currently available agent models and the aliases that resolve to them. + + The `model` parameter on [POST /jobs/agent](#operation/agentEditJob) accepts any + value listed under `availableModels[].id` or `aliases[].id`. Aliases let you target + the latest + recommended model for a given tier without chasing version bumps — for example, + passing `claude-opus` always routes to whichever Claude Opus version Descript + currently recommends. + + Cost tiers are coarse buckets — `low`, `medium`, `high` — useful for showing + users a relative price/performance signal. Exact pricing is reported per job via + the `ai_credits_used` field on [GET /jobs/{job_id}](#operation/getJob). + + When `model` is omitted on `POST /jobs/agent`, the request defaults to `auto`, which + selects a recommended model for your account. `auto` is a `medium`-cost option. For an + `auto` request, `result.resolved_model` on [GET /jobs/{job_id}](#operation/getJob) reports + `auto`; for an explicit model or alias it reports the canonical id that ran. + operationId: listAgentModels + responses: + '200': + description: Available agent models and aliases + content: + application/json: + schema: + type: object + required: + - availableModels + - aliases + properties: + availableModels: + type: array + description: | + Canonical model ids currently advertised by the public agent API, + each tagged with a coarse cost tier. + items: + type: object + required: + - id + - cost + properties: + id: + type: string + description: Canonical model id to pass as `model` on `POST /jobs/agent`. + example: claude-opus-4.8 + cost: + type: string + enum: + - low + - medium + - high + description: Relative cost tier for this model. + example: high + aliases: + type: array + description: | + Friendly aliases that resolve to one of the `availableModels` at + request time. Pass any alias `id` as `model` and the agent job + result's `result.resolved_model` (on + [GET /jobs/{job_id}](#operation/getJob)) will report the canonical + id that actually ran. + items: + type: object + required: + - id + - resolvesTo + - description + - cost + properties: + id: + type: string + description: Alias id callers can pass as `model`. + example: claude-opus + resolvesTo: + type: string + description: Canonical model id this alias currently resolves to. + example: claude-opus-4.8 + description: + type: string + description: Human-readable description of the alias's intent. + example: Tracks stable Anthropic Claude Opus + cost: + type: string + enum: + - low + - medium + - high + description: Relative cost tier of the model this alias resolves to. + example: high + examples: + default_models: + summary: Current model list and aliases + value: + availableModels: + - id: auto + cost: medium + - id: claude-opus-4.8 + cost: high + - id: claude-opus-4.7 + cost: high + - id: claude-opus-4.6 + cost: high + - id: claude-sonnet-5 + cost: medium + - id: claude-sonnet-4.6 + cost: medium + - id: claude-haiku-4.5 + cost: low + - id: gpt-5.5 + cost: high + - id: gpt-5.4 + cost: medium + - id: gemini-3.5-flash + cost: medium + - id: gemini-3.1-pro + cost: high + aliases: + - id: claude-opus + resolvesTo: claude-opus-4.8 + description: Tracks stable Anthropic Claude Opus + cost: high + - id: claude-sonnet + resolvesTo: claude-sonnet-4.6 + description: Tracks stable Anthropic Claude Sonnet + cost: medium + - id: claude-haiku + resolvesTo: claude-haiku-4.5 + description: Tracks stable Anthropic Claude Haiku + cost: low + - id: gpt + resolvesTo: gpt-5.5 + description: Tracks stable OpenAI GPT + cost: high + - id: gemini-pro + resolvesTo: gemini-3.1-pro + description: Tracks stable Google Gemini Pro + cost: high + - id: gemini-flash + resolvesTo: gemini-3.5-flash + description: Tracks stable Google Gemini Flash + cost: medium + '401': + description: Unauthorized - missing or invalid authentication token + content: + application/json: + schema: + $ref: '#/components/schemas/Error401' + '429': + $ref: '#/components/responses/Error429Response' /jobs/publish: post: tags: @@ -2740,6 +2914,14 @@ components: type: integer description: AI credits consumed by this operation example: 5 + resolved_model: + type: string + description: | + Model reported for this job: the canonical id for an explicit model or + alias (e.g. `claude-opus-4.8` for `claude-opus`), or `auto` for an + `auto` request. Present on jobs submitted via the public API after the + model-aliases launch; older jobs may omit it. + example: claude-opus-4.8 conversation_id: type: string format: uuid @@ -2770,6 +2952,13 @@ components: type: string description: Machine-readable error code example: agent_execution_failed + resolved_model: + type: string + description: | + Model reported for this job: the canonical id for an explicit model or + alias, or `auto` for an `auto` request. Present on jobs submitted via the + public API after the model-aliases launch; older jobs may omit it. + example: claude-opus-4.8 conversation_id: type: string format: uuid