@ai-sdk/provider 4.0.9 → 4.0.11

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "4.0.9",
3
+ "version": "4.0.11",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "sideEffects": false,
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Fields shared by every request in a batch.
3
+ */
4
+ export type BatchV4RequestBase<ModelId extends string = string> = {
5
+ /**
6
+ * Application-provided identifier used to correlate the request with its
7
+ * result.
8
+ */
9
+ readonly id: string;
10
+
11
+ /**
12
+ * Provider-specific model ID for this request.
13
+ */
14
+ readonly modelId: ModelId;
15
+ };
@@ -3,6 +3,32 @@ import type {
3
3
  SharedV4ProviderOptions,
4
4
  SharedV4Warning,
5
5
  } from '../../shared';
6
+ import type { LanguageModelV4GenerateResult } from '../../language-model/v4/language-model-v4-generate-result';
7
+ import type { TextBatchV4Request } from './text-batch-v4-request';
8
+
9
+ /**
10
+ * Model IDs accepted by each batch modality.
11
+ *
12
+ * Additional modality-specific model ID types can be added to this mapping.
13
+ */
14
+ export type BatchV4ModelIds = {
15
+ readonly text: string;
16
+ };
17
+
18
+ type BatchV4CallOptions = {
19
+ readonly providerOptions?: SharedV4ProviderOptions;
20
+ readonly abortSignal?: AbortSignal;
21
+ readonly headers?: Record<string, string | undefined>;
22
+ };
23
+
24
+ type BatchV4StartCallOptions = BatchV4CallOptions & {
25
+ /**
26
+ * URL the provider notifies when the batch reaches a terminal state.
27
+ * Providers that do not support completion webhooks should return an
28
+ * unsupported warning.
29
+ */
30
+ readonly webhookUrl?: string;
31
+ };
6
32
 
7
33
  /**
8
34
  * Serializable error information for a batch or batch item.
@@ -32,21 +58,19 @@ export type BatchV4Status = {
32
58
  readonly providerMetadata?: SharedV4ProviderMetadata;
33
59
  };
34
60
 
61
+ export type BatchV4Request<ModelIds extends BatchV4ModelIds = BatchV4ModelIds> =
62
+ TextBatchV4Request<ModelIds['text']>;
63
+
35
64
  /**
36
- * Options for starting a batch.
65
+ * Options for starting a batch of requests discriminated by modality.
66
+ *
67
+ * Additional modality-specific request variants can be added to
68
+ * `BatchV4Request`.
37
69
  */
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
- * URL the provider notifies when the batch reaches a terminal state.
46
- * Providers that do not support completion webhooks should return an
47
- * unsupported warning.
48
- */
49
- readonly webhookUrl?: string;
70
+ export type BatchV4StartOptions<
71
+ ModelIds extends BatchV4ModelIds = BatchV4ModelIds,
72
+ > = BatchV4StartCallOptions & {
73
+ readonly requests: ReadonlyArray<BatchV4Request<ModelIds>>;
50
74
  };
51
75
 
52
76
  /**
@@ -65,15 +89,9 @@ export type BatchV4StartResult = BatchV4Status & {
65
89
  */
66
90
  export type BatchV4OperationOptions = {
67
91
  readonly batchId: string;
68
- readonly providerOptions?: SharedV4ProviderOptions;
69
- readonly abortSignal?: AbortSignal;
70
- readonly headers?: Record<string, string | undefined>;
71
- };
92
+ } & BatchV4CallOptions;
72
93
 
73
- /**
74
- * A complete terminal result for one request in a batch.
75
- */
76
- export type BatchV4ItemResult<RESULT> =
94
+ type BatchV4ItemResultBase<RESULT> =
77
95
  | {
78
96
  readonly id: string;
79
97
  readonly status: 'succeeded';
@@ -93,19 +111,50 @@ export type BatchV4ItemResult<RESULT> =
93
111
  };
94
112
 
95
113
  /**
96
- * Experimental structural capability for models that support durable batch
97
- * processing.
114
+ * A complete terminal result for one request in a text batch.
115
+ */
116
+ export type TextBatchV4ItemResult = {
117
+ readonly type: 'text';
118
+ } & BatchV4ItemResultBase<LanguageModelV4GenerateResult>;
119
+
120
+ /**
121
+ * A complete terminal result for one request in a batch, discriminated by
122
+ * modality.
123
+ *
124
+ * Additional modality-specific item results can be added to this union.
98
125
  */
99
- export type BatchModelV4<REQUEST, RESULT> = {
100
- experimental_doStartBatch(
101
- options: BatchV4StartOptions<REQUEST>,
126
+ export type BatchV4ItemResult = TextBatchV4ItemResult;
127
+
128
+ /**
129
+ * Specification for a batch interface that implements batch interface version 4.
130
+ */
131
+ export type BatchV4<ModelIds extends BatchV4ModelIds = BatchV4ModelIds> = {
132
+ /**
133
+ * The batch interface must specify which batch interface version it implements.
134
+ */
135
+ readonly specificationVersion: 'v4';
136
+
137
+ /**
138
+ * Provider ID.
139
+ */
140
+ readonly provider: string;
141
+
142
+ /**
143
+ * Supported URL patterns by media type for requests in this batch interface.
144
+ */
145
+ readonly supportedUrls:
146
+ | PromiseLike<Record<string, RegExp[]>>
147
+ | Record<string, RegExp[]>;
148
+
149
+ doStartBatch(
150
+ options: BatchV4StartOptions<ModelIds>,
102
151
  ): PromiseLike<BatchV4StartResult>;
103
152
 
104
- experimental_doGetBatchStatus(
153
+ doGetBatchStatus(
105
154
  options: BatchV4OperationOptions,
106
155
  ): PromiseLike<BatchV4Status>;
107
156
 
108
- experimental_doGetBatchResults(
157
+ doGetBatchResults(
109
158
  options: BatchV4OperationOptions,
110
- ): PromiseLike<ReadableStream<BatchV4ItemResult<RESULT>>>;
159
+ ): PromiseLike<ReadableStream<BatchV4ItemResult>>;
111
160
  };
@@ -1,9 +1,14 @@
1
1
  export type {
2
- BatchModelV4 as Experimental_BatchModelV4,
2
+ BatchV4 as Experimental_BatchV4,
3
3
  BatchV4Error as Experimental_BatchV4Error,
4
4
  BatchV4ItemResult as Experimental_BatchV4ItemResult,
5
+ BatchV4ModelIds as Experimental_BatchV4ModelIds,
5
6
  BatchV4OperationOptions as Experimental_BatchV4OperationOptions,
7
+ BatchV4Request as Experimental_BatchV4Request,
6
8
  BatchV4StartOptions as Experimental_BatchV4StartOptions,
7
9
  BatchV4StartResult as Experimental_BatchV4StartResult,
8
10
  BatchV4Status as Experimental_BatchV4Status,
11
+ TextBatchV4ItemResult as Experimental_TextBatchV4ItemResult,
9
12
  } from './batch-v4';
13
+ export type { BatchV4RequestBase as Experimental_BatchV4RequestBase } from './batch-v4-request';
14
+ export type { TextBatchV4Request as Experimental_TextBatchV4Request } from './text-batch-v4-request';
@@ -0,0 +1,27 @@
1
+ import type { LanguageModelV4CallOptions } from '../../language-model/v4/language-model-v4-call-options';
2
+ import type { BatchV4RequestBase } from './batch-v4-request';
3
+
4
+ /**
5
+ * A normalized text generation request within a batch.
6
+ */
7
+ export type TextBatchV4Request<ModelId extends string = string> =
8
+ BatchV4RequestBase<ModelId> & {
9
+ readonly type: 'text';
10
+ readonly options: Pick<
11
+ LanguageModelV4CallOptions,
12
+ | 'prompt'
13
+ | 'maxOutputTokens'
14
+ | 'temperature'
15
+ | 'stopSequences'
16
+ | 'topP'
17
+ | 'topK'
18
+ | 'presencePenalty'
19
+ | 'frequencyPenalty'
20
+ | 'seed'
21
+ | 'reasoning'
22
+ | 'responseFormat'
23
+ | 'toolChoice'
24
+ | 'tools'
25
+ | 'providerOptions'
26
+ >;
27
+ };
@@ -0,0 +1,30 @@
1
+ import type { SharedV4ProviderOptions } from '../../shared/v4/shared-v4-provider-options';
2
+ import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';
3
+
4
+ /**
5
+ * Options for deleting a file via the files interface.
6
+ */
7
+ export type FilesV4DeleteFileCallOptions = {
8
+ /**
9
+ * The provider reference of the file, as returned by `uploadFile`.
10
+ */
11
+ file: SharedV4ProviderReference;
12
+
13
+ /**
14
+ * Abort signal for cancelling the operation.
15
+ */
16
+ abortSignal?: AbortSignal;
17
+
18
+ /**
19
+ * Additional HTTP headers to be sent with the request.
20
+ * Only applicable for HTTP-based providers.
21
+ */
22
+ headers?: Record<string, string | undefined>;
23
+
24
+ /**
25
+ * Additional provider-specific options. They are passed through
26
+ * to the provider from the AI SDK and enable provider-specific
27
+ * functionality that can be fully encapsulated in the provider.
28
+ */
29
+ providerOptions?: SharedV4ProviderOptions;
30
+ };
@@ -0,0 +1,32 @@
1
+ import type { SharedV4ProviderMetadata } from '../../shared/v4/shared-v4-provider-metadata';
2
+ import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';
3
+ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
4
+
5
+ /**
6
+ * Result of deleting a file via the files interface.
7
+ */
8
+ export type FilesV4DeleteFileResult = {
9
+ /**
10
+ * A provider reference mapping provider names to provider-specific file identifiers.
11
+ * Contains only the operated provider's entry — when working with a merged
12
+ * multi-provider reference, do not reassign it with this result.
13
+ */
14
+ providerReference: SharedV4ProviderReference;
15
+
16
+ /**
17
+ * Whether the provider confirmed the deletion.
18
+ */
19
+ deleted: boolean;
20
+
21
+ /**
22
+ * Additional provider-specific metadata. They are passed through
23
+ * to the provider from the AI SDK and enable provider-specific
24
+ * functionality that can be fully encapsulated in the provider.
25
+ */
26
+ providerMetadata?: SharedV4ProviderMetadata;
27
+
28
+ /**
29
+ * Warnings from the provider.
30
+ */
31
+ warnings: Array<SharedV4Warning>;
32
+ };
@@ -0,0 +1,30 @@
1
+ import type { SharedV4ProviderOptions } from '../../shared/v4/shared-v4-provider-options';
2
+ import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';
3
+
4
+ /**
5
+ * Options for downloading file content via the files interface.
6
+ */
7
+ export type FilesV4DownloadFileCallOptions = {
8
+ /**
9
+ * The provider reference of the file, as returned by `uploadFile`.
10
+ */
11
+ file: SharedV4ProviderReference;
12
+
13
+ /**
14
+ * Abort signal for cancelling the operation.
15
+ */
16
+ abortSignal?: AbortSignal;
17
+
18
+ /**
19
+ * Additional HTTP headers to be sent with the request.
20
+ * Only applicable for HTTP-based providers.
21
+ */
22
+ headers?: Record<string, string | undefined>;
23
+
24
+ /**
25
+ * Additional provider-specific options. They are passed through
26
+ * to the provider from the AI SDK and enable provider-specific
27
+ * functionality that can be fully encapsulated in the provider.
28
+ */
29
+ providerOptions?: SharedV4ProviderOptions;
30
+ };
@@ -0,0 +1,30 @@
1
+ import type { SharedV4ProviderMetadata } from '../../shared/v4/shared-v4-provider-metadata';
2
+ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
3
+
4
+ /**
5
+ * Result of downloading file content via the files interface.
6
+ */
7
+ export type FilesV4DownloadFileResult = {
8
+ /**
9
+ * The file content as a byte stream.
10
+ * The consumer is responsible for draining or cancelling the stream.
11
+ */
12
+ content: ReadableStream<Uint8Array>;
13
+
14
+ /**
15
+ * The IANA media type of the file, if available from the provider.
16
+ */
17
+ mediaType?: string;
18
+
19
+ /**
20
+ * Additional provider-specific metadata. They are passed through
21
+ * to the provider from the AI SDK and enable provider-specific
22
+ * functionality that can be fully encapsulated in the provider.
23
+ */
24
+ providerMetadata?: SharedV4ProviderMetadata;
25
+
26
+ /**
27
+ * Warnings from the provider.
28
+ */
29
+ warnings: Array<SharedV4Warning>;
30
+ };
@@ -0,0 +1,30 @@
1
+ import type { SharedV4ProviderOptions } from '../../shared/v4/shared-v4-provider-options';
2
+ import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';
3
+
4
+ /**
5
+ * Options for retrieving file metadata via the files interface.
6
+ */
7
+ export type FilesV4GetFileMetadataCallOptions = {
8
+ /**
9
+ * The provider reference of the file, as returned by `uploadFile`.
10
+ */
11
+ file: SharedV4ProviderReference;
12
+
13
+ /**
14
+ * Abort signal for cancelling the operation.
15
+ */
16
+ abortSignal?: AbortSignal;
17
+
18
+ /**
19
+ * Additional HTTP headers to be sent with the request.
20
+ * Only applicable for HTTP-based providers.
21
+ */
22
+ headers?: Record<string, string | undefined>;
23
+
24
+ /**
25
+ * Additional provider-specific options. They are passed through
26
+ * to the provider from the AI SDK and enable provider-specific
27
+ * functionality that can be fully encapsulated in the provider.
28
+ */
29
+ providerOptions?: SharedV4ProviderOptions;
30
+ };
@@ -0,0 +1,53 @@
1
+ import type { SharedV4ProviderMetadata } from '../../shared/v4/shared-v4-provider-metadata';
2
+ import type { SharedV4ProviderReference } from '../../shared/v4/shared-v4-provider-reference';
3
+ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
4
+
5
+ /**
6
+ * Result of retrieving file metadata via the files interface.
7
+ */
8
+ export type FilesV4GetFileMetadataResult = {
9
+ /**
10
+ * A provider reference mapping provider names to provider-specific file identifiers.
11
+ * Contains only the operated provider's entry — when working with a merged
12
+ * multi-provider reference, do not reassign it with this result.
13
+ */
14
+ providerReference: SharedV4ProviderReference;
15
+
16
+ /**
17
+ * The filename of the file, if available from the provider.
18
+ */
19
+ filename?: string;
20
+
21
+ /**
22
+ * The IANA media type of the file, if available from the provider.
23
+ */
24
+ mediaType?: string;
25
+
26
+ /**
27
+ * The size of the file in bytes, if available from the provider.
28
+ */
29
+ byteSize?: number;
30
+
31
+ /**
32
+ * When the file was created, if available from the provider.
33
+ */
34
+ createdAt?: Date;
35
+
36
+ /**
37
+ * When the provider will delete the file (retention expiry),
38
+ * if available from the provider.
39
+ */
40
+ expiresAt?: Date;
41
+
42
+ /**
43
+ * Additional provider-specific metadata. They are passed through
44
+ * to the provider from the AI SDK and enable provider-specific
45
+ * functionality that can be fully encapsulated in the provider.
46
+ */
47
+ providerMetadata?: SharedV4ProviderMetadata;
48
+
49
+ /**
50
+ * Warnings from the provider.
51
+ */
52
+ warnings: Array<SharedV4Warning>;
53
+ };
@@ -4,6 +4,15 @@ import type {
4
4
  } from '../../shared/v4/shared-v4-file-data';
5
5
  import type { SharedV4ProviderOptions } from '../../shared/v4/shared-v4-provider-options';
6
6
 
7
+ /**
8
+ * File data variant containing a byte stream. Providers that support
9
+ * streaming uploads send it without buffering the full file in memory.
10
+ */
11
+ export interface FilesV4UploadFileStreamData {
12
+ type: 'stream';
13
+ stream: ReadableStream<Uint8Array>;
14
+ }
15
+
7
16
  /**
8
17
  * Options for uploading a file via the files interface.
9
18
  */
@@ -13,8 +22,13 @@ export type FilesV4UploadFileCallOptions = {
13
22
  *
14
23
  * - `{ type: 'data', data }`: raw bytes (`Uint8Array`) or a base64-encoded string.
15
24
  * - `{ type: 'text', text }`: inline text (UTF-8).
25
+ * - `{ type: 'stream', stream }`: a byte stream (not buffered by providers
26
+ * that support streaming uploads).
16
27
  */
17
- data: SharedV4FileDataData | SharedV4FileDataText;
28
+ data:
29
+ | SharedV4FileDataData
30
+ | SharedV4FileDataText
31
+ | FilesV4UploadFileStreamData;
18
32
 
19
33
  /**
20
34
  * The IANA media type of the file (e.g. `'application/pdf'`).
@@ -26,6 +40,17 @@ export type FilesV4UploadFileCallOptions = {
26
40
  */
27
41
  filename?: string;
28
42
 
43
+ /**
44
+ * Abort signal for cancelling the operation.
45
+ */
46
+ abortSignal?: AbortSignal;
47
+
48
+ /**
49
+ * Additional HTTP headers to be sent with the request.
50
+ * Only applicable for HTTP-based providers.
51
+ */
52
+ headers?: Record<string, string | undefined>;
53
+
29
54
  /**
30
55
  * Additional provider-specific options. They are passed through
31
56
  * to the provider from the AI SDK and enable provider-specific
@@ -8,6 +8,8 @@ import type { SharedV4Warning } from '../../shared/v4/shared-v4-warning';
8
8
  export type FilesV4UploadFileResult = {
9
9
  /**
10
10
  * A provider reference mapping provider names to provider-specific file identifiers.
11
+ * The key is the canonical provider name (e.g. `openai`) and may differ from
12
+ * the interface's `provider` id (e.g. `openai.files`).
11
13
  */
12
14
  providerReference: SharedV4ProviderReference;
13
15
 
@@ -21,6 +23,22 @@ export type FilesV4UploadFileResult = {
21
23
  */
22
24
  filename?: string;
23
25
 
26
+ /**
27
+ * The size of the uploaded file in bytes, if available from the provider.
28
+ */
29
+ byteSize?: number;
30
+
31
+ /**
32
+ * When the file was created, if available from the provider.
33
+ */
34
+ createdAt?: Date;
35
+
36
+ /**
37
+ * When the provider will delete the file (retention expiry, e.g. from a
38
+ * requested upload TTL), if available from the provider.
39
+ */
40
+ expiresAt?: Date;
41
+
24
42
  /**
25
43
  * Additional provider-specific metadata. They are passed through
26
44
  * to the provider from the AI SDK and enable provider-specific
@@ -1,8 +1,18 @@
1
+ import type { FilesV4DeleteFileCallOptions } from './files-v4-delete-file-call-options';
2
+ import type { FilesV4DeleteFileResult } from './files-v4-delete-file-result';
3
+ import type { FilesV4DownloadFileCallOptions } from './files-v4-download-file-call-options';
4
+ import type { FilesV4DownloadFileResult } from './files-v4-download-file-result';
5
+ import type { FilesV4GetFileMetadataCallOptions } from './files-v4-get-file-metadata-call-options';
6
+ import type { FilesV4GetFileMetadataResult } from './files-v4-get-file-metadata-result';
1
7
  import type { FilesV4UploadFileCallOptions } from './files-v4-upload-file-call-options';
2
8
  import type { FilesV4UploadFileResult } from './files-v4-upload-file-result';
3
9
 
4
10
  /**
5
11
  * Specification for a file management interface that implements the files interface version 4.
12
+ *
13
+ * Only `uploadFile` is required. The other operations are optional
14
+ * capabilities: their presence signals that the provider supports them
15
+ * (mirroring the optional-method pattern of `VideoModelV4`).
6
16
  */
7
17
  export type FilesV4 = {
8
18
  /**
@@ -22,4 +32,28 @@ export type FilesV4 = {
22
32
  uploadFile(
23
33
  options: FilesV4UploadFileCallOptions,
24
34
  ): PromiseLike<FilesV4UploadFileResult>;
35
+
36
+ /**
37
+ * Retrieves metadata for a previously uploaded file.
38
+ * Optional: presence signals that the provider supports metadata reads.
39
+ */
40
+ getFileMetadata?(
41
+ options: FilesV4GetFileMetadataCallOptions,
42
+ ): PromiseLike<FilesV4GetFileMetadataResult>;
43
+
44
+ /**
45
+ * Downloads the content of a previously uploaded file as a byte stream.
46
+ * Optional: presence signals that the provider supports content download.
47
+ */
48
+ downloadFile?(
49
+ options: FilesV4DownloadFileCallOptions,
50
+ ): PromiseLike<FilesV4DownloadFileResult>;
51
+
52
+ /**
53
+ * Deletes a previously uploaded file.
54
+ * Optional: presence signals that the provider supports deletion.
55
+ */
56
+ deleteFile?(
57
+ options: FilesV4DeleteFileCallOptions,
58
+ ): PromiseLike<FilesV4DeleteFileResult>;
25
59
  };
@@ -1,3 +1,12 @@
1
1
  export type { FilesV4 } from './files-v4';
2
- export type { FilesV4UploadFileCallOptions } from './files-v4-upload-file-call-options';
2
+ export type { FilesV4DeleteFileCallOptions } from './files-v4-delete-file-call-options';
3
+ export type { FilesV4DeleteFileResult } from './files-v4-delete-file-result';
4
+ export type { FilesV4DownloadFileCallOptions } from './files-v4-download-file-call-options';
5
+ export type { FilesV4DownloadFileResult } from './files-v4-download-file-result';
6
+ export type { FilesV4GetFileMetadataCallOptions } from './files-v4-get-file-metadata-call-options';
7
+ export type { FilesV4GetFileMetadataResult } from './files-v4-get-file-metadata-result';
8
+ export type {
9
+ FilesV4UploadFileCallOptions,
10
+ FilesV4UploadFileStreamData,
11
+ } from './files-v4-upload-file-call-options';
3
12
  export type { FilesV4UploadFileResult } from './files-v4-upload-file-result';
@@ -22,6 +22,12 @@ export type ImageModelV4Result = {
22
22
  */
23
23
  images: Array<string> | Array<Uint8Array>;
24
24
 
25
+ /**
26
+ * Whether an unsuccessful result, such as an empty image result, can be
27
+ * retried. When omitted, the result is unclassified.
28
+ */
29
+ isRetryable?: boolean;
30
+
25
31
  /**
26
32
  * Warnings for the call, e.g. unsupported features.
27
33
  */
@@ -20,7 +20,3 @@ 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';
@@ -1,42 +0,0 @@
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
- | 'responseFormat'
32
- | 'toolChoice'
33
- | 'tools'
34
- | 'providerOptions'
35
- >;
36
- };
37
-
38
- /**
39
- * Language model V4 with durable batch-processing support.
40
- */
41
- export type BatchLanguageModelV4 = LanguageModelV4 &
42
- BatchModelV4<LanguageModelV4BatchRequest, LanguageModelV4GenerateResult>;