@ai-sdk/provider 4.0.3 → 4.0.5
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 +19 -0
- package/dist/index.d.ts +492 -38
- package/package.json +1 -1
- package/src/embedding-model/v4/embedding-model-v4.ts +1 -1
- package/src/image-model/v4/image-model-v4.ts +1 -1
- package/src/index.ts +1 -0
- package/src/realtime-model/v4/realtime-model-v4-session-config.ts +3 -22
- package/src/reranking-model/v4/reranking-model-v4.ts +1 -1
- package/src/shared/v4/index.ts +1 -0
- package/src/shared/v4/shared-v4-audio-format.ts +14 -0
- package/src/speech-model/v4/speech-model-v4.ts +1 -1
- package/src/speech-translation-model/index.ts +1 -0
- package/src/speech-translation-model/v4/index.ts +5 -0
- package/src/speech-translation-model/v4/speech-translation-model-v4-stream-options.ts +65 -0
- package/src/speech-translation-model/v4/speech-translation-model-v4-stream-part.ts +141 -0
- package/src/speech-translation-model/v4/speech-translation-model-v4-stream-result.ts +47 -0
- package/src/speech-translation-model/v4/speech-translation-model-v4-usage.ts +32 -0
- package/src/speech-translation-model/v4/speech-translation-model-v4.ts +40 -0
- package/src/transcription-model/v4/transcription-model-v4-stream-options.ts +2 -11
- package/src/transcription-model/v4/transcription-model-v4.ts +1 -1
- package/src/video-model/v4/index.ts +3 -0
- package/src/video-model/v4/video-model-v4-operation-start-result.ts +44 -0
- package/src/video-model/v4/video-model-v4-operation-status-result.ts +89 -0
- package/src/video-model/v4/video-model-v4-operation-webhook.ts +11 -0
- package/src/video-model/v4/video-model-v4.ts +87 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# @ai-sdk/provider
|
|
2
2
|
|
|
3
|
+
## 4.0.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 79e133c: async APIs for generateVideo (poll, webhook)
|
|
8
|
+
|
|
9
|
+
Adds an asynchronous start/status flow to the experimental video model
|
|
10
|
+
interface (`VideoModelV4`): models may now implement `doStart`, `doStatus`,
|
|
11
|
+
and `handleWebhookOption` instead of (or in addition to) `doGenerate`, and
|
|
12
|
+
`experimental_generateVideo` accepts `poll` and `webhook` options to
|
|
13
|
+
orchestrate completion via polling or webhooks. Polling configuration can use
|
|
14
|
+
a custom delay implementation for durable workflow compatibility.
|
|
15
|
+
|
|
16
|
+
## 4.0.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 1e2f324: feat: add experimental speech translation model specification (`Experimental_SpeechTranslationModelV4`) and `experimental_streamTranslate` for streaming speech-to-speech translation
|
|
21
|
+
|
|
3
22
|
## 4.0.3
|
|
4
23
|
|
|
5
24
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,20 @@
|
|
|
1
1
|
import { JSONSchema7 } from 'json-schema';
|
|
2
2
|
export { JSONSchema7, JSONSchema7Definition } from 'json-schema';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* Audio format configuration shared by provider V4 model specifications.
|
|
6
|
+
*/
|
|
7
|
+
type SharedV4AudioFormat = {
|
|
8
|
+
/**
|
|
9
|
+
* Audio format type, e.g. `audio/pcm`, `audio/pcmu`, or `audio/pcma`.
|
|
10
|
+
*/
|
|
11
|
+
type: string;
|
|
12
|
+
/**
|
|
13
|
+
* Sample rate in Hz. Only applicable for formats that require a rate.
|
|
14
|
+
*/
|
|
15
|
+
rate?: number;
|
|
16
|
+
};
|
|
17
|
+
|
|
4
18
|
/**
|
|
5
19
|
* A mapping of provider names to provider-specific file identifiers.
|
|
6
20
|
*
|
|
@@ -386,7 +400,7 @@ type EmbeddingModelV4Result = {
|
|
|
386
400
|
|
|
387
401
|
/**
|
|
388
402
|
* Specification for an embedding model that implements the embedding model
|
|
389
|
-
* interface version
|
|
403
|
+
* interface version 4.
|
|
390
404
|
*
|
|
391
405
|
* It is specific to text embeddings.
|
|
392
406
|
*/
|
|
@@ -1151,7 +1165,7 @@ type GetMaxImagesPerCallFunction$2 = (options: {
|
|
|
1151
1165
|
modelId: string;
|
|
1152
1166
|
}) => PromiseLike<number | undefined> | number | undefined;
|
|
1153
1167
|
/**
|
|
1154
|
-
* Image generation model specification version
|
|
1168
|
+
* Image generation model specification version 4.
|
|
1155
1169
|
*/
|
|
1156
1170
|
type ImageModelV4 = {
|
|
1157
1171
|
/**
|
|
@@ -4933,7 +4947,7 @@ type RerankingModelV4Result = {
|
|
|
4933
4947
|
};
|
|
4934
4948
|
|
|
4935
4949
|
/**
|
|
4936
|
-
* Specification for a reranking model that implements the reranking model interface version
|
|
4950
|
+
* Specification for a reranking model that implements the reranking model interface version 4.
|
|
4937
4951
|
*/
|
|
4938
4952
|
type RerankingModelV4 = {
|
|
4939
4953
|
/**
|
|
@@ -5061,7 +5075,7 @@ type SpeechModelV4Result = {
|
|
|
5061
5075
|
};
|
|
5062
5076
|
|
|
5063
5077
|
/**
|
|
5064
|
-
* Speech model specification version
|
|
5078
|
+
* Speech model specification version 4.
|
|
5065
5079
|
*/
|
|
5066
5080
|
type SpeechModelV4 = {
|
|
5067
5081
|
/**
|
|
@@ -5216,16 +5230,7 @@ type TranscriptionModelV4StreamOptions = {
|
|
|
5216
5230
|
/**
|
|
5217
5231
|
* The input audio format for the raw audio chunks.
|
|
5218
5232
|
*/
|
|
5219
|
-
inputAudioFormat:
|
|
5220
|
-
/**
|
|
5221
|
-
* Audio format type, e.g. `audio/pcm`, `audio/pcmu`, or `audio/pcma`.
|
|
5222
|
-
*/
|
|
5223
|
-
type: string;
|
|
5224
|
-
/**
|
|
5225
|
-
* Sample rate in Hz. Only applicable for formats that require a rate.
|
|
5226
|
-
*/
|
|
5227
|
-
rate?: number;
|
|
5228
|
-
};
|
|
5233
|
+
inputAudioFormat: SharedV4AudioFormat;
|
|
5229
5234
|
/**
|
|
5230
5235
|
* Additional provider-specific options that are passed through to the provider.
|
|
5231
5236
|
*
|
|
@@ -5362,7 +5367,7 @@ type TranscriptionModelV4StreamResult = {
|
|
|
5362
5367
|
};
|
|
5363
5368
|
|
|
5364
5369
|
/**
|
|
5365
|
-
* Transcription model specification version
|
|
5370
|
+
* Transcription model specification version 4.
|
|
5366
5371
|
*/
|
|
5367
5372
|
type TranscriptionModelV4 = {
|
|
5368
5373
|
/**
|
|
@@ -6402,16 +6407,7 @@ type RealtimeModelV4SessionConfig = {
|
|
|
6402
6407
|
/**
|
|
6403
6408
|
* Audio format configuration for input audio.
|
|
6404
6409
|
*/
|
|
6405
|
-
inputAudioFormat?:
|
|
6406
|
-
/**
|
|
6407
|
-
* Audio format type (e.g. "audio/pcm", "audio/pcmu", "audio/pcma").
|
|
6408
|
-
*/
|
|
6409
|
-
type: string;
|
|
6410
|
-
/**
|
|
6411
|
-
* Sample rate in Hz. Only applicable for PCM format.
|
|
6412
|
-
*/
|
|
6413
|
-
rate?: number;
|
|
6414
|
-
};
|
|
6410
|
+
inputAudioFormat?: SharedV4AudioFormat;
|
|
6415
6411
|
/**
|
|
6416
6412
|
* Input audio transcription configuration.
|
|
6417
6413
|
*
|
|
@@ -6458,16 +6454,7 @@ type RealtimeModelV4SessionConfig = {
|
|
|
6458
6454
|
/**
|
|
6459
6455
|
* Audio format configuration for output audio.
|
|
6460
6456
|
*/
|
|
6461
|
-
outputAudioFormat?:
|
|
6462
|
-
/**
|
|
6463
|
-
* Audio format type (e.g. "audio/pcm", "audio/pcmu", "audio/pcma").
|
|
6464
|
-
*/
|
|
6465
|
-
type: string;
|
|
6466
|
-
/**
|
|
6467
|
-
* Sample rate in Hz. Only applicable for PCM format.
|
|
6468
|
-
*/
|
|
6469
|
-
rate?: number;
|
|
6470
|
-
};
|
|
6457
|
+
outputAudioFormat?: SharedV4AudioFormat;
|
|
6471
6458
|
/**
|
|
6472
6459
|
* Voice activity detection configuration.
|
|
6473
6460
|
* Set to null or type 'disabled' to turn off VAD (push-to-talk mode).
|
|
@@ -6864,6 +6851,282 @@ interface RealtimeFactoryV4 {
|
|
|
6864
6851
|
getToken(options: RealtimeFactoryV4GetTokenOptions): Promise<RealtimeFactoryV4GetTokenResult>;
|
|
6865
6852
|
}
|
|
6866
6853
|
|
|
6854
|
+
type SpeechTranslationModelV4ProviderOptions = Record<string, JSONObject>;
|
|
6855
|
+
/**
|
|
6856
|
+
* Options for a speech translation model stream call.
|
|
6857
|
+
*/
|
|
6858
|
+
type SpeechTranslationModelV4StreamOptions = {
|
|
6859
|
+
/**
|
|
6860
|
+
* Source audio chunks to transform.
|
|
6861
|
+
*
|
|
6862
|
+
* `Uint8Array` chunks contain raw audio bytes. `string` chunks contain
|
|
6863
|
+
* base64-encoded raw audio bytes.
|
|
6864
|
+
*/
|
|
6865
|
+
audio: ReadableStream<Uint8Array | string>;
|
|
6866
|
+
/**
|
|
6867
|
+
* The input audio format for the raw audio chunks.
|
|
6868
|
+
*/
|
|
6869
|
+
inputAudioFormat: SharedV4AudioFormat;
|
|
6870
|
+
/**
|
|
6871
|
+
* The language to produce output audio and text in, as a BCP-47-style
|
|
6872
|
+
* language tag (e.g. `en`, `es`, `fr-CA`). Supported values are
|
|
6873
|
+
* provider-specific and validated by the provider.
|
|
6874
|
+
*/
|
|
6875
|
+
targetLanguage: string;
|
|
6876
|
+
/**
|
|
6877
|
+
* The language of the source audio, as a BCP-47-style language tag.
|
|
6878
|
+
* When absent, providers should auto-detect the source language.
|
|
6879
|
+
*/
|
|
6880
|
+
sourceLanguage?: string;
|
|
6881
|
+
/**
|
|
6882
|
+
* The desired audio format for output audio chunks.
|
|
6883
|
+
* When absent, the provider default output format is used.
|
|
6884
|
+
*/
|
|
6885
|
+
outputAudioFormat?: SharedV4AudioFormat;
|
|
6886
|
+
/**
|
|
6887
|
+
* Additional provider-specific options that are passed through to the provider.
|
|
6888
|
+
*
|
|
6889
|
+
* The outer record is keyed by the provider name, and the inner record is keyed
|
|
6890
|
+
* by provider-specific option names.
|
|
6891
|
+
*/
|
|
6892
|
+
providerOptions?: SpeechTranslationModelV4ProviderOptions;
|
|
6893
|
+
/**
|
|
6894
|
+
* Abort signal for cancelling the operation.
|
|
6895
|
+
*/
|
|
6896
|
+
abortSignal?: AbortSignal;
|
|
6897
|
+
/**
|
|
6898
|
+
* Additional HTTP headers to be sent with the request.
|
|
6899
|
+
* Only applicable for HTTP/WebSocket-based providers that support headers.
|
|
6900
|
+
*/
|
|
6901
|
+
headers?: Record<string, string | undefined>;
|
|
6902
|
+
/**
|
|
6903
|
+
* When true, providers should include raw provider chunks in the stream.
|
|
6904
|
+
*/
|
|
6905
|
+
includeRawChunks?: boolean;
|
|
6906
|
+
};
|
|
6907
|
+
|
|
6908
|
+
/**
|
|
6909
|
+
* Usage information for a speech translation call.
|
|
6910
|
+
*
|
|
6911
|
+
* All fields are optional because providers report usage with different
|
|
6912
|
+
* granularity (seconds of audio, audio tokens, and/or text tokens).
|
|
6913
|
+
*/
|
|
6914
|
+
type SpeechTranslationModelV4Usage = {
|
|
6915
|
+
/**
|
|
6916
|
+
* Seconds of input audio that were processed, if reported.
|
|
6917
|
+
*/
|
|
6918
|
+
inputAudioSeconds?: number;
|
|
6919
|
+
/**
|
|
6920
|
+
* Number of input audio tokens, if reported.
|
|
6921
|
+
*/
|
|
6922
|
+
inputAudioTokens?: number;
|
|
6923
|
+
/**
|
|
6924
|
+
* Number of output audio tokens, if reported.
|
|
6925
|
+
*/
|
|
6926
|
+
outputAudioTokens?: number;
|
|
6927
|
+
/**
|
|
6928
|
+
* Number of input text tokens, if reported.
|
|
6929
|
+
*/
|
|
6930
|
+
inputTextTokens?: number;
|
|
6931
|
+
/**
|
|
6932
|
+
* Number of output text tokens, if reported.
|
|
6933
|
+
*/
|
|
6934
|
+
outputTextTokens?: number;
|
|
6935
|
+
};
|
|
6936
|
+
|
|
6937
|
+
type SpeechTranslationModelV4StreamPart = {
|
|
6938
|
+
/**
|
|
6939
|
+
* Stream start event with warnings for the call, e.g. unsupported settings.
|
|
6940
|
+
*/
|
|
6941
|
+
type: 'stream-start';
|
|
6942
|
+
warnings: Array<SharedV4Warning>;
|
|
6943
|
+
} | {
|
|
6944
|
+
/**
|
|
6945
|
+
* Output audio chunk.
|
|
6946
|
+
*
|
|
6947
|
+
* `Uint8Array` chunks contain raw audio bytes. `string` chunks contain
|
|
6948
|
+
* base64-encoded raw audio bytes.
|
|
6949
|
+
*/
|
|
6950
|
+
type: 'audio';
|
|
6951
|
+
id?: string;
|
|
6952
|
+
audio: Uint8Array | string;
|
|
6953
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6954
|
+
} | {
|
|
6955
|
+
/**
|
|
6956
|
+
* Append-only output text delta.
|
|
6957
|
+
*
|
|
6958
|
+
* Output text is append-only: providers stream `output-text-delta`
|
|
6959
|
+
* parts and finalize per-utterance with `output-text-final`. There is
|
|
6960
|
+
* no partial/revision part for output text by design for now.
|
|
6961
|
+
*/
|
|
6962
|
+
type: 'output-text-delta';
|
|
6963
|
+
id?: string;
|
|
6964
|
+
delta: string;
|
|
6965
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6966
|
+
} | {
|
|
6967
|
+
/**
|
|
6968
|
+
* Final output text for a provider-defined segment or utterance.
|
|
6969
|
+
*
|
|
6970
|
+
* Output text is append-only: providers stream `output-text-delta`
|
|
6971
|
+
* parts and finalize per-utterance with `output-text-final`. There is
|
|
6972
|
+
* no partial/revision part for output text by design for now.
|
|
6973
|
+
*/
|
|
6974
|
+
type: 'output-text-final';
|
|
6975
|
+
id?: string;
|
|
6976
|
+
text: string;
|
|
6977
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6978
|
+
} | {
|
|
6979
|
+
/**
|
|
6980
|
+
* Append-only source transcript delta.
|
|
6981
|
+
*/
|
|
6982
|
+
type: 'source-transcript-delta';
|
|
6983
|
+
id?: string;
|
|
6984
|
+
delta: string;
|
|
6985
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6986
|
+
} | {
|
|
6987
|
+
/**
|
|
6988
|
+
* Non-final source transcript text. The text may be revised by later parts.
|
|
6989
|
+
*/
|
|
6990
|
+
type: 'source-transcript-partial';
|
|
6991
|
+
id?: string;
|
|
6992
|
+
text: string;
|
|
6993
|
+
startSecond?: number;
|
|
6994
|
+
endSecond?: number;
|
|
6995
|
+
channelIndex?: number;
|
|
6996
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6997
|
+
} | {
|
|
6998
|
+
/**
|
|
6999
|
+
* Final source transcript text for a provider-defined segment or utterance.
|
|
7000
|
+
*/
|
|
7001
|
+
type: 'source-transcript-final';
|
|
7002
|
+
id?: string;
|
|
7003
|
+
text: string;
|
|
7004
|
+
startSecond?: number;
|
|
7005
|
+
endSecond?: number;
|
|
7006
|
+
channelIndex?: number;
|
|
7007
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
7008
|
+
} | {
|
|
7009
|
+
/**
|
|
7010
|
+
* Metadata for the response, emitted once available.
|
|
7011
|
+
*/
|
|
7012
|
+
type: 'response-metadata';
|
|
7013
|
+
timestamp?: Date;
|
|
7014
|
+
modelId?: string;
|
|
7015
|
+
headers?: SharedV4Headers;
|
|
7016
|
+
body?: unknown;
|
|
7017
|
+
} | {
|
|
7018
|
+
/**
|
|
7019
|
+
* Metadata that is available after the stream is finished.
|
|
7020
|
+
*/
|
|
7021
|
+
type: 'finish';
|
|
7022
|
+
/**
|
|
7023
|
+
* The final source-language transcript of the input audio.
|
|
7024
|
+
*/
|
|
7025
|
+
sourceText: string;
|
|
7026
|
+
/**
|
|
7027
|
+
* The final output text. May be an empty string for providers that
|
|
7028
|
+
* produce only audio output.
|
|
7029
|
+
*/
|
|
7030
|
+
outputText: string;
|
|
7031
|
+
/**
|
|
7032
|
+
* The duration of the source audio in seconds, if available.
|
|
7033
|
+
*/
|
|
7034
|
+
durationInSeconds?: number;
|
|
7035
|
+
/**
|
|
7036
|
+
* Usage information for the call, if reported by the provider.
|
|
7037
|
+
*/
|
|
7038
|
+
usage?: SpeechTranslationModelV4Usage;
|
|
7039
|
+
/**
|
|
7040
|
+
* Additional provider-specific metadata.
|
|
7041
|
+
*/
|
|
7042
|
+
providerMetadata?: Record<string, JSONObject>;
|
|
7043
|
+
} | {
|
|
7044
|
+
/**
|
|
7045
|
+
* Raw provider chunks if enabled.
|
|
7046
|
+
*/
|
|
7047
|
+
type: 'raw';
|
|
7048
|
+
rawValue: unknown;
|
|
7049
|
+
} | {
|
|
7050
|
+
/**
|
|
7051
|
+
* Error parts are streamed, allowing for multiple errors.
|
|
7052
|
+
*/
|
|
7053
|
+
type: 'error';
|
|
7054
|
+
error: unknown;
|
|
7055
|
+
};
|
|
7056
|
+
|
|
7057
|
+
/**
|
|
7058
|
+
* The result of a speech translation model doStream call.
|
|
7059
|
+
*/
|
|
7060
|
+
type SpeechTranslationModelV4StreamResult = {
|
|
7061
|
+
/**
|
|
7062
|
+
* The stream.
|
|
7063
|
+
*/
|
|
7064
|
+
stream: ReadableStream<SpeechTranslationModelV4StreamPart>;
|
|
7065
|
+
/**
|
|
7066
|
+
* Optional request information for telemetry and debugging purposes.
|
|
7067
|
+
*/
|
|
7068
|
+
request?: {
|
|
7069
|
+
/**
|
|
7070
|
+
* Request body or setup payload that was sent to the provider API.
|
|
7071
|
+
*/
|
|
7072
|
+
body?: unknown;
|
|
7073
|
+
};
|
|
7074
|
+
/**
|
|
7075
|
+
* Optional response data.
|
|
7076
|
+
*/
|
|
7077
|
+
response?: {
|
|
7078
|
+
/**
|
|
7079
|
+
* Timestamp for the start of the streamed response.
|
|
7080
|
+
*/
|
|
7081
|
+
timestamp?: Date;
|
|
7082
|
+
/**
|
|
7083
|
+
* The ID of the response model that was used to generate the response.
|
|
7084
|
+
*/
|
|
7085
|
+
modelId?: string;
|
|
7086
|
+
/**
|
|
7087
|
+
* Response headers.
|
|
7088
|
+
*/
|
|
7089
|
+
headers?: SharedV4Headers;
|
|
7090
|
+
/**
|
|
7091
|
+
* Response body.
|
|
7092
|
+
*/
|
|
7093
|
+
body?: unknown;
|
|
7094
|
+
};
|
|
7095
|
+
};
|
|
7096
|
+
|
|
7097
|
+
/**
|
|
7098
|
+
* Speech translation model specification version 4.
|
|
7099
|
+
*
|
|
7100
|
+
* Speech translation is a streaming-only modality: models translate live
|
|
7101
|
+
* source audio into target-language audio and text.
|
|
7102
|
+
*
|
|
7103
|
+
* Experimental: the speech translation model contract may change in patch
|
|
7104
|
+
* releases while the functions built on it are experimental. All types of
|
|
7105
|
+
* this modality are exported with `Experimental_` prefixes for this reason.
|
|
7106
|
+
*/
|
|
7107
|
+
type SpeechTranslationModelV4 = {
|
|
7108
|
+
/**
|
|
7109
|
+
* The speech translation model must specify which speech translation model
|
|
7110
|
+
* interface version it implements. This will allow us to evolve the
|
|
7111
|
+
* speech translation model interface and retain backwards compatibility.
|
|
7112
|
+
* The different implementation versions can be handled as a discriminated
|
|
7113
|
+
* union on our side.
|
|
7114
|
+
*/
|
|
7115
|
+
readonly specificationVersion: 'v4';
|
|
7116
|
+
/**
|
|
7117
|
+
* Name of the provider for logging purposes.
|
|
7118
|
+
*/
|
|
7119
|
+
readonly provider: string;
|
|
7120
|
+
/**
|
|
7121
|
+
* Provider-specific model ID for logging purposes.
|
|
7122
|
+
*/
|
|
7123
|
+
readonly modelId: string;
|
|
7124
|
+
/**
|
|
7125
|
+
* Streams a speech translation for live audio.
|
|
7126
|
+
*/
|
|
7127
|
+
doStream(options: SpeechTranslationModelV4StreamOptions): PromiseLike<SpeechTranslationModelV4StreamResult>;
|
|
7128
|
+
};
|
|
7129
|
+
|
|
6867
7130
|
/**
|
|
6868
7131
|
* A video or image file that can be used for video editing or image-to-video generation.
|
|
6869
7132
|
* Supports both image inputs (for image-to-video) and video inputs (for editing).
|
|
@@ -7091,11 +7354,130 @@ type VideoModelV4Result = {
|
|
|
7091
7354
|
};
|
|
7092
7355
|
};
|
|
7093
7356
|
|
|
7357
|
+
/**
|
|
7358
|
+
* Result returned by `doStart` when initiating an asynchronous video generation.
|
|
7359
|
+
*/
|
|
7360
|
+
type VideoModelV4OperationStartResult = {
|
|
7361
|
+
/**
|
|
7362
|
+
* JSON-serializable opaque reference passed to `doStatus` to check the
|
|
7363
|
+
* status of the generation (e.g., a task ID or prediction URL).
|
|
7364
|
+
*/
|
|
7365
|
+
operation: JSONValue;
|
|
7366
|
+
/**
|
|
7367
|
+
* Warnings for the call, e.g. unsupported features.
|
|
7368
|
+
*/
|
|
7369
|
+
warnings: Array<SharedV4Warning>;
|
|
7370
|
+
/**
|
|
7371
|
+
* Additional provider-specific metadata.
|
|
7372
|
+
*/
|
|
7373
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
7374
|
+
/**
|
|
7375
|
+
* Response information for telemetry and debugging purposes.
|
|
7376
|
+
*/
|
|
7377
|
+
response: {
|
|
7378
|
+
/**
|
|
7379
|
+
* Timestamp for the start of the response.
|
|
7380
|
+
*/
|
|
7381
|
+
timestamp: Date;
|
|
7382
|
+
/**
|
|
7383
|
+
* The ID of the response model that was used.
|
|
7384
|
+
*/
|
|
7385
|
+
modelId: string;
|
|
7386
|
+
/**
|
|
7387
|
+
* Response headers.
|
|
7388
|
+
*/
|
|
7389
|
+
headers: Record<string, string> | undefined;
|
|
7390
|
+
};
|
|
7391
|
+
};
|
|
7392
|
+
|
|
7393
|
+
/**
|
|
7394
|
+
* Result returned by `doStatus` when checking the status of an
|
|
7395
|
+
* asynchronous video generation.
|
|
7396
|
+
*/
|
|
7397
|
+
type VideoModelV4OperationStatusResult = {
|
|
7398
|
+
/**
|
|
7399
|
+
* The video generation is still in progress.
|
|
7400
|
+
*/
|
|
7401
|
+
status: 'pending';
|
|
7402
|
+
/**
|
|
7403
|
+
* Warnings for the call.
|
|
7404
|
+
*/
|
|
7405
|
+
warnings?: Array<SharedV4Warning>;
|
|
7406
|
+
/**
|
|
7407
|
+
* Additional provider-specific metadata.
|
|
7408
|
+
*/
|
|
7409
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
7410
|
+
/**
|
|
7411
|
+
* Response information for telemetry and debugging purposes.
|
|
7412
|
+
*/
|
|
7413
|
+
response: {
|
|
7414
|
+
timestamp: Date;
|
|
7415
|
+
modelId: string;
|
|
7416
|
+
headers: Record<string, string> | undefined;
|
|
7417
|
+
};
|
|
7418
|
+
} | {
|
|
7419
|
+
/**
|
|
7420
|
+
* The video generation is complete.
|
|
7421
|
+
*/
|
|
7422
|
+
status: 'completed';
|
|
7423
|
+
/**
|
|
7424
|
+
* Generated videos.
|
|
7425
|
+
*/
|
|
7426
|
+
videos: Array<VideoModelV4VideoData>;
|
|
7427
|
+
/**
|
|
7428
|
+
* Warnings for the call.
|
|
7429
|
+
*/
|
|
7430
|
+
warnings: Array<SharedV4Warning>;
|
|
7431
|
+
/**
|
|
7432
|
+
* Additional provider-specific metadata.
|
|
7433
|
+
*/
|
|
7434
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
7435
|
+
/**
|
|
7436
|
+
* Response information for telemetry and debugging purposes.
|
|
7437
|
+
*/
|
|
7438
|
+
response: {
|
|
7439
|
+
timestamp: Date;
|
|
7440
|
+
modelId: string;
|
|
7441
|
+
headers: Record<string, string> | undefined;
|
|
7442
|
+
};
|
|
7443
|
+
} | {
|
|
7444
|
+
/**
|
|
7445
|
+
* The video generation failed.
|
|
7446
|
+
*/
|
|
7447
|
+
status: 'error';
|
|
7448
|
+
/**
|
|
7449
|
+
* A human-readable error message describing why the generation failed.
|
|
7450
|
+
*/
|
|
7451
|
+
error: string;
|
|
7452
|
+
/**
|
|
7453
|
+
* Additional provider-specific metadata.
|
|
7454
|
+
*/
|
|
7455
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
7456
|
+
/**
|
|
7457
|
+
* Response information for telemetry and debugging purposes.
|
|
7458
|
+
*/
|
|
7459
|
+
response: {
|
|
7460
|
+
timestamp: Date;
|
|
7461
|
+
modelId: string;
|
|
7462
|
+
headers: Record<string, string> | undefined;
|
|
7463
|
+
};
|
|
7464
|
+
};
|
|
7465
|
+
|
|
7466
|
+
/**
|
|
7467
|
+
* Data received from a webhook notification during asynchronous video
|
|
7468
|
+
* generation. Generic over the body type so providers/consumers can
|
|
7469
|
+
* narrow it to a specific shape.
|
|
7470
|
+
*/
|
|
7471
|
+
type VideoModelV4OperationWebhook<TBody = JSONValue> = {
|
|
7472
|
+
headers: Record<string, string>;
|
|
7473
|
+
body: TBody;
|
|
7474
|
+
};
|
|
7475
|
+
|
|
7094
7476
|
type GetMaxVideosPerCallFunction$1 = (options: {
|
|
7095
7477
|
modelId: string;
|
|
7096
7478
|
}) => PromiseLike<number | undefined> | number | undefined;
|
|
7097
7479
|
/**
|
|
7098
|
-
* Video generation model specification version
|
|
7480
|
+
* Video generation model specification version 4.
|
|
7099
7481
|
*/
|
|
7100
7482
|
type VideoModelV4 = {
|
|
7101
7483
|
/**
|
|
@@ -7126,8 +7508,80 @@ type VideoModelV4 = {
|
|
|
7126
7508
|
readonly maxVideosPerCall: number | undefined | GetMaxVideosPerCallFunction$1;
|
|
7127
7509
|
/**
|
|
7128
7510
|
* Generates an array of videos.
|
|
7511
|
+
*
|
|
7512
|
+
* Optional when `doStart` and `doStatus` are provided to support
|
|
7513
|
+
* the asynchronous start/status flow.
|
|
7129
7514
|
*/
|
|
7130
|
-
doGenerate(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
|
|
7515
|
+
doGenerate?(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
|
|
7516
|
+
/**
|
|
7517
|
+
* Optional method that handles the user's `webhook` option for the
|
|
7518
|
+
* asynchronous start/status flow.
|
|
7519
|
+
*
|
|
7520
|
+
* Its presence on the model signals that the provider's API natively
|
|
7521
|
+
* supports webhooks. The SDK checks for this method before invoking the
|
|
7522
|
+
* user-provided `webhook` factory:
|
|
7523
|
+
*
|
|
7524
|
+
* - **Present**: The SDK calls this method with the user's webhook factory.
|
|
7525
|
+
* The implementation should invoke the factory to obtain a webhook URL
|
|
7526
|
+
* and a `received` promise. The URL is then forwarded to `doStart` via
|
|
7527
|
+
* `webhookUrl`, and the SDK awaits `received` instead of polling.
|
|
7528
|
+
*
|
|
7529
|
+
* - **Absent**: The SDK never calls the user's `webhook` factory and falls
|
|
7530
|
+
* back to polling via `doStatus`. This avoids unnecessary webhook
|
|
7531
|
+
* endpoint creation for providers whose APIs have no native webhook
|
|
7532
|
+
* mechanism.
|
|
7533
|
+
*
|
|
7534
|
+
* This method exists because the SDK must decide whether to invoke the
|
|
7535
|
+
* user's webhook factory — which may create real HTTP endpoints or
|
|
7536
|
+
* external resources — *before* calling `doStart`. Without an explicit
|
|
7537
|
+
* capability signal on the model, the SDK would eagerly create a webhook
|
|
7538
|
+
* endpoint for every provider, even those that silently ignore the URL.
|
|
7539
|
+
*/
|
|
7540
|
+
handleWebhookOption?: (options: {
|
|
7541
|
+
webhook: () => PromiseLike<{
|
|
7542
|
+
url: string;
|
|
7543
|
+
received: PromiseLike<VideoModelV4OperationWebhook>;
|
|
7544
|
+
}>;
|
|
7545
|
+
}) => PromiseLike<{
|
|
7546
|
+
webhookUrl: string;
|
|
7547
|
+
received: PromiseLike<VideoModelV4OperationWebhook>;
|
|
7548
|
+
}>;
|
|
7549
|
+
/**
|
|
7550
|
+
* Starts an asynchronous video generation and returns an opaque operation
|
|
7551
|
+
* reference that can be passed to `doStatus` to poll for completion.
|
|
7552
|
+
*
|
|
7553
|
+
* When both `doStart` and `doStatus` are implemented, the SDK core can
|
|
7554
|
+
* orchestrate polling or webhook-based completion instead of requiring
|
|
7555
|
+
* the provider to implement its own polling loop in `doGenerate`.
|
|
7556
|
+
*/
|
|
7557
|
+
doStart?(options: VideoModelV4CallOptions & {
|
|
7558
|
+
/**
|
|
7559
|
+
* When provided, the provider should register this URL to receive
|
|
7560
|
+
* a webhook notification when the video generation completes.
|
|
7561
|
+
*/
|
|
7562
|
+
webhookUrl?: string;
|
|
7563
|
+
}): PromiseLike<VideoModelV4OperationStartResult>;
|
|
7564
|
+
/**
|
|
7565
|
+
* Checks the status of an asynchronous video generation that was
|
|
7566
|
+
* started with `doStart`.
|
|
7567
|
+
*
|
|
7568
|
+
* Returns either a `pending` status or a `completed` status with the
|
|
7569
|
+
* generated videos.
|
|
7570
|
+
*/
|
|
7571
|
+
doStatus?(options: {
|
|
7572
|
+
/**
|
|
7573
|
+
* The JSON-serializable opaque operation reference returned by `doStart`.
|
|
7574
|
+
*/
|
|
7575
|
+
operation: JSONValue;
|
|
7576
|
+
/**
|
|
7577
|
+
* Abort signal for cancelling the operation.
|
|
7578
|
+
*/
|
|
7579
|
+
abortSignal?: AbortSignal;
|
|
7580
|
+
/**
|
|
7581
|
+
* Additional HTTP headers.
|
|
7582
|
+
*/
|
|
7583
|
+
headers?: Record<string, string | undefined>;
|
|
7584
|
+
}): PromiseLike<VideoModelV4OperationStatusResult>;
|
|
7131
7585
|
};
|
|
7132
7586
|
|
|
7133
7587
|
/**
|
|
@@ -7385,4 +7839,4 @@ type VideoModelV3 = {
|
|
|
7385
7839
|
}>;
|
|
7386
7840
|
};
|
|
7387
7841
|
|
|
7388
|
-
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 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 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 };
|
|
7842
|
+
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 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