@ai-sdk/provider 4.0.4 → 4.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @ai-sdk/provider
2
2
 
3
+ ## 4.0.6
4
+
5
+ ### Patch Changes
6
+
7
+ - 3469d0c: feat: add batch APIs
8
+
9
+ ## 4.0.5
10
+
11
+ ### Patch Changes
12
+
13
+ - 79e133c: async APIs for generateVideo (poll, webhook)
14
+
15
+ Adds an asynchronous start/status flow to the experimental video model
16
+ interface (`VideoModelV4`): models may now implement `doStart`, `doStatus`,
17
+ and `handleWebhookOption` instead of (or in addition to) `doGenerate`, and
18
+ `experimental_generateVideo` accepts `poll` and `webhook` options to
19
+ orchestrate completion via polling or webhooks. Polling configuration can use
20
+ a custom delay implementation for durable workflow compatibility.
21
+
3
22
  ## 4.0.4
4
23
 
5
24
  ### Patch Changes
package/dist/index.d.ts CHANGED
@@ -331,6 +331,88 @@ type SharedV2ProviderMetadata = Record<string, Record<string, JSONValue>>;
331
331
  */
332
332
  type SharedV2ProviderOptions = Record<string, Record<string, JSONValue>>;
333
333
 
334
+ /**
335
+ * Serializable error information for a batch or batch item.
336
+ */
337
+ type BatchV4Error = {
338
+ readonly message: string;
339
+ readonly type?: string;
340
+ readonly code?: string;
341
+ readonly statusCode?: number;
342
+ };
343
+ /**
344
+ * Normalized lifecycle status for a batch.
345
+ */
346
+ type BatchV4Status = {
347
+ readonly status: 'pending' | 'completed' | 'failed';
348
+ readonly rawStatus?: string;
349
+ readonly requestCounts?: {
350
+ readonly total: number;
351
+ readonly pending: number;
352
+ readonly completed: number;
353
+ readonly failed: number;
354
+ };
355
+ readonly error?: BatchV4Error;
356
+ readonly createdAt?: string;
357
+ readonly expiresAt?: string;
358
+ readonly providerMetadata?: SharedV4ProviderMetadata;
359
+ };
360
+ /**
361
+ * Options for starting a batch.
362
+ */
363
+ type BatchV4StartOptions<REQUEST> = {
364
+ readonly requests: ReadonlyArray<REQUEST>;
365
+ readonly providerOptions?: SharedV4ProviderOptions;
366
+ readonly abortSignal?: AbortSignal;
367
+ readonly headers?: Record<string, string | undefined>;
368
+ };
369
+ /**
370
+ * Result of starting a batch.
371
+ */
372
+ type BatchV4StartResult = BatchV4Status & {
373
+ readonly batchId: string;
374
+ readonly warnings: Array<{
375
+ readonly requestId?: string;
376
+ readonly warning: SharedV4Warning;
377
+ }>;
378
+ };
379
+ /**
380
+ * Options for a batch status or results operation.
381
+ */
382
+ type BatchV4OperationOptions = {
383
+ readonly batchId: string;
384
+ readonly providerOptions?: SharedV4ProviderOptions;
385
+ readonly abortSignal?: AbortSignal;
386
+ readonly headers?: Record<string, string | undefined>;
387
+ };
388
+ /**
389
+ * A complete terminal result for one request in a batch.
390
+ */
391
+ type BatchV4ItemResult<RESULT> = {
392
+ readonly id: string;
393
+ readonly status: 'succeeded';
394
+ readonly result: RESULT;
395
+ } | {
396
+ readonly id: string;
397
+ readonly status: 'failed';
398
+ readonly error: BatchV4Error;
399
+ readonly providerMetadata?: SharedV4ProviderMetadata;
400
+ } | {
401
+ readonly id: string;
402
+ readonly status: 'cancelled' | 'expired';
403
+ readonly error?: BatchV4Error;
404
+ readonly providerMetadata?: SharedV4ProviderMetadata;
405
+ };
406
+ /**
407
+ * Experimental structural capability for models that support durable batch
408
+ * processing.
409
+ */
410
+ type BatchModelV4<REQUEST, RESULT> = {
411
+ experimental_doStartBatch(options: BatchV4StartOptions<REQUEST>): PromiseLike<BatchV4StartResult>;
412
+ experimental_doGetBatchStatus(options: BatchV4OperationOptions): PromiseLike<BatchV4Status>;
413
+ experimental_doGetBatchResults(options: BatchV4OperationOptions): PromiseLike<ReadableStream<BatchV4ItemResult<RESULT>>>;
414
+ };
415
+
334
416
  type EmbeddingModelV4CallOptions = {
335
417
  /**
336
418
  * List of text values to generate embeddings for.
@@ -4854,6 +4936,25 @@ type EmbeddingModelV3Middleware = {
4854
4936
  }) => Promise<Awaited<ReturnType<EmbeddingModelV3['doEmbed']>>>;
4855
4937
  };
4856
4938
 
4939
+ /**
4940
+ * A normalized language model call within a batch.
4941
+ */
4942
+ type LanguageModelV4BatchRequest = {
4943
+ /**
4944
+ * Application-provided identifier used to correlate the request with its
4945
+ * result.
4946
+ */
4947
+ readonly id: string;
4948
+ /**
4949
+ * Normalized text-generation options for the request.
4950
+ */
4951
+ readonly options: Pick<LanguageModelV4CallOptions, 'prompt' | 'maxOutputTokens' | 'temperature' | 'stopSequences' | 'topP' | 'topK' | 'presencePenalty' | 'frequencyPenalty' | 'seed' | 'reasoning' | 'providerOptions'>;
4952
+ };
4953
+ /**
4954
+ * Language model V4 with durable batch-processing support.
4955
+ */
4956
+ type BatchLanguageModelV4 = LanguageModelV4 & BatchModelV4<LanguageModelV4BatchRequest, LanguageModelV4GenerateResult>;
4957
+
4857
4958
  type RerankingModelV4CallOptions = {
4858
4959
  /**
4859
4960
  * Documents to rerank.
@@ -7354,6 +7455,125 @@ type VideoModelV4Result = {
7354
7455
  };
7355
7456
  };
7356
7457
 
7458
+ /**
7459
+ * Result returned by `doStart` when initiating an asynchronous video generation.
7460
+ */
7461
+ type VideoModelV4OperationStartResult = {
7462
+ /**
7463
+ * JSON-serializable opaque reference passed to `doStatus` to check the
7464
+ * status of the generation (e.g., a task ID or prediction URL).
7465
+ */
7466
+ operation: JSONValue;
7467
+ /**
7468
+ * Warnings for the call, e.g. unsupported features.
7469
+ */
7470
+ warnings: Array<SharedV4Warning>;
7471
+ /**
7472
+ * Additional provider-specific metadata.
7473
+ */
7474
+ providerMetadata?: SharedV4ProviderMetadata;
7475
+ /**
7476
+ * Response information for telemetry and debugging purposes.
7477
+ */
7478
+ response: {
7479
+ /**
7480
+ * Timestamp for the start of the response.
7481
+ */
7482
+ timestamp: Date;
7483
+ /**
7484
+ * The ID of the response model that was used.
7485
+ */
7486
+ modelId: string;
7487
+ /**
7488
+ * Response headers.
7489
+ */
7490
+ headers: Record<string, string> | undefined;
7491
+ };
7492
+ };
7493
+
7494
+ /**
7495
+ * Result returned by `doStatus` when checking the status of an
7496
+ * asynchronous video generation.
7497
+ */
7498
+ type VideoModelV4OperationStatusResult = {
7499
+ /**
7500
+ * The video generation is still in progress.
7501
+ */
7502
+ status: 'pending';
7503
+ /**
7504
+ * Warnings for the call.
7505
+ */
7506
+ warnings?: Array<SharedV4Warning>;
7507
+ /**
7508
+ * Additional provider-specific metadata.
7509
+ */
7510
+ providerMetadata?: SharedV4ProviderMetadata;
7511
+ /**
7512
+ * Response information for telemetry and debugging purposes.
7513
+ */
7514
+ response: {
7515
+ timestamp: Date;
7516
+ modelId: string;
7517
+ headers: Record<string, string> | undefined;
7518
+ };
7519
+ } | {
7520
+ /**
7521
+ * The video generation is complete.
7522
+ */
7523
+ status: 'completed';
7524
+ /**
7525
+ * Generated videos.
7526
+ */
7527
+ videos: Array<VideoModelV4VideoData>;
7528
+ /**
7529
+ * Warnings for the call.
7530
+ */
7531
+ warnings: Array<SharedV4Warning>;
7532
+ /**
7533
+ * Additional provider-specific metadata.
7534
+ */
7535
+ providerMetadata?: SharedV4ProviderMetadata;
7536
+ /**
7537
+ * Response information for telemetry and debugging purposes.
7538
+ */
7539
+ response: {
7540
+ timestamp: Date;
7541
+ modelId: string;
7542
+ headers: Record<string, string> | undefined;
7543
+ };
7544
+ } | {
7545
+ /**
7546
+ * The video generation failed.
7547
+ */
7548
+ status: 'error';
7549
+ /**
7550
+ * A human-readable error message describing why the generation failed.
7551
+ */
7552
+ error: string;
7553
+ /**
7554
+ * Additional provider-specific metadata.
7555
+ */
7556
+ providerMetadata?: SharedV4ProviderMetadata;
7557
+ /**
7558
+ * Response information for telemetry and debugging purposes.
7559
+ */
7560
+ response: {
7561
+ timestamp: Date;
7562
+ modelId: string;
7563
+ headers: Record<string, string> | undefined;
7564
+ };
7565
+ };
7566
+
7567
+ /**
7568
+ * Data received from a webhook notification during asynchronous video
7569
+ * generation. Generic over the body type so providers/consumers can
7570
+ * narrow it to a specific shape.
7571
+ */
7572
+ type VideoModelV4OperationWebhook<TBody = JSONValue> = {
7573
+ headers: Record<string, string>;
7574
+ body: TBody;
7575
+ };
7576
+
7357
7577
  type GetMaxVideosPerCallFunction$1 = (options: {
7358
7578
  modelId: string;
7359
7579
  }) => PromiseLike<number | undefined> | number | undefined;
@@ -7389,8 +7609,80 @@ type VideoModelV4 = {
7389
7609
  readonly maxVideosPerCall: number | undefined | GetMaxVideosPerCallFunction$1;
7390
7610
  /**
7391
7611
  * Generates an array of videos.
7612
+ *
7613
+ * Optional when `doStart` and `doStatus` are provided to support
7614
+ * the asynchronous start/status flow.
7615
+ */
7616
+ doGenerate?(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
7617
+ /**
7618
+ * Optional method that handles the user's `webhook` option for the
7619
+ * asynchronous start/status flow.
7620
+ *
7621
+ * Its presence on the model signals that the provider's API natively
7622
+ * supports webhooks. The SDK checks for this method before invoking the
7623
+ * user-provided `webhook` factory:
7624
+ *
7625
+ * - **Present**: The SDK calls this method with the user's webhook factory.
7626
+ * The implementation should invoke the factory to obtain a webhook URL
7627
+ * and a `received` promise. The URL is then forwarded to `doStart` via
7628
+ * `webhookUrl`, and the SDK awaits `received` instead of polling.
7629
+ *
7630
+ * - **Absent**: The SDK never calls the user's `webhook` factory and falls
7631
+ * back to polling via `doStatus`. This avoids unnecessary webhook
7632
+ * endpoint creation for providers whose APIs have no native webhook
7633
+ * mechanism.
7634
+ *
7635
+ * This method exists because the SDK must decide whether to invoke the
7636
+ * user's webhook factory — which may create real HTTP endpoints or
7637
+ * external resources — *before* calling `doStart`. Without an explicit
7638
+ * capability signal on the model, the SDK would eagerly create a webhook
7639
+ * endpoint for every provider, even those that silently ignore the URL.
7392
7640
  */
7393
- doGenerate(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
7641
+ handleWebhookOption?: (options: {
7642
+ webhook: () => PromiseLike<{
7643
+ url: string;
7644
+ received: PromiseLike<VideoModelV4OperationWebhook>;
7645
+ }>;
7646
+ }) => PromiseLike<{
7647
+ webhookUrl: string;
7648
+ received: PromiseLike<VideoModelV4OperationWebhook>;
7649
+ }>;
7650
+ /**
7651
+ * Starts an asynchronous video generation and returns an opaque operation
7652
+ * reference that can be passed to `doStatus` to poll for completion.
7653
+ *
7654
+ * When both `doStart` and `doStatus` are implemented, the SDK core can
7655
+ * orchestrate polling or webhook-based completion instead of requiring
7656
+ * the provider to implement its own polling loop in `doGenerate`.
7657
+ */
7658
+ doStart?(options: VideoModelV4CallOptions & {
7659
+ /**
7660
+ * When provided, the provider should register this URL to receive
7661
+ * a webhook notification when the video generation completes.
7662
+ */
7663
+ webhookUrl?: string;
7664
+ }): PromiseLike<VideoModelV4OperationStartResult>;
7665
+ /**
7666
+ * Checks the status of an asynchronous video generation that was
7667
+ * started with `doStart`.
7668
+ *
7669
+ * Returns either a `pending` status or a `completed` status with the
7670
+ * generated videos.
7671
+ */
7672
+ doStatus?(options: {
7673
+ /**
7674
+ * The JSON-serializable opaque operation reference returned by `doStart`.
7675
+ */
7676
+ operation: JSONValue;
7677
+ /**
7678
+ * Abort signal for cancelling the operation.
7679
+ */
7680
+ abortSignal?: AbortSignal;
7681
+ /**
7682
+ * Additional HTTP headers.
7683
+ */
7684
+ headers?: Record<string, string | undefined>;
7685
+ }): PromiseLike<VideoModelV4OperationStatusResult>;
7394
7686
  };
7395
7687
 
7396
7688
  /**
@@ -7648,4 +7940,4 @@ type VideoModelV3 = {
7648
7940
  }>;
7649
7941
  };
7650
7942
 
7651
- export { AISDKError, APICallError, type EmbeddingModelV2, type EmbeddingModelV2Embedding, type EmbeddingModelV3, type EmbeddingModelV3CallOptions, type EmbeddingModelV3Embedding, type EmbeddingModelV3Middleware, type EmbeddingModelV3Result, type EmbeddingModelV4, type EmbeddingModelV4CallOptions, type EmbeddingModelV4Embedding, type EmbeddingModelV4Middleware, type EmbeddingModelV4Result, EmptyResponseBodyError, type RealtimeFactoryV4 as Experimental_RealtimeFactoryV4, type RealtimeFactoryV4GetTokenOptions as Experimental_RealtimeFactoryV4GetTokenOptions, type RealtimeFactoryV4GetTokenResult as Experimental_RealtimeFactoryV4GetTokenResult, type RealtimeModelV4 as Experimental_RealtimeModelV4, type RealtimeModelV4AudioMessage as Experimental_RealtimeModelV4AudioMessage, type RealtimeModelV4ClientEvent as Experimental_RealtimeModelV4ClientEvent, type RealtimeModelV4ClientSecretOptions as Experimental_RealtimeModelV4ClientSecretOptions, type RealtimeModelV4ClientSecretResult as Experimental_RealtimeModelV4ClientSecretResult, type RealtimeModelV4ConversationItem as Experimental_RealtimeModelV4ConversationItem, type RealtimeModelV4FunctionCallOutput as Experimental_RealtimeModelV4FunctionCallOutput, type RealtimeModelV4ServerEvent as Experimental_RealtimeModelV4ServerEvent, type RealtimeModelV4SessionConfig as Experimental_RealtimeModelV4SessionConfig, type RealtimeModelV4TextMessage as Experimental_RealtimeModelV4TextMessage, type RealtimeModelV4ToolDefinition as Experimental_RealtimeModelV4ToolDefinition, type SpeechTranslationModelV4 as Experimental_SpeechTranslationModelV4, type SpeechTranslationModelV4StreamOptions as Experimental_SpeechTranslationModelV4StreamOptions, type SpeechTranslationModelV4StreamPart as Experimental_SpeechTranslationModelV4StreamPart, type SpeechTranslationModelV4StreamResult as Experimental_SpeechTranslationModelV4StreamResult, type SpeechTranslationModelV4Usage as Experimental_SpeechTranslationModelV4Usage, type TranscriptionModelV4StreamOptions as Experimental_TranscriptionModelV4StreamOptions, type TranscriptionModelV4StreamPart as Experimental_TranscriptionModelV4StreamPart, type TranscriptionModelV4StreamResult as Experimental_TranscriptionModelV4StreamResult, type VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3FrameImage as Experimental_VideoModelV3FrameImage, type VideoModelV3FrameType as Experimental_VideoModelV3FrameType, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, type VideoModelV4FrameImage as Experimental_VideoModelV4FrameImage, type VideoModelV4FrameType as Experimental_VideoModelV4FrameType, type VideoModelV4Result as Experimental_VideoModelV4Result, type VideoModelV4VideoData as Experimental_VideoModelV4VideoData, type FilesV4, type FilesV4UploadFileCallOptions, type FilesV4UploadFileResult, type ImageModelV2, type ImageModelV2CallOptions, type ImageModelV2CallWarning, type ImageModelV2ProviderMetadata, type ImageModelV3, type ImageModelV3CallOptions, type ImageModelV3File, type ImageModelV3Middleware, type ImageModelV3ProviderMetadata, type ImageModelV3Usage, type ImageModelV4, type ImageModelV4CallOptions, type ImageModelV4File, type ImageModelV4Middleware, type ImageModelV4ProviderMetadata, type ImageModelV4Result, type ImageModelV4Usage, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV2, type LanguageModelV2CallOptions, type LanguageModelV2CallWarning, type LanguageModelV2Content, type LanguageModelV2DataContent, type LanguageModelV2File, type LanguageModelV2FilePart, type LanguageModelV2FinishReason, type LanguageModelV2FunctionTool, type LanguageModelV2Message, type LanguageModelV2Middleware, type LanguageModelV2Prompt, type LanguageModelV2ProviderDefinedTool, type LanguageModelV2Reasoning, type LanguageModelV2ReasoningPart, type LanguageModelV2ResponseMetadata, type LanguageModelV2Source, type LanguageModelV2StreamPart, type LanguageModelV2Text, type LanguageModelV2TextPart, type LanguageModelV2ToolCall, type LanguageModelV2ToolCallPart, type LanguageModelV2ToolChoice, type LanguageModelV2ToolResultOutput, type LanguageModelV2ToolResultPart, type LanguageModelV2Usage, type LanguageModelV3, type LanguageModelV3CallOptions, type LanguageModelV3Content, type LanguageModelV3DataContent, type LanguageModelV3File, type LanguageModelV3FilePart, type LanguageModelV3FinishReason, type LanguageModelV3FunctionTool, type LanguageModelV3GenerateResult, type LanguageModelV3Message, type LanguageModelV3Middleware, type LanguageModelV3Prompt, type LanguageModelV3ProviderTool, type LanguageModelV3Reasoning, type LanguageModelV3ReasoningPart, type LanguageModelV3ResponseMetadata, type LanguageModelV3Source, type LanguageModelV3StreamPart, type LanguageModelV3StreamResult, type LanguageModelV3Text, type LanguageModelV3TextPart, type LanguageModelV3ToolApprovalRequest, type LanguageModelV3ToolApprovalResponsePart, type LanguageModelV3ToolCall, type LanguageModelV3ToolCallPart, type LanguageModelV3ToolChoice, type LanguageModelV3ToolResult, type LanguageModelV3ToolResultOutput, type LanguageModelV3ToolResultPart, type LanguageModelV3Usage, type LanguageModelV4, type LanguageModelV4CallOptions, type LanguageModelV4Content, type LanguageModelV4CustomContent, type LanguageModelV4CustomPart, type LanguageModelV4File, type LanguageModelV4FilePart, type LanguageModelV4FinishReason, type LanguageModelV4FunctionTool, type LanguageModelV4GenerateResult, type LanguageModelV4Message, type LanguageModelV4Middleware, type LanguageModelV4Prompt, type LanguageModelV4ProviderTool, type LanguageModelV4Reasoning, type LanguageModelV4ReasoningFile, type LanguageModelV4ReasoningFilePart, type LanguageModelV4ReasoningPart, type LanguageModelV4ResponseMetadata, type LanguageModelV4Source, type LanguageModelV4StreamPart, type LanguageModelV4StreamResult, type LanguageModelV4Text, type LanguageModelV4TextPart, type LanguageModelV4ToolApprovalRequest, type LanguageModelV4ToolApprovalResponsePart, type LanguageModelV4ToolCall, type LanguageModelV4ToolCallPart, type LanguageModelV4ToolChoice, type LanguageModelV4ToolResult, type LanguageModelV4ToolResultOutput, type LanguageModelV4ToolResultPart, type LanguageModelV4Usage, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ProviderV2, type ProviderV3, type ProviderV4, type RerankingModelV3, type RerankingModelV3CallOptions, type RerankingModelV4, type RerankingModelV4CallOptions, type RerankingModelV4Result, type SharedV2Headers, type SharedV2ProviderMetadata, type SharedV2ProviderOptions, type SharedV3Headers, type SharedV3ProviderMetadata, type SharedV3ProviderOptions, type SharedV3Warning, type SharedV4AudioFormat, type SharedV4FileData, type SharedV4FileDataData, type SharedV4FileDataReference, type SharedV4FileDataText, type SharedV4FileDataUrl, type SharedV4Headers, type SharedV4ProviderMetadata, type SharedV4ProviderOptions, type SharedV4ProviderReference, type SharedV4Warning, type SkillsV4, type SkillsV4File, type SkillsV4UploadSkillCallOptions, type SkillsV4UploadSkillResult, type SpeechModelV2, type SpeechModelV2CallOptions, type SpeechModelV2CallWarning, type SpeechModelV3, type SpeechModelV3CallOptions, type SpeechModelV4, type SpeechModelV4CallOptions, type SpeechModelV4Result, TooManyEmbeddingValuesForCallError, type TranscriptionModelV2, type TranscriptionModelV2CallOptions, type TranscriptionModelV2CallWarning, type TranscriptionModelV3, type TranscriptionModelV3CallOptions, type TranscriptionModelV4, type TranscriptionModelV4CallOptions, type TranscriptionModelV4Result, type TypeValidationContext, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue };
7943
+ export { AISDKError, APICallError, type EmbeddingModelV2, type EmbeddingModelV2Embedding, type EmbeddingModelV3, type EmbeddingModelV3CallOptions, type EmbeddingModelV3Embedding, type EmbeddingModelV3Middleware, type EmbeddingModelV3Result, type EmbeddingModelV4, type EmbeddingModelV4CallOptions, type EmbeddingModelV4Embedding, type EmbeddingModelV4Middleware, type EmbeddingModelV4Result, EmptyResponseBodyError, type BatchLanguageModelV4 as Experimental_BatchLanguageModelV4, type BatchModelV4 as Experimental_BatchModelV4, type BatchV4Error as Experimental_BatchV4Error, type BatchV4ItemResult as Experimental_BatchV4ItemResult, type BatchV4OperationOptions as Experimental_BatchV4OperationOptions, type BatchV4StartOptions as Experimental_BatchV4StartOptions, type BatchV4StartResult as Experimental_BatchV4StartResult, type BatchV4Status as Experimental_BatchV4Status, type LanguageModelV4BatchRequest as Experimental_LanguageModelV4BatchRequest, type RealtimeFactoryV4 as Experimental_RealtimeFactoryV4, type RealtimeFactoryV4GetTokenOptions as Experimental_RealtimeFactoryV4GetTokenOptions, type RealtimeFactoryV4GetTokenResult as Experimental_RealtimeFactoryV4GetTokenResult, type RealtimeModelV4 as Experimental_RealtimeModelV4, type RealtimeModelV4AudioMessage as Experimental_RealtimeModelV4AudioMessage, type RealtimeModelV4ClientEvent as Experimental_RealtimeModelV4ClientEvent, type RealtimeModelV4ClientSecretOptions as Experimental_RealtimeModelV4ClientSecretOptions, type RealtimeModelV4ClientSecretResult as Experimental_RealtimeModelV4ClientSecretResult, type RealtimeModelV4ConversationItem as Experimental_RealtimeModelV4ConversationItem, type RealtimeModelV4FunctionCallOutput as Experimental_RealtimeModelV4FunctionCallOutput, type RealtimeModelV4ServerEvent as Experimental_RealtimeModelV4ServerEvent, type RealtimeModelV4SessionConfig as Experimental_RealtimeModelV4SessionConfig, type RealtimeModelV4TextMessage as Experimental_RealtimeModelV4TextMessage, type RealtimeModelV4ToolDefinition as Experimental_RealtimeModelV4ToolDefinition, type SpeechTranslationModelV4 as Experimental_SpeechTranslationModelV4, type SpeechTranslationModelV4StreamOptions as Experimental_SpeechTranslationModelV4StreamOptions, type SpeechTranslationModelV4StreamPart as Experimental_SpeechTranslationModelV4StreamPart, type SpeechTranslationModelV4StreamResult as Experimental_SpeechTranslationModelV4StreamResult, type SpeechTranslationModelV4Usage as Experimental_SpeechTranslationModelV4Usage, type TranscriptionModelV4StreamOptions as Experimental_TranscriptionModelV4StreamOptions, type TranscriptionModelV4StreamPart as Experimental_TranscriptionModelV4StreamPart, type TranscriptionModelV4StreamResult as Experimental_TranscriptionModelV4StreamResult, type VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3FrameImage as Experimental_VideoModelV3FrameImage, type VideoModelV3FrameType as Experimental_VideoModelV3FrameType, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, type VideoModelV4FrameImage as Experimental_VideoModelV4FrameImage, type VideoModelV4FrameType as Experimental_VideoModelV4FrameType, type VideoModelV4OperationStartResult as Experimental_VideoModelV4OperationStartResult, type VideoModelV4OperationStatusResult as Experimental_VideoModelV4OperationStatusResult, type VideoModelV4OperationWebhook as Experimental_VideoModelV4OperationWebhook, type VideoModelV4Result as Experimental_VideoModelV4Result, type VideoModelV4VideoData as Experimental_VideoModelV4VideoData, type FilesV4, type FilesV4UploadFileCallOptions, type FilesV4UploadFileResult, type ImageModelV2, type ImageModelV2CallOptions, type ImageModelV2CallWarning, type ImageModelV2ProviderMetadata, type ImageModelV3, type ImageModelV3CallOptions, type ImageModelV3File, type ImageModelV3Middleware, type ImageModelV3ProviderMetadata, type ImageModelV3Usage, type ImageModelV4, type ImageModelV4CallOptions, type ImageModelV4File, type ImageModelV4Middleware, type ImageModelV4ProviderMetadata, type ImageModelV4Result, type ImageModelV4Usage, InvalidArgumentError, InvalidPromptError, InvalidResponseDataError, type JSONArray, type JSONObject, JSONParseError, type JSONValue, type LanguageModelV2, type LanguageModelV2CallOptions, type LanguageModelV2CallWarning, type LanguageModelV2Content, type LanguageModelV2DataContent, type LanguageModelV2File, type LanguageModelV2FilePart, type LanguageModelV2FinishReason, type LanguageModelV2FunctionTool, type LanguageModelV2Message, type LanguageModelV2Middleware, type LanguageModelV2Prompt, type LanguageModelV2ProviderDefinedTool, type LanguageModelV2Reasoning, type LanguageModelV2ReasoningPart, type LanguageModelV2ResponseMetadata, type LanguageModelV2Source, type LanguageModelV2StreamPart, type LanguageModelV2Text, type LanguageModelV2TextPart, type LanguageModelV2ToolCall, type LanguageModelV2ToolCallPart, type LanguageModelV2ToolChoice, type LanguageModelV2ToolResultOutput, type LanguageModelV2ToolResultPart, type LanguageModelV2Usage, type LanguageModelV3, type LanguageModelV3CallOptions, type LanguageModelV3Content, type LanguageModelV3DataContent, type LanguageModelV3File, type LanguageModelV3FilePart, type LanguageModelV3FinishReason, type LanguageModelV3FunctionTool, type LanguageModelV3GenerateResult, type LanguageModelV3Message, type LanguageModelV3Middleware, type LanguageModelV3Prompt, type LanguageModelV3ProviderTool, type LanguageModelV3Reasoning, type LanguageModelV3ReasoningPart, type LanguageModelV3ResponseMetadata, type LanguageModelV3Source, type LanguageModelV3StreamPart, type LanguageModelV3StreamResult, type LanguageModelV3Text, type LanguageModelV3TextPart, type LanguageModelV3ToolApprovalRequest, type LanguageModelV3ToolApprovalResponsePart, type LanguageModelV3ToolCall, type LanguageModelV3ToolCallPart, type LanguageModelV3ToolChoice, type LanguageModelV3ToolResult, type LanguageModelV3ToolResultOutput, type LanguageModelV3ToolResultPart, type LanguageModelV3Usage, type LanguageModelV4, type LanguageModelV4CallOptions, type LanguageModelV4Content, type LanguageModelV4CustomContent, type LanguageModelV4CustomPart, type LanguageModelV4File, type LanguageModelV4FilePart, type LanguageModelV4FinishReason, type LanguageModelV4FunctionTool, type LanguageModelV4GenerateResult, type LanguageModelV4Message, type LanguageModelV4Middleware, type LanguageModelV4Prompt, type LanguageModelV4ProviderTool, type LanguageModelV4Reasoning, type LanguageModelV4ReasoningFile, type LanguageModelV4ReasoningFilePart, type LanguageModelV4ReasoningPart, type LanguageModelV4ResponseMetadata, type LanguageModelV4Source, type LanguageModelV4StreamPart, type LanguageModelV4StreamResult, type LanguageModelV4Text, type LanguageModelV4TextPart, type LanguageModelV4ToolApprovalRequest, type LanguageModelV4ToolApprovalResponsePart, type LanguageModelV4ToolCall, type LanguageModelV4ToolCallPart, type LanguageModelV4ToolChoice, type LanguageModelV4ToolResult, type LanguageModelV4ToolResultOutput, type LanguageModelV4ToolResultPart, type LanguageModelV4Usage, LoadAPIKeyError, LoadSettingError, NoContentGeneratedError, NoSuchModelError, NoSuchProviderReferenceError, type ProviderV2, type ProviderV3, type ProviderV4, type RerankingModelV3, type RerankingModelV3CallOptions, type RerankingModelV4, type RerankingModelV4CallOptions, type RerankingModelV4Result, type SharedV2Headers, type SharedV2ProviderMetadata, type SharedV2ProviderOptions, type SharedV3Headers, type SharedV3ProviderMetadata, type SharedV3ProviderOptions, type SharedV3Warning, type SharedV4AudioFormat, type SharedV4FileData, type SharedV4FileDataData, type SharedV4FileDataReference, type SharedV4FileDataText, type SharedV4FileDataUrl, type SharedV4Headers, type SharedV4ProviderMetadata, type SharedV4ProviderOptions, type SharedV4ProviderReference, type SharedV4Warning, type SkillsV4, type SkillsV4File, type SkillsV4UploadSkillCallOptions, type SkillsV4UploadSkillResult, type SpeechModelV2, type SpeechModelV2CallOptions, type SpeechModelV2CallWarning, type SpeechModelV3, type SpeechModelV3CallOptions, type SpeechModelV4, type SpeechModelV4CallOptions, type SpeechModelV4Result, TooManyEmbeddingValuesForCallError, type TranscriptionModelV2, type TranscriptionModelV2CallOptions, type TranscriptionModelV2CallWarning, type TranscriptionModelV3, type TranscriptionModelV3CallOptions, type TranscriptionModelV4, type TranscriptionModelV4CallOptions, type TranscriptionModelV4Result, type TypeValidationContext, TypeValidationError, UnsupportedFunctionalityError, getErrorMessage, isJSONArray, isJSONObject, isJSONValue };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "4.0.4",
3
+ "version": "4.0.6",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -0,0 +1 @@
1
+ export * from './v4/index';
@@ -0,0 +1,104 @@
1
+ import type {
2
+ SharedV4ProviderMetadata,
3
+ SharedV4ProviderOptions,
4
+ SharedV4Warning,
5
+ } from '../../shared';
6
+
7
+ /**
8
+ * Serializable error information for a batch or batch item.
9
+ */
10
+ export type BatchV4Error = {
11
+ readonly message: string;
12
+ readonly type?: string;
13
+ readonly code?: string;
14
+ readonly statusCode?: number;
15
+ };
16
+
17
+ /**
18
+ * Normalized lifecycle status for a batch.
19
+ */
20
+ export type BatchV4Status = {
21
+ readonly status: 'pending' | 'completed' | 'failed';
22
+ readonly rawStatus?: string;
23
+ readonly requestCounts?: {
24
+ readonly total: number;
25
+ readonly pending: number;
26
+ readonly completed: number;
27
+ readonly failed: number;
28
+ };
29
+ readonly error?: BatchV4Error;
30
+ readonly createdAt?: string;
31
+ readonly expiresAt?: string;
32
+ readonly providerMetadata?: SharedV4ProviderMetadata;
33
+ };
34
+
35
+ /**
36
+ * Options for starting a batch.
37
+ */
38
+ export type BatchV4StartOptions<REQUEST> = {
39
+ readonly requests: ReadonlyArray<REQUEST>;
40
+ readonly providerOptions?: SharedV4ProviderOptions;
41
+ readonly abortSignal?: AbortSignal;
42
+ readonly headers?: Record<string, string | undefined>;
43
+ };
44
+
45
+ /**
46
+ * Result of starting a batch.
47
+ */
48
+ export type BatchV4StartResult = BatchV4Status & {
49
+ readonly batchId: string;
50
+ readonly warnings: Array<{
51
+ readonly requestId?: string;
52
+ readonly warning: SharedV4Warning;
53
+ }>;
54
+ };
55
+
56
+ /**
57
+ * Options for a batch status or results operation.
58
+ */
59
+ export type BatchV4OperationOptions = {
60
+ readonly batchId: string;
61
+ readonly providerOptions?: SharedV4ProviderOptions;
62
+ readonly abortSignal?: AbortSignal;
63
+ readonly headers?: Record<string, string | undefined>;
64
+ };
65
+
66
+ /**
67
+ * A complete terminal result for one request in a batch.
68
+ */
69
+ export type BatchV4ItemResult<RESULT> =
70
+ | {
71
+ readonly id: string;
72
+ readonly status: 'succeeded';
73
+ readonly result: RESULT;
74
+ }
75
+ | {
76
+ readonly id: string;
77
+ readonly status: 'failed';
78
+ readonly error: BatchV4Error;
79
+ readonly providerMetadata?: SharedV4ProviderMetadata;
80
+ }
81
+ | {
82
+ readonly id: string;
83
+ readonly status: 'cancelled' | 'expired';
84
+ readonly error?: BatchV4Error;
85
+ readonly providerMetadata?: SharedV4ProviderMetadata;
86
+ };
87
+
88
+ /**
89
+ * Experimental structural capability for models that support durable batch
90
+ * processing.
91
+ */
92
+ export type BatchModelV4<REQUEST, RESULT> = {
93
+ experimental_doStartBatch(
94
+ options: BatchV4StartOptions<REQUEST>,
95
+ ): PromiseLike<BatchV4StartResult>;
96
+
97
+ experimental_doGetBatchStatus(
98
+ options: BatchV4OperationOptions,
99
+ ): PromiseLike<BatchV4Status>;
100
+
101
+ experimental_doGetBatchResults(
102
+ options: BatchV4OperationOptions,
103
+ ): PromiseLike<ReadableStream<BatchV4ItemResult<RESULT>>>;
104
+ };
@@ -0,0 +1,9 @@
1
+ export type {
2
+ BatchModelV4 as Experimental_BatchModelV4,
3
+ BatchV4Error as Experimental_BatchV4Error,
4
+ BatchV4ItemResult as Experimental_BatchV4ItemResult,
5
+ BatchV4OperationOptions as Experimental_BatchV4OperationOptions,
6
+ BatchV4StartOptions as Experimental_BatchV4StartOptions,
7
+ BatchV4StartResult as Experimental_BatchV4StartResult,
8
+ BatchV4Status as Experimental_BatchV4Status,
9
+ } from './batch-v4';
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './batch/index';
1
2
  export * from './embedding-model/index';
2
3
  export * from './errors/index';
3
4
  export * from './files/index';
@@ -20,3 +20,7 @@ export * from './language-model-v4-tool-call';
20
20
  export * from './language-model-v4-tool-choice';
21
21
  export * from './language-model-v4-tool-result';
22
22
  export * from './language-model-v4-usage';
23
+ export type {
24
+ BatchLanguageModelV4 as Experimental_BatchLanguageModelV4,
25
+ LanguageModelV4BatchRequest as Experimental_LanguageModelV4BatchRequest,
26
+ } from './language-model-v4-batch';
@@ -0,0 +1,39 @@
1
+ import type { BatchModelV4 } from '../../batch/v4/batch-v4';
2
+ import type { LanguageModelV4 } from './language-model-v4';
3
+ import type { LanguageModelV4CallOptions } from './language-model-v4-call-options';
4
+ import type { LanguageModelV4GenerateResult } from './language-model-v4-generate-result';
5
+
6
+ /**
7
+ * A normalized language model call within a batch.
8
+ */
9
+ export type LanguageModelV4BatchRequest = {
10
+ /**
11
+ * Application-provided identifier used to correlate the request with its
12
+ * result.
13
+ */
14
+ readonly id: string;
15
+
16
+ /**
17
+ * Normalized text-generation options for the request.
18
+ */
19
+ readonly options: Pick<
20
+ LanguageModelV4CallOptions,
21
+ | 'prompt'
22
+ | 'maxOutputTokens'
23
+ | 'temperature'
24
+ | 'stopSequences'
25
+ | 'topP'
26
+ | 'topK'
27
+ | 'presencePenalty'
28
+ | 'frequencyPenalty'
29
+ | 'seed'
30
+ | 'reasoning'
31
+ | 'providerOptions'
32
+ >;
33
+ };
34
+
35
+ /**
36
+ * Language model V4 with durable batch-processing support.
37
+ */
38
+ export type BatchLanguageModelV4 = LanguageModelV4 &
39
+ BatchModelV4<LanguageModelV4BatchRequest, LanguageModelV4GenerateResult>;
@@ -5,6 +5,9 @@ export type {
5
5
  VideoModelV4VideoData as Experimental_VideoModelV4VideoData,
6
6
  } from './video-model-v4-result';
7
7
  export type { VideoModelV4File as Experimental_VideoModelV4File } from './video-model-v4-file';
8
+ export type { VideoModelV4OperationStartResult as Experimental_VideoModelV4OperationStartResult } from './video-model-v4-operation-start-result';
9
+ export type { VideoModelV4OperationStatusResult as Experimental_VideoModelV4OperationStatusResult } from './video-model-v4-operation-status-result';
10
+ export type { VideoModelV4OperationWebhook as Experimental_VideoModelV4OperationWebhook } from './video-model-v4-operation-webhook';
8
11
  export type {
9
12
  VideoModelV4FrameImage as Experimental_VideoModelV4FrameImage,
10
13
  VideoModelV4FrameType as Experimental_VideoModelV4FrameType,
@@ -0,0 +1,44 @@
1
+ import type { JSONValue } from '../../json-value/json-value';
2
+ import type { SharedV4ProviderMetadata } from '../../shared/v4/shared-v4-provider-metadata';
3
+ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
4
+
5
+ /**
6
+ * Result returned by `doStart` when initiating an asynchronous video generation.
7
+ */
8
+ export type VideoModelV4OperationStartResult = {
9
+ /**
10
+ * JSON-serializable opaque reference passed to `doStatus` to check the
11
+ * status of the generation (e.g., a task ID or prediction URL).
12
+ */
13
+ operation: JSONValue;
14
+
15
+ /**
16
+ * Warnings for the call, e.g. unsupported features.
17
+ */
18
+ warnings: Array<SharedV4Warning>;
19
+
20
+ /**
21
+ * Additional provider-specific metadata.
22
+ */
23
+ providerMetadata?: SharedV4ProviderMetadata;
24
+
25
+ /**
26
+ * Response information for telemetry and debugging purposes.
27
+ */
28
+ response: {
29
+ /**
30
+ * Timestamp for the start of the response.
31
+ */
32
+ timestamp: Date;
33
+
34
+ /**
35
+ * The ID of the response model that was used.
36
+ */
37
+ modelId: string;
38
+
39
+ /**
40
+ * Response headers.
41
+ */
42
+ headers: Record<string, string> | undefined;
43
+ };
44
+ };
@@ -0,0 +1,89 @@
1
+ import type { SharedV4ProviderMetadata } from '../../shared/v4/shared-v4-provider-metadata';
2
+ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
3
+ import type { VideoModelV4VideoData } from './video-model-v4-result';
4
+
5
+ /**
6
+ * Result returned by `doStatus` when checking the status of an
7
+ * asynchronous video generation.
8
+ */
9
+ export type VideoModelV4OperationStatusResult =
10
+ | {
11
+ /**
12
+ * The video generation is still in progress.
13
+ */
14
+ status: 'pending';
15
+
16
+ /**
17
+ * Warnings for the call.
18
+ */
19
+ warnings?: Array<SharedV4Warning>;
20
+
21
+ /**
22
+ * Additional provider-specific metadata.
23
+ */
24
+ providerMetadata?: SharedV4ProviderMetadata;
25
+
26
+ /**
27
+ * Response information for telemetry and debugging purposes.
28
+ */
29
+ response: {
30
+ timestamp: Date;
31
+ modelId: string;
32
+ headers: Record<string, string> | undefined;
33
+ };
34
+ }
35
+ | {
36
+ /**
37
+ * The video generation is complete.
38
+ */
39
+ status: 'completed';
40
+
41
+ /**
42
+ * Generated videos.
43
+ */
44
+ videos: Array<VideoModelV4VideoData>;
45
+
46
+ /**
47
+ * Warnings for the call.
48
+ */
49
+ warnings: Array<SharedV4Warning>;
50
+
51
+ /**
52
+ * Additional provider-specific metadata.
53
+ */
54
+ providerMetadata?: SharedV4ProviderMetadata;
55
+
56
+ /**
57
+ * Response information for telemetry and debugging purposes.
58
+ */
59
+ response: {
60
+ timestamp: Date;
61
+ modelId: string;
62
+ headers: Record<string, string> | undefined;
63
+ };
64
+ }
65
+ | {
66
+ /**
67
+ * The video generation failed.
68
+ */
69
+ status: 'error';
70
+
71
+ /**
72
+ * A human-readable error message describing why the generation failed.
73
+ */
74
+ error: string;
75
+
76
+ /**
77
+ * Additional provider-specific metadata.
78
+ */
79
+ providerMetadata?: SharedV4ProviderMetadata;
80
+
81
+ /**
82
+ * Response information for telemetry and debugging purposes.
83
+ */
84
+ response: {
85
+ timestamp: Date;
86
+ modelId: string;
87
+ headers: Record<string, string> | undefined;
88
+ };
89
+ };
@@ -0,0 +1,11 @@
1
+ import type { JSONValue } from '../../json-value/json-value';
2
+
3
+ /**
4
+ * Data received from a webhook notification during asynchronous video
5
+ * generation. Generic over the body type so providers/consumers can
6
+ * narrow it to a specific shape.
7
+ */
8
+ export type VideoModelV4OperationWebhook<TBody = JSONValue> = {
9
+ headers: Record<string, string>;
10
+ body: TBody;
11
+ };
@@ -1,5 +1,9 @@
1
+ import type { JSONValue } from '../../json-value/json-value';
1
2
  import type { VideoModelV4CallOptions } from './video-model-v4-call-options';
2
3
  import type { VideoModelV4Result } from './video-model-v4-result';
4
+ import type { VideoModelV4OperationStartResult } from './video-model-v4-operation-start-result';
5
+ import type { VideoModelV4OperationStatusResult } from './video-model-v4-operation-status-result';
6
+ import type { VideoModelV4OperationWebhook } from './video-model-v4-operation-webhook';
3
7
 
4
8
  type GetMaxVideosPerCallFunction = (options: {
5
9
  modelId: string;
@@ -41,6 +45,87 @@ export type VideoModelV4 = {
41
45
 
42
46
  /**
43
47
  * Generates an array of videos.
48
+ *
49
+ * Optional when `doStart` and `doStatus` are provided to support
50
+ * the asynchronous start/status flow.
51
+ */
52
+ doGenerate?(
53
+ options: VideoModelV4CallOptions,
54
+ ): PromiseLike<VideoModelV4Result>;
55
+
56
+ /**
57
+ * Optional method that handles the user's `webhook` option for the
58
+ * asynchronous start/status flow.
59
+ *
60
+ * Its presence on the model signals that the provider's API natively
61
+ * supports webhooks. The SDK checks for this method before invoking the
62
+ * user-provided `webhook` factory:
63
+ *
64
+ * - **Present**: The SDK calls this method with the user's webhook factory.
65
+ * The implementation should invoke the factory to obtain a webhook URL
66
+ * and a `received` promise. The URL is then forwarded to `doStart` via
67
+ * `webhookUrl`, and the SDK awaits `received` instead of polling.
68
+ *
69
+ * - **Absent**: The SDK never calls the user's `webhook` factory and falls
70
+ * back to polling via `doStatus`. This avoids unnecessary webhook
71
+ * endpoint creation for providers whose APIs have no native webhook
72
+ * mechanism.
73
+ *
74
+ * This method exists because the SDK must decide whether to invoke the
75
+ * user's webhook factory — which may create real HTTP endpoints or
76
+ * external resources — *before* calling `doStart`. Without an explicit
77
+ * capability signal on the model, the SDK would eagerly create a webhook
78
+ * endpoint for every provider, even those that silently ignore the URL.
79
+ */
80
+ handleWebhookOption?: (options: {
81
+ webhook: () => PromiseLike<{
82
+ url: string;
83
+ received: PromiseLike<VideoModelV4OperationWebhook>;
84
+ }>;
85
+ }) => PromiseLike<{
86
+ webhookUrl: string;
87
+ received: PromiseLike<VideoModelV4OperationWebhook>;
88
+ }>;
89
+
90
+ /**
91
+ * Starts an asynchronous video generation and returns an opaque operation
92
+ * reference that can be passed to `doStatus` to poll for completion.
93
+ *
94
+ * When both `doStart` and `doStatus` are implemented, the SDK core can
95
+ * orchestrate polling or webhook-based completion instead of requiring
96
+ * the provider to implement its own polling loop in `doGenerate`.
44
97
  */
45
- doGenerate(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
98
+ doStart?(
99
+ options: VideoModelV4CallOptions & {
100
+ /**
101
+ * When provided, the provider should register this URL to receive
102
+ * a webhook notification when the video generation completes.
103
+ */
104
+ webhookUrl?: string;
105
+ },
106
+ ): PromiseLike<VideoModelV4OperationStartResult>;
107
+
108
+ /**
109
+ * Checks the status of an asynchronous video generation that was
110
+ * started with `doStart`.
111
+ *
112
+ * Returns either a `pending` status or a `completed` status with the
113
+ * generated videos.
114
+ */
115
+ doStatus?(options: {
116
+ /**
117
+ * The JSON-serializable opaque operation reference returned by `doStart`.
118
+ */
119
+ operation: JSONValue;
120
+
121
+ /**
122
+ * Abort signal for cancelling the operation.
123
+ */
124
+ abortSignal?: AbortSignal;
125
+
126
+ /**
127
+ * Additional HTTP headers.
128
+ */
129
+ headers?: Record<string, string | undefined>;
130
+ }): PromiseLike<VideoModelV4OperationStatusResult>;
46
131
  };