@ai-sdk/provider 4.0.0-beta.9 → 4.0.0-canary.16
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 +46 -0
- package/dist/index.d.ts +481 -439
- package/dist/index.js +2 -47
- package/dist/index.js.map +1 -1
- package/package.json +8 -6
- package/src/embedding-model/v2/embedding-model-v2.ts +2 -2
- package/src/embedding-model/v3/embedding-model-v3-call-options.ts +1 -1
- package/src/embedding-model/v3/embedding-model-v3-result.ts +2 -2
- package/src/embedding-model/v3/embedding-model-v3.ts +2 -2
- package/src/embedding-model/v4/embedding-model-v4-call-options.ts +1 -1
- package/src/embedding-model/v4/embedding-model-v4-result.ts +2 -2
- package/src/embedding-model/v4/embedding-model-v4.ts +2 -2
- package/src/embedding-model-middleware/v3/embedding-model-v3-middleware.ts +2 -2
- package/src/embedding-model-middleware/v4/embedding-model-v4-middleware.ts +2 -2
- package/src/errors/no-such-provider-reference-error.ts +1 -1
- package/src/files/v4/files-v4-upload-file-call-options.ts +35 -0
- package/src/files/v4/files-v4-upload-file-result.ts +35 -0
- package/src/files/v4/files-v4.ts +2 -63
- package/src/files/v4/index.ts +3 -5
- package/src/image-model/v2/image-model-v2-call-options.ts +1 -1
- package/src/image-model/v2/image-model-v2-call-warning.ts +1 -1
- package/src/image-model/v2/image-model-v2.ts +3 -3
- package/src/image-model/v3/image-model-v3-call-options.ts +2 -2
- package/src/image-model/v3/image-model-v3-file.ts +1 -1
- package/src/image-model/v3/image-model-v3.ts +4 -4
- package/src/image-model/v4/image-model-v4-call-options.ts +2 -2
- package/src/image-model/v4/image-model-v4-file.ts +1 -1
- package/src/image-model/v4/image-model-v4-result.ts +73 -0
- package/src/image-model/v4/image-model-v4.ts +3 -70
- package/src/image-model/v4/index.ts +4 -3
- package/src/image-model-middleware/v3/image-model-v3-middleware.ts +2 -2
- package/src/image-model-middleware/v4/image-model-v4-middleware.ts +2 -2
- package/src/json-value/is-json.ts +1 -1
- package/src/language-model/v2/language-model-v2-call-options.ts +6 -6
- package/src/language-model/v2/language-model-v2-call-warning.ts +3 -3
- package/src/language-model/v2/language-model-v2-content.ts +6 -6
- package/src/language-model/v2/language-model-v2-function-tool.ts +2 -2
- package/src/language-model/v2/language-model-v2-prompt.ts +3 -3
- package/src/language-model/v2/language-model-v2-reasoning.ts +1 -1
- package/src/language-model/v2/language-model-v2-source.ts +1 -1
- package/src/language-model/v2/language-model-v2-stream-part.ts +9 -9
- package/src/language-model/v2/language-model-v2-text.ts +1 -1
- package/src/language-model/v2/language-model-v2-tool-call.ts +1 -1
- package/src/language-model/v2/language-model-v2-tool-result.ts +1 -1
- package/src/language-model/v2/language-model-v2.ts +9 -9
- package/src/language-model/v3/language-model-v3-call-options.ts +6 -6
- package/src/language-model/v3/language-model-v3-content.ts +7 -7
- package/src/language-model/v3/language-model-v3-file.ts +1 -1
- package/src/language-model/v3/language-model-v3-function-tool.ts +3 -3
- package/src/language-model/v3/language-model-v3-generate-result.ts +6 -6
- package/src/language-model/v3/language-model-v3-prompt.ts +3 -3
- package/src/language-model/v3/language-model-v3-reasoning.ts +1 -1
- package/src/language-model/v3/language-model-v3-source.ts +1 -1
- package/src/language-model/v3/language-model-v3-stream-part.ts +10 -10
- package/src/language-model/v3/language-model-v3-stream-result.ts +2 -2
- package/src/language-model/v3/language-model-v3-text.ts +1 -1
- package/src/language-model/v3/language-model-v3-tool-approval-request.ts +1 -1
- package/src/language-model/v3/language-model-v3-tool-call.ts +1 -1
- package/src/language-model/v3/language-model-v3-tool-result.ts +2 -2
- package/src/language-model/v3/language-model-v3-usage.ts +1 -1
- package/src/language-model/v3/language-model-v3.ts +3 -3
- package/src/language-model/v4/index.ts +0 -1
- package/src/language-model/v4/language-model-v4-call-options.ts +6 -6
- package/src/language-model/v4/language-model-v4-content.ts +9 -9
- package/src/language-model/v4/language-model-v4-custom-content.ts +1 -1
- package/src/language-model/v4/language-model-v4-file.ts +10 -3
- package/src/language-model/v4/language-model-v4-function-tool.ts +3 -3
- package/src/language-model/v4/language-model-v4-generate-result.ts +6 -6
- package/src/language-model/v4/language-model-v4-prompt.ts +43 -97
- package/src/language-model/v4/language-model-v4-reasoning-file.ts +10 -3
- package/src/language-model/v4/language-model-v4-reasoning.ts +1 -1
- package/src/language-model/v4/language-model-v4-source.ts +1 -1
- package/src/language-model/v4/language-model-v4-stream-part.ts +12 -12
- package/src/language-model/v4/language-model-v4-stream-result.ts +2 -2
- package/src/language-model/v4/language-model-v4-text.ts +1 -1
- package/src/language-model/v4/language-model-v4-tool-approval-request.ts +1 -1
- package/src/language-model/v4/language-model-v4-tool-call.ts +1 -1
- package/src/language-model/v4/language-model-v4-tool-result.ts +2 -2
- package/src/language-model/v4/language-model-v4-usage.ts +1 -1
- package/src/language-model/v4/language-model-v4.ts +3 -3
- package/src/language-model-middleware/v2/language-model-v2-middleware.ts +2 -2
- package/src/language-model-middleware/v3/language-model-v3-middleware.ts +4 -4
- package/src/language-model-middleware/v4/language-model-v4-middleware.ts +4 -4
- package/src/provider/v2/provider-v2.ts +5 -5
- package/src/provider/v3/provider-v3.ts +6 -6
- package/src/provider/v4/provider-v4.ts +8 -8
- package/src/reranking-model/v3/reranking-model-v3-call-options.ts +2 -2
- package/src/reranking-model/v3/reranking-model-v3.ts +2 -2
- package/src/reranking-model/v4/index.ts +1 -0
- package/src/reranking-model/v4/reranking-model-v4-call-options.ts +2 -2
- package/src/reranking-model/v4/reranking-model-v4-result.ts +68 -0
- package/src/reranking-model/v4/reranking-model-v4.ts +5 -65
- package/src/shared/v2/shared-v2-provider-metadata.ts +1 -1
- package/src/shared/v2/shared-v2-provider-options.ts +1 -1
- package/src/shared/v3/shared-v3-provider-metadata.ts +1 -1
- package/src/shared/v3/shared-v3-provider-options.ts +1 -1
- package/src/shared/v4/index.ts +1 -0
- package/src/shared/v4/shared-v4-file-data.ts +49 -0
- package/src/shared/v4/shared-v4-provider-metadata.ts +1 -1
- package/src/shared/v4/shared-v4-provider-options.ts +1 -1
- package/src/shared/v4/shared-v4-provider-reference.ts +8 -1
- package/src/skills/v4/index.ts +4 -4
- package/src/skills/v4/skills-v4-upload-skill-call-options.ts +37 -0
- package/src/skills/v4/skills-v4-upload-skill-result.ts +40 -0
- package/src/skills/v4/skills-v4.ts +5 -71
- package/src/speech-model/v2/speech-model-v2-call-options.ts +1 -1
- package/src/speech-model/v2/speech-model-v2-call-warning.ts +1 -1
- package/src/speech-model/v2/speech-model-v2.ts +4 -4
- package/src/speech-model/v3/speech-model-v3-call-options.ts +1 -1
- package/src/speech-model/v3/speech-model-v3.ts +4 -4
- package/src/speech-model/v4/index.ts +1 -0
- package/src/speech-model/v4/speech-model-v4-call-options.ts +1 -1
- package/src/speech-model/v4/speech-model-v4-result.ts +64 -0
- package/src/speech-model/v4/speech-model-v4.ts +5 -61
- package/src/transcription-model/v2/transcription-model-v2-call-options.ts +1 -1
- package/src/transcription-model/v2/transcription-model-v2-call-warning.ts +1 -1
- package/src/transcription-model/v2/transcription-model-v2.ts +4 -4
- package/src/transcription-model/v3/transcription-model-v3-call-options.ts +1 -1
- package/src/transcription-model/v3/transcription-model-v3.ts +4 -4
- package/src/transcription-model/v4/index.ts +1 -0
- package/src/transcription-model/v4/transcription-model-v4-call-options.ts +1 -1
- package/src/transcription-model/v4/transcription-model-v4-result.ts +92 -0
- package/src/transcription-model/v4/transcription-model-v4.ts +5 -89
- package/src/video-model/v3/video-model-v3-call-options.ts +2 -2
- package/src/video-model/v3/video-model-v3-file.ts +1 -1
- package/src/video-model/v4/index.ts +4 -3
- package/src/video-model/v4/video-model-v4-call-options.ts +2 -2
- package/src/video-model/v4/video-model-v4-file.ts +1 -1
- package/src/video-model/v4/video-model-v4-result.ts +92 -0
- package/src/video-model/v4/video-model-v4.ts +2 -88
- package/dist/index.d.mts +0 -6590
- package/dist/index.mjs +0 -426
- package/dist/index.mjs.map +0 -1
- package/src/language-model/v4/language-model-v4-data-content.ts +0 -4
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,69 @@
|
|
|
1
1
|
import { JSONSchema7 } from 'json-schema';
|
|
2
2
|
export { JSONSchema7, JSONSchema7Definition } from 'json-schema';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* A mapping of provider names to provider-specific file identifiers.
|
|
6
|
+
*
|
|
7
|
+
* Provider references allow files to be identified across different
|
|
8
|
+
* providers without re-uploading, by storing each provider's own
|
|
9
|
+
* identifier for the same logical file.
|
|
10
|
+
*
|
|
11
|
+
* ```ts
|
|
12
|
+
* {
|
|
13
|
+
* "openai": "file-abc123",
|
|
14
|
+
* "anthropic": "file-xyz789"
|
|
15
|
+
* }
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* The `type?: never` constraint excludes any object that has a `type`
|
|
19
|
+
* property, so a `SharedV4ProviderReference` cannot be confused with a
|
|
20
|
+
* tagged file-data shape (e.g. `{ type: 'data', data }` or
|
|
21
|
+
* `{ type: 'reference', reference }`) when both appear in the same union.
|
|
22
|
+
*/
|
|
23
|
+
type SharedV4ProviderReference = Record<string, string> & {
|
|
24
|
+
type?: never;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* File data variant containing raw bytes (`Uint8Array`) or a base64-encoded
|
|
29
|
+
* string.
|
|
30
|
+
*/
|
|
31
|
+
interface SharedV4FileDataData {
|
|
32
|
+
type: 'data';
|
|
33
|
+
data: Uint8Array | string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* File data variant containing a URL that points to the file.
|
|
37
|
+
*/
|
|
38
|
+
interface SharedV4FileDataUrl {
|
|
39
|
+
type: 'url';
|
|
40
|
+
url: URL;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* File data variant containing a provider reference (`{ [provider]: id }`).
|
|
44
|
+
*/
|
|
45
|
+
interface SharedV4FileDataReference {
|
|
46
|
+
type: 'reference';
|
|
47
|
+
reference: SharedV4ProviderReference;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* File data variant containing inline text content (e.g. an inline text
|
|
51
|
+
* document).
|
|
52
|
+
*/
|
|
53
|
+
interface SharedV4FileDataText {
|
|
54
|
+
type: 'text';
|
|
55
|
+
text: string;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* File data as a tagged discriminated union:
|
|
59
|
+
*
|
|
60
|
+
* - `{ type: 'data', data }`: raw bytes (`Uint8Array`) or base64-encoded string.
|
|
61
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
62
|
+
* - `{ type: 'reference', reference }`: a provider reference (`{ [provider]: id }`).
|
|
63
|
+
* - `{ type: 'text', text }`: inline text content (e.g. an inline text document).
|
|
64
|
+
*/
|
|
65
|
+
type SharedV4FileData = SharedV4FileDataData | SharedV4FileDataUrl | SharedV4FileDataReference | SharedV4FileDataText;
|
|
66
|
+
|
|
4
67
|
type SharedV4Headers = Record<string, string>;
|
|
5
68
|
|
|
6
69
|
/**
|
|
@@ -59,22 +122,6 @@ type SharedV4ProviderMetadata = Record<string, JSONObject>;
|
|
|
59
122
|
*/
|
|
60
123
|
type SharedV4ProviderOptions = Record<string, JSONObject>;
|
|
61
124
|
|
|
62
|
-
/**
|
|
63
|
-
* A mapping of provider names to provider-specific file identifiers.
|
|
64
|
-
*
|
|
65
|
-
* Provider references allow files to be identified across different
|
|
66
|
-
* providers without re-uploading, by storing each provider's own
|
|
67
|
-
* identifier for the same logical file.
|
|
68
|
-
*
|
|
69
|
-
* ```ts
|
|
70
|
-
* {
|
|
71
|
-
* "openai": "file-abc123",
|
|
72
|
-
* "anthropic": "file-xyz789"
|
|
73
|
-
* }
|
|
74
|
-
* ```
|
|
75
|
-
*/
|
|
76
|
-
type SharedV4ProviderReference = Record<string, string>;
|
|
77
|
-
|
|
78
125
|
/**
|
|
79
126
|
* Warning from the model.
|
|
80
127
|
*
|
|
@@ -846,55 +893,60 @@ declare class UnsupportedFunctionalityError extends AISDKError {
|
|
|
846
893
|
}
|
|
847
894
|
|
|
848
895
|
/**
|
|
849
|
-
*
|
|
896
|
+
* Options for uploading a file via the files interface.
|
|
850
897
|
*/
|
|
851
|
-
type
|
|
898
|
+
type FilesV4UploadFileCallOptions = {
|
|
852
899
|
/**
|
|
853
|
-
*
|
|
900
|
+
* The file data.
|
|
901
|
+
*
|
|
902
|
+
* - `{ type: 'data', data }`: raw bytes (`Uint8Array`) or a base64-encoded string.
|
|
903
|
+
* - `{ type: 'text', text }`: inline text (UTF-8).
|
|
854
904
|
*/
|
|
855
|
-
|
|
905
|
+
data: SharedV4FileDataData | SharedV4FileDataText;
|
|
856
906
|
/**
|
|
857
|
-
* The IANA media type of the
|
|
907
|
+
* The IANA media type of the file (e.g. `'application/pdf'`).
|
|
858
908
|
*/
|
|
859
|
-
mediaType
|
|
909
|
+
mediaType: string;
|
|
860
910
|
/**
|
|
861
|
-
* The filename of the
|
|
911
|
+
* The filename of the file.
|
|
862
912
|
*/
|
|
863
913
|
filename?: string;
|
|
864
914
|
/**
|
|
865
|
-
* Additional provider-specific
|
|
915
|
+
* Additional provider-specific options. They are passed through
|
|
866
916
|
* to the provider from the AI SDK and enable provider-specific
|
|
867
917
|
* functionality that can be fully encapsulated in the provider.
|
|
868
918
|
*/
|
|
869
|
-
|
|
870
|
-
/**
|
|
871
|
-
* Warnings from the provider.
|
|
872
|
-
*/
|
|
873
|
-
warnings: Array<SharedV4Warning>;
|
|
919
|
+
providerOptions?: SharedV4ProviderOptions;
|
|
874
920
|
};
|
|
921
|
+
|
|
875
922
|
/**
|
|
876
|
-
*
|
|
923
|
+
* Result of uploading a file via the files interface.
|
|
877
924
|
*/
|
|
878
|
-
type
|
|
925
|
+
type FilesV4UploadFileResult = {
|
|
879
926
|
/**
|
|
880
|
-
*
|
|
927
|
+
* A provider reference mapping provider names to provider-specific file identifiers.
|
|
881
928
|
*/
|
|
882
|
-
|
|
929
|
+
providerReference: SharedV4ProviderReference;
|
|
883
930
|
/**
|
|
884
|
-
* The IANA media type of the file
|
|
931
|
+
* The IANA media type of the uploaded file, if available from the provider.
|
|
885
932
|
*/
|
|
886
|
-
mediaType
|
|
933
|
+
mediaType?: string;
|
|
887
934
|
/**
|
|
888
|
-
* The filename of the file.
|
|
935
|
+
* The filename of the uploaded file, if available from the provider.
|
|
889
936
|
*/
|
|
890
937
|
filename?: string;
|
|
891
938
|
/**
|
|
892
|
-
* Additional provider-specific
|
|
939
|
+
* Additional provider-specific metadata. They are passed through
|
|
893
940
|
* to the provider from the AI SDK and enable provider-specific
|
|
894
941
|
* functionality that can be fully encapsulated in the provider.
|
|
895
942
|
*/
|
|
896
|
-
|
|
943
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
944
|
+
/**
|
|
945
|
+
* Warnings from the provider.
|
|
946
|
+
*/
|
|
947
|
+
warnings: Array<SharedV4Warning>;
|
|
897
948
|
};
|
|
949
|
+
|
|
898
950
|
/**
|
|
899
951
|
* Specification for a file management interface that implements the files interface version 4.
|
|
900
952
|
*/
|
|
@@ -914,28 +966,6 @@ type FilesV4 = {
|
|
|
914
966
|
uploadFile(options: FilesV4UploadFileCallOptions): PromiseLike<FilesV4UploadFileResult>;
|
|
915
967
|
};
|
|
916
968
|
|
|
917
|
-
declare function isJSONValue(value: unknown): value is JSONValue;
|
|
918
|
-
declare function isJSONArray(value: unknown): value is JSONArray;
|
|
919
|
-
declare function isJSONObject(value: unknown): value is JSONObject;
|
|
920
|
-
|
|
921
|
-
/**
|
|
922
|
-
* Usage information for an image model call.
|
|
923
|
-
*/
|
|
924
|
-
type ImageModelV4Usage = {
|
|
925
|
-
/**
|
|
926
|
-
* The number of input (prompt) tokens used.
|
|
927
|
-
*/
|
|
928
|
-
inputTokens: number | undefined;
|
|
929
|
-
/**
|
|
930
|
-
* The number of output tokens used, if reported by the provider.
|
|
931
|
-
*/
|
|
932
|
-
outputTokens: number | undefined;
|
|
933
|
-
/**
|
|
934
|
-
* The total number of tokens as reported by the provider.
|
|
935
|
-
*/
|
|
936
|
-
totalTokens: number | undefined;
|
|
937
|
-
};
|
|
938
|
-
|
|
939
969
|
/**
|
|
940
970
|
* An image file that can be used for image editing or variation generation.
|
|
941
971
|
*/
|
|
@@ -1035,9 +1065,88 @@ type ImageModelV4CallOptions = {
|
|
|
1035
1065
|
headers?: Record<string, string | undefined>;
|
|
1036
1066
|
};
|
|
1037
1067
|
|
|
1068
|
+
declare function isJSONValue(value: unknown): value is JSONValue;
|
|
1069
|
+
declare function isJSONArray(value: unknown): value is JSONArray;
|
|
1070
|
+
declare function isJSONObject(value: unknown): value is JSONObject;
|
|
1071
|
+
|
|
1072
|
+
/**
|
|
1073
|
+
* Usage information for an image model call.
|
|
1074
|
+
*/
|
|
1075
|
+
type ImageModelV4Usage = {
|
|
1076
|
+
/**
|
|
1077
|
+
* The number of input (prompt) tokens used.
|
|
1078
|
+
*/
|
|
1079
|
+
inputTokens: number | undefined;
|
|
1080
|
+
/**
|
|
1081
|
+
* The number of output tokens used, if reported by the provider.
|
|
1082
|
+
*/
|
|
1083
|
+
outputTokens: number | undefined;
|
|
1084
|
+
/**
|
|
1085
|
+
* The total number of tokens as reported by the provider.
|
|
1086
|
+
*/
|
|
1087
|
+
totalTokens: number | undefined;
|
|
1088
|
+
};
|
|
1089
|
+
|
|
1038
1090
|
type ImageModelV4ProviderMetadata = Record<string, {
|
|
1039
1091
|
images: JSONArray;
|
|
1040
1092
|
} & JSONValue>;
|
|
1093
|
+
/**
|
|
1094
|
+
* The result of an image model doGenerate call.
|
|
1095
|
+
*/
|
|
1096
|
+
type ImageModelV4Result = {
|
|
1097
|
+
/**
|
|
1098
|
+
* Generated images as base64 encoded strings or binary data.
|
|
1099
|
+
* The images should be returned without any unnecessary conversion.
|
|
1100
|
+
* If the API returns base64 encoded strings, the images should be returned
|
|
1101
|
+
* as base64 encoded strings. If the API returns binary data, the images should
|
|
1102
|
+
* be returned as binary data.
|
|
1103
|
+
*/
|
|
1104
|
+
images: Array<string> | Array<Uint8Array>;
|
|
1105
|
+
/**
|
|
1106
|
+
* Warnings for the call, e.g. unsupported features.
|
|
1107
|
+
*/
|
|
1108
|
+
warnings: Array<SharedV4Warning>;
|
|
1109
|
+
/**
|
|
1110
|
+
* Additional provider-specific metadata. They are passed through
|
|
1111
|
+
* from the provider to the AI SDK and enable provider-specific
|
|
1112
|
+
* results that can be fully encapsulated in the provider.
|
|
1113
|
+
*
|
|
1114
|
+
* The outer record is keyed by the provider name, and the inner
|
|
1115
|
+
* record is provider-specific metadata. It always includes an
|
|
1116
|
+
* `images` key with image-specific metadata
|
|
1117
|
+
*
|
|
1118
|
+
* ```ts
|
|
1119
|
+
* {
|
|
1120
|
+
* "openai": {
|
|
1121
|
+
* "images": ["revisedPrompt": "Revised prompt here."]
|
|
1122
|
+
* }
|
|
1123
|
+
* }
|
|
1124
|
+
* ```
|
|
1125
|
+
*/
|
|
1126
|
+
providerMetadata?: ImageModelV4ProviderMetadata;
|
|
1127
|
+
/**
|
|
1128
|
+
* Response information for telemetry and debugging purposes.
|
|
1129
|
+
*/
|
|
1130
|
+
response: {
|
|
1131
|
+
/**
|
|
1132
|
+
* Timestamp for the start of the generated response.
|
|
1133
|
+
*/
|
|
1134
|
+
timestamp: Date;
|
|
1135
|
+
/**
|
|
1136
|
+
* The ID of the response model that was used to generate the response.
|
|
1137
|
+
*/
|
|
1138
|
+
modelId: string;
|
|
1139
|
+
/**
|
|
1140
|
+
* Response headers.
|
|
1141
|
+
*/
|
|
1142
|
+
headers: Record<string, string> | undefined;
|
|
1143
|
+
};
|
|
1144
|
+
/**
|
|
1145
|
+
* Optional token usage for the image generation call (if the provider reports it).
|
|
1146
|
+
*/
|
|
1147
|
+
usage?: ImageModelV4Usage;
|
|
1148
|
+
};
|
|
1149
|
+
|
|
1041
1150
|
type GetMaxImagesPerCallFunction$2 = (options: {
|
|
1042
1151
|
modelId: string;
|
|
1043
1152
|
}) => PromiseLike<number | undefined> | number | undefined;
|
|
@@ -1071,59 +1180,7 @@ type ImageModelV4 = {
|
|
|
1071
1180
|
/**
|
|
1072
1181
|
* Generates an array of images.
|
|
1073
1182
|
*/
|
|
1074
|
-
doGenerate(options: ImageModelV4CallOptions): PromiseLike<
|
|
1075
|
-
/**
|
|
1076
|
-
* Generated images as base64 encoded strings or binary data.
|
|
1077
|
-
* The images should be returned without any unnecessary conversion.
|
|
1078
|
-
* If the API returns base64 encoded strings, the images should be returned
|
|
1079
|
-
* as base64 encoded strings. If the API returns binary data, the images should
|
|
1080
|
-
* be returned as binary data.
|
|
1081
|
-
*/
|
|
1082
|
-
images: Array<string> | Array<Uint8Array>;
|
|
1083
|
-
/**
|
|
1084
|
-
* Warnings for the call, e.g. unsupported features.
|
|
1085
|
-
*/
|
|
1086
|
-
warnings: Array<SharedV4Warning>;
|
|
1087
|
-
/**
|
|
1088
|
-
* Additional provider-specific metadata. They are passed through
|
|
1089
|
-
* from the provider to the AI SDK and enable provider-specific
|
|
1090
|
-
* results that can be fully encapsulated in the provider.
|
|
1091
|
-
*
|
|
1092
|
-
* The outer record is keyed by the provider name, and the inner
|
|
1093
|
-
* record is provider-specific metadata. It always includes an
|
|
1094
|
-
* `images` key with image-specific metadata
|
|
1095
|
-
*
|
|
1096
|
-
* ```ts
|
|
1097
|
-
* {
|
|
1098
|
-
* "openai": {
|
|
1099
|
-
* "images": ["revisedPrompt": "Revised prompt here."]
|
|
1100
|
-
* }
|
|
1101
|
-
* }
|
|
1102
|
-
* ```
|
|
1103
|
-
*/
|
|
1104
|
-
providerMetadata?: ImageModelV4ProviderMetadata;
|
|
1105
|
-
/**
|
|
1106
|
-
* Response information for telemetry and debugging purposes.
|
|
1107
|
-
*/
|
|
1108
|
-
response: {
|
|
1109
|
-
/**
|
|
1110
|
-
* Timestamp for the start of the generated response.
|
|
1111
|
-
*/
|
|
1112
|
-
timestamp: Date;
|
|
1113
|
-
/**
|
|
1114
|
-
* The ID of the response model that was used to generate the response.
|
|
1115
|
-
*/
|
|
1116
|
-
modelId: string;
|
|
1117
|
-
/**
|
|
1118
|
-
* Response headers.
|
|
1119
|
-
*/
|
|
1120
|
-
headers: Record<string, string> | undefined;
|
|
1121
|
-
};
|
|
1122
|
-
/**
|
|
1123
|
-
* Optional token usage for the image generation call (if the provider reports it).
|
|
1124
|
-
*/
|
|
1125
|
-
usage?: ImageModelV4Usage;
|
|
1126
|
-
}>;
|
|
1183
|
+
doGenerate(options: ImageModelV4CallOptions): PromiseLike<ImageModelV4Result>;
|
|
1127
1184
|
};
|
|
1128
1185
|
|
|
1129
1186
|
/**
|
|
@@ -1648,11 +1705,6 @@ type LanguageModelV4FunctionTool = {
|
|
|
1648
1705
|
providerOptions?: SharedV4ProviderOptions;
|
|
1649
1706
|
};
|
|
1650
1707
|
|
|
1651
|
-
/**
|
|
1652
|
-
* Data content. Can be a Uint8Array, base64 encoded data as a string or a URL.
|
|
1653
|
-
*/
|
|
1654
|
-
type LanguageModelV4DataContent = Uint8Array | string | URL;
|
|
1655
|
-
|
|
1656
1708
|
/**
|
|
1657
1709
|
* A prompt is a list of messages.
|
|
1658
1710
|
*
|
|
@@ -1721,9 +1773,12 @@ interface LanguageModelV4ReasoningPart {
|
|
|
1721
1773
|
interface LanguageModelV4ReasoningFilePart {
|
|
1722
1774
|
type: 'reasoning-file';
|
|
1723
1775
|
/**
|
|
1724
|
-
* File data
|
|
1776
|
+
* File data as a tagged discriminated union:
|
|
1777
|
+
*
|
|
1778
|
+
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
|
|
1779
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
1725
1780
|
*/
|
|
1726
|
-
data:
|
|
1781
|
+
data: SharedV4FileDataData | SharedV4FileDataUrl;
|
|
1727
1782
|
/**
|
|
1728
1783
|
* IANA media type of the file.
|
|
1729
1784
|
*
|
|
@@ -1764,14 +1819,23 @@ interface LanguageModelV4FilePart {
|
|
|
1764
1819
|
*/
|
|
1765
1820
|
filename?: string;
|
|
1766
1821
|
/**
|
|
1767
|
-
* File data
|
|
1768
|
-
*
|
|
1822
|
+
* File data as a tagged discriminated union:
|
|
1823
|
+
*
|
|
1824
|
+
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
|
|
1825
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
1826
|
+
* - `{ type: 'reference', reference }`: a provider reference (`{ [provider]: id }`).
|
|
1827
|
+
* - `{ type: 'text', text }`: inline text content (e.g. an inline text document).
|
|
1769
1828
|
*/
|
|
1770
|
-
data:
|
|
1829
|
+
data: SharedV4FileData;
|
|
1771
1830
|
/**
|
|
1772
|
-
* IANA media type
|
|
1831
|
+
* Either a full IANA media type (`type/subtype`, e.g. `image/png`) or just
|
|
1832
|
+
* the top-level IANA segment (e.g. `image`, `audio`, `video`, `text`).
|
|
1773
1833
|
*
|
|
1774
|
-
*
|
|
1834
|
+
* `*`-subtype wildcards (e.g. `image/*`) are normalized as equivalent to the
|
|
1835
|
+
* top-level segment alone (e.g. `image`). Providers can use the helpers in
|
|
1836
|
+
* `@ai-sdk/provider-utils` (`isFullMediaType`, `getTopLevelMediaType`,
|
|
1837
|
+
* `detectMediaType`) to resolve the field according to their API
|
|
1838
|
+
* requirements.
|
|
1775
1839
|
*
|
|
1776
1840
|
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1777
1841
|
*/
|
|
@@ -1921,13 +1985,26 @@ type LanguageModelV4ToolResultOutput = {
|
|
|
1921
1985
|
*/
|
|
1922
1986
|
providerOptions?: SharedV4ProviderOptions;
|
|
1923
1987
|
} | {
|
|
1924
|
-
type: 'file
|
|
1988
|
+
type: 'file';
|
|
1925
1989
|
/**
|
|
1926
|
-
*
|
|
1990
|
+
* File data as a tagged discriminated union:
|
|
1991
|
+
*
|
|
1992
|
+
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
|
|
1993
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
1994
|
+
* - `{ type: 'reference', reference }`: a provider reference (`{ [provider]: id }`).
|
|
1995
|
+
* - `{ type: 'text', text }`: inline text content (e.g. an inline text document).
|
|
1927
1996
|
*/
|
|
1928
|
-
data:
|
|
1997
|
+
data: SharedV4FileData;
|
|
1929
1998
|
/**
|
|
1930
|
-
* IANA media type.
|
|
1999
|
+
* Either a full IANA media type (`type/subtype`, e.g. `image/png`) or just
|
|
2000
|
+
* the top-level IANA segment (e.g. `image`, `audio`, `video`, `text`).
|
|
2001
|
+
*
|
|
2002
|
+
* `*`-subtype wildcards (e.g. `image/*`) are normalized as equivalent to the
|
|
2003
|
+
* top-level segment alone (e.g. `image`). Providers can use the helpers in
|
|
2004
|
+
* `@ai-sdk/provider-utils` (`isFullMediaType`, `getTopLevelMediaType`,
|
|
2005
|
+
* `detectMediaType`) to resolve the field according to their API
|
|
2006
|
+
* requirements.
|
|
2007
|
+
*
|
|
1931
2008
|
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1932
2009
|
*/
|
|
1933
2010
|
mediaType: string;
|
|
@@ -1940,77 +2017,11 @@ type LanguageModelV4ToolResultOutput = {
|
|
|
1940
2017
|
*/
|
|
1941
2018
|
providerOptions?: SharedV4ProviderOptions;
|
|
1942
2019
|
} | {
|
|
1943
|
-
type: 'file-url';
|
|
1944
|
-
/**
|
|
1945
|
-
* URL of the file.
|
|
1946
|
-
*/
|
|
1947
|
-
url: string;
|
|
1948
|
-
/**
|
|
1949
|
-
* Provider-specific options.
|
|
1950
|
-
*/
|
|
1951
|
-
providerOptions?: SharedV4ProviderOptions;
|
|
1952
|
-
} | {
|
|
1953
|
-
type: 'file-reference';
|
|
1954
2020
|
/**
|
|
1955
|
-
*
|
|
1956
|
-
*
|
|
2021
|
+
* Custom content part. This can be used to implement
|
|
2022
|
+
* provider-specific content parts.
|
|
1957
2023
|
*/
|
|
1958
|
-
|
|
1959
|
-
/**
|
|
1960
|
-
* Provider-specific options.
|
|
1961
|
-
*/
|
|
1962
|
-
providerOptions?: SharedV4ProviderOptions;
|
|
1963
|
-
} | {
|
|
1964
|
-
/**
|
|
1965
|
-
* Images that are referenced using base64 encoded data.
|
|
1966
|
-
*/
|
|
1967
|
-
type: 'image-data';
|
|
1968
|
-
/**
|
|
1969
|
-
* Base-64 encoded image data.
|
|
1970
|
-
*/
|
|
1971
|
-
data: string;
|
|
1972
|
-
/**
|
|
1973
|
-
* IANA media type.
|
|
1974
|
-
* @see https://www.iana.org/assignments/media-types/media-types.xhtml
|
|
1975
|
-
*/
|
|
1976
|
-
mediaType: string;
|
|
1977
|
-
/**
|
|
1978
|
-
* Provider-specific options.
|
|
1979
|
-
*/
|
|
1980
|
-
providerOptions?: SharedV4ProviderOptions;
|
|
1981
|
-
} | {
|
|
1982
|
-
/**
|
|
1983
|
-
* Images that are referenced using a URL.
|
|
1984
|
-
*/
|
|
1985
|
-
type: 'image-url';
|
|
1986
|
-
/**
|
|
1987
|
-
* URL of the image.
|
|
1988
|
-
*/
|
|
1989
|
-
url: string;
|
|
1990
|
-
/**
|
|
1991
|
-
* Provider-specific options.
|
|
1992
|
-
*/
|
|
1993
|
-
providerOptions?: SharedV4ProviderOptions;
|
|
1994
|
-
} | {
|
|
1995
|
-
/**
|
|
1996
|
-
* Images that are referenced using a provider reference.
|
|
1997
|
-
*/
|
|
1998
|
-
type: 'image-file-reference';
|
|
1999
|
-
/**
|
|
2000
|
-
* Provider-specific references for the image file.
|
|
2001
|
-
* The key is the provider name, e.g. 'openai' or 'anthropic'.
|
|
2002
|
-
*/
|
|
2003
|
-
providerReference: SharedV4ProviderReference;
|
|
2004
|
-
/**
|
|
2005
|
-
* Provider-specific options.
|
|
2006
|
-
*/
|
|
2007
|
-
providerOptions?: SharedV4ProviderOptions;
|
|
2008
|
-
} | {
|
|
2009
|
-
/**
|
|
2010
|
-
* Custom content part. This can be used to implement
|
|
2011
|
-
* provider-specific content parts.
|
|
2012
|
-
*/
|
|
2013
|
-
type: 'custom';
|
|
2024
|
+
type: 'custom';
|
|
2014
2025
|
/**
|
|
2015
2026
|
* Provider-specific options.
|
|
2016
2027
|
*/
|
|
@@ -2193,14 +2204,17 @@ type LanguageModelV4File = {
|
|
|
2193
2204
|
*/
|
|
2194
2205
|
mediaType: string;
|
|
2195
2206
|
/**
|
|
2196
|
-
* Generated file data as
|
|
2207
|
+
* Generated file data as a tagged discriminated union:
|
|
2208
|
+
*
|
|
2209
|
+
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
|
|
2210
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
2197
2211
|
*
|
|
2198
2212
|
* The file data should be returned without any unnecessary conversion.
|
|
2199
2213
|
* If the API returns base64 encoded strings, the file data should be returned
|
|
2200
2214
|
* as base64 encoded strings. If the API returns binary data, the file data should
|
|
2201
2215
|
* be returned as binary data.
|
|
2202
2216
|
*/
|
|
2203
|
-
data:
|
|
2217
|
+
data: SharedV4FileDataData | SharedV4FileDataUrl;
|
|
2204
2218
|
/**
|
|
2205
2219
|
* Optional provider-specific metadata for the file part.
|
|
2206
2220
|
*/
|
|
@@ -2233,14 +2247,17 @@ type LanguageModelV4ReasoningFile = {
|
|
|
2233
2247
|
*/
|
|
2234
2248
|
mediaType: string;
|
|
2235
2249
|
/**
|
|
2236
|
-
* Generated file data as
|
|
2250
|
+
* Generated file data as a tagged discriminated union:
|
|
2251
|
+
*
|
|
2252
|
+
* - `{ type: 'data', data }`: raw bytes (Uint8Array) or base64-encoded string.
|
|
2253
|
+
* - `{ type: 'url', url }`: a URL that points to the file.
|
|
2237
2254
|
*
|
|
2238
2255
|
* The file data should be returned without any unnecessary conversion.
|
|
2239
2256
|
* If the API returns base64 encoded strings, the file data should be returned
|
|
2240
2257
|
* as base64 encoded strings. If the API returns binary data, the file data should
|
|
2241
2258
|
* be returned as binary data.
|
|
2242
2259
|
*/
|
|
2243
|
-
data:
|
|
2260
|
+
data: SharedV4FileDataData | SharedV4FileDataUrl;
|
|
2244
2261
|
/**
|
|
2245
2262
|
* Optional provider-specific metadata for the reasoning file part.
|
|
2246
2263
|
*/
|
|
@@ -4860,6 +4877,61 @@ type RerankingModelV4CallOptions = {
|
|
|
4860
4877
|
headers?: SharedV4Headers;
|
|
4861
4878
|
};
|
|
4862
4879
|
|
|
4880
|
+
/**
|
|
4881
|
+
* The result of a reranking model doRerank call.
|
|
4882
|
+
*/
|
|
4883
|
+
type RerankingModelV4Result = {
|
|
4884
|
+
/**
|
|
4885
|
+
* Ordered list of reranked documents (via index before reranking).
|
|
4886
|
+
* The documents are sorted by the descending order of relevance scores.
|
|
4887
|
+
*/
|
|
4888
|
+
ranking: Array<{
|
|
4889
|
+
/**
|
|
4890
|
+
* The index of the document in the original list of documents before reranking.
|
|
4891
|
+
*/
|
|
4892
|
+
index: number;
|
|
4893
|
+
/**
|
|
4894
|
+
* The relevance score of the document after reranking.
|
|
4895
|
+
*/
|
|
4896
|
+
relevanceScore: number;
|
|
4897
|
+
}>;
|
|
4898
|
+
/**
|
|
4899
|
+
* Additional provider-specific metadata. They are passed through
|
|
4900
|
+
* to the provider from the AI SDK and enable provider-specific
|
|
4901
|
+
* functionality that can be fully encapsulated in the provider.
|
|
4902
|
+
*/
|
|
4903
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
4904
|
+
/**
|
|
4905
|
+
* Warnings for the call, e.g. unsupported settings.
|
|
4906
|
+
*/
|
|
4907
|
+
warnings?: Array<SharedV4Warning>;
|
|
4908
|
+
/**
|
|
4909
|
+
* Optional response information for debugging purposes.
|
|
4910
|
+
*/
|
|
4911
|
+
response?: {
|
|
4912
|
+
/**
|
|
4913
|
+
* ID for the generated response, if the provider sends one.
|
|
4914
|
+
*/
|
|
4915
|
+
id?: string;
|
|
4916
|
+
/**
|
|
4917
|
+
* Timestamp for the start of the generated response, if the provider sends one.
|
|
4918
|
+
*/
|
|
4919
|
+
timestamp?: Date;
|
|
4920
|
+
/**
|
|
4921
|
+
* The ID of the response model that was used to generate the response, if the provider sends one.
|
|
4922
|
+
*/
|
|
4923
|
+
modelId?: string;
|
|
4924
|
+
/**
|
|
4925
|
+
* Response headers.
|
|
4926
|
+
*/
|
|
4927
|
+
headers?: SharedV4Headers;
|
|
4928
|
+
/**
|
|
4929
|
+
* Response body.
|
|
4930
|
+
*/
|
|
4931
|
+
body?: unknown;
|
|
4932
|
+
};
|
|
4933
|
+
};
|
|
4934
|
+
|
|
4863
4935
|
/**
|
|
4864
4936
|
* Specification for a reranking model that implements the reranking model interface version 3.
|
|
4865
4937
|
*/
|
|
@@ -4879,57 +4951,7 @@ type RerankingModelV4 = {
|
|
|
4879
4951
|
/**
|
|
4880
4952
|
* Reranking a list of documents using the query.
|
|
4881
4953
|
*/
|
|
4882
|
-
doRerank(options: RerankingModelV4CallOptions): PromiseLike<
|
|
4883
|
-
/**
|
|
4884
|
-
* Ordered list of reranked documents (via index before reranking).
|
|
4885
|
-
* The documents are sorted by the descending order of relevance scores.
|
|
4886
|
-
*/
|
|
4887
|
-
ranking: Array<{
|
|
4888
|
-
/**
|
|
4889
|
-
* The index of the document in the original list of documents before reranking.
|
|
4890
|
-
*/
|
|
4891
|
-
index: number;
|
|
4892
|
-
/**
|
|
4893
|
-
* The relevance score of the document after reranking.
|
|
4894
|
-
*/
|
|
4895
|
-
relevanceScore: number;
|
|
4896
|
-
}>;
|
|
4897
|
-
/**
|
|
4898
|
-
* Additional provider-specific metadata. They are passed through
|
|
4899
|
-
* to the provider from the AI SDK and enable provider-specific
|
|
4900
|
-
* functionality that can be fully encapsulated in the provider.
|
|
4901
|
-
*/
|
|
4902
|
-
providerMetadata?: SharedV4ProviderMetadata;
|
|
4903
|
-
/**
|
|
4904
|
-
* Warnings for the call, e.g. unsupported settings.
|
|
4905
|
-
*/
|
|
4906
|
-
warnings?: Array<SharedV4Warning>;
|
|
4907
|
-
/**
|
|
4908
|
-
* Optional response information for debugging purposes.
|
|
4909
|
-
*/
|
|
4910
|
-
response?: {
|
|
4911
|
-
/**
|
|
4912
|
-
* ID for the generated response, if the provider sends one.
|
|
4913
|
-
*/
|
|
4914
|
-
id?: string;
|
|
4915
|
-
/**
|
|
4916
|
-
* Timestamp for the start of the generated response, if the provider sends one.
|
|
4917
|
-
*/
|
|
4918
|
-
timestamp?: Date;
|
|
4919
|
-
/**
|
|
4920
|
-
* The ID of the response model that was used to generate the response, if the provider sends one.
|
|
4921
|
-
*/
|
|
4922
|
-
modelId?: string;
|
|
4923
|
-
/**
|
|
4924
|
-
* Response headers.
|
|
4925
|
-
*/
|
|
4926
|
-
headers?: SharedV4Headers;
|
|
4927
|
-
/**
|
|
4928
|
-
* Response body.
|
|
4929
|
-
*/
|
|
4930
|
-
body?: unknown;
|
|
4931
|
-
};
|
|
4932
|
-
}>;
|
|
4954
|
+
doRerank(options: RerankingModelV4CallOptions): PromiseLike<RerankingModelV4Result>;
|
|
4933
4955
|
};
|
|
4934
4956
|
|
|
4935
4957
|
type SpeechModelV4ProviderOptions = Record<string, JSONObject>;
|
|
@@ -4984,6 +5006,60 @@ type SpeechModelV4CallOptions = {
|
|
|
4984
5006
|
headers?: Record<string, string | undefined>;
|
|
4985
5007
|
};
|
|
4986
5008
|
|
|
5009
|
+
/**
|
|
5010
|
+
* The result of a speech model doGenerate call.
|
|
5011
|
+
*/
|
|
5012
|
+
type SpeechModelV4Result = {
|
|
5013
|
+
/**
|
|
5014
|
+
* Generated audio as an ArrayBuffer.
|
|
5015
|
+
* The audio should be returned without any unnecessary conversion.
|
|
5016
|
+
* If the API returns base64 encoded strings, the audio should be returned
|
|
5017
|
+
* as base64 encoded strings. If the API returns binary data, the audio
|
|
5018
|
+
* should be returned as binary data.
|
|
5019
|
+
*/
|
|
5020
|
+
audio: string | Uint8Array;
|
|
5021
|
+
/**
|
|
5022
|
+
* Warnings for the call, e.g. unsupported settings.
|
|
5023
|
+
*/
|
|
5024
|
+
warnings: Array<SharedV4Warning>;
|
|
5025
|
+
/**
|
|
5026
|
+
* Optional request information for telemetry and debugging purposes.
|
|
5027
|
+
*/
|
|
5028
|
+
request?: {
|
|
5029
|
+
/**
|
|
5030
|
+
* Response body (available only for providers that use HTTP requests).
|
|
5031
|
+
*/
|
|
5032
|
+
body?: unknown;
|
|
5033
|
+
};
|
|
5034
|
+
/**
|
|
5035
|
+
* Response information for telemetry and debugging purposes.
|
|
5036
|
+
*/
|
|
5037
|
+
response: {
|
|
5038
|
+
/**
|
|
5039
|
+
* Timestamp for the start of the generated response.
|
|
5040
|
+
*/
|
|
5041
|
+
timestamp: Date;
|
|
5042
|
+
/**
|
|
5043
|
+
* The ID of the response model that was used to generate the response.
|
|
5044
|
+
*/
|
|
5045
|
+
modelId: string;
|
|
5046
|
+
/**
|
|
5047
|
+
* Response headers.
|
|
5048
|
+
*/
|
|
5049
|
+
headers?: SharedV2Headers;
|
|
5050
|
+
/**
|
|
5051
|
+
* Response body.
|
|
5052
|
+
*/
|
|
5053
|
+
body?: unknown;
|
|
5054
|
+
};
|
|
5055
|
+
/**
|
|
5056
|
+
* Additional provider-specific metadata. They are passed through
|
|
5057
|
+
* from the provider to the AI SDK and enable provider-specific
|
|
5058
|
+
* results that can be fully encapsulated in the provider.
|
|
5059
|
+
*/
|
|
5060
|
+
providerMetadata?: Record<string, JSONObject>;
|
|
5061
|
+
};
|
|
5062
|
+
|
|
4987
5063
|
/**
|
|
4988
5064
|
* Speech model specification version 3.
|
|
4989
5065
|
*/
|
|
@@ -5007,56 +5083,7 @@ type SpeechModelV4 = {
|
|
|
5007
5083
|
/**
|
|
5008
5084
|
* Generates speech audio from text.
|
|
5009
5085
|
*/
|
|
5010
|
-
doGenerate(options: SpeechModelV4CallOptions): PromiseLike<
|
|
5011
|
-
/**
|
|
5012
|
-
* Generated audio as an ArrayBuffer.
|
|
5013
|
-
* The audio should be returned without any unnecessary conversion.
|
|
5014
|
-
* If the API returns base64 encoded strings, the audio should be returned
|
|
5015
|
-
* as base64 encoded strings. If the API returns binary data, the audio
|
|
5016
|
-
* should be returned as binary data.
|
|
5017
|
-
*/
|
|
5018
|
-
audio: string | Uint8Array;
|
|
5019
|
-
/**
|
|
5020
|
-
* Warnings for the call, e.g. unsupported settings.
|
|
5021
|
-
*/
|
|
5022
|
-
warnings: Array<SharedV4Warning>;
|
|
5023
|
-
/**
|
|
5024
|
-
* Optional request information for telemetry and debugging purposes.
|
|
5025
|
-
*/
|
|
5026
|
-
request?: {
|
|
5027
|
-
/**
|
|
5028
|
-
* Response body (available only for providers that use HTTP requests).
|
|
5029
|
-
*/
|
|
5030
|
-
body?: unknown;
|
|
5031
|
-
};
|
|
5032
|
-
/**
|
|
5033
|
-
* Response information for telemetry and debugging purposes.
|
|
5034
|
-
*/
|
|
5035
|
-
response: {
|
|
5036
|
-
/**
|
|
5037
|
-
* Timestamp for the start of the generated response.
|
|
5038
|
-
*/
|
|
5039
|
-
timestamp: Date;
|
|
5040
|
-
/**
|
|
5041
|
-
* The ID of the response model that was used to generate the response.
|
|
5042
|
-
*/
|
|
5043
|
-
modelId: string;
|
|
5044
|
-
/**
|
|
5045
|
-
* Response headers.
|
|
5046
|
-
*/
|
|
5047
|
-
headers?: SharedV2Headers;
|
|
5048
|
-
/**
|
|
5049
|
-
* Response body.
|
|
5050
|
-
*/
|
|
5051
|
-
body?: unknown;
|
|
5052
|
-
};
|
|
5053
|
-
/**
|
|
5054
|
-
* Additional provider-specific metadata. They are passed through
|
|
5055
|
-
* from the provider to the AI SDK and enable provider-specific
|
|
5056
|
-
* results that can be fully encapsulated in the provider.
|
|
5057
|
-
*/
|
|
5058
|
-
providerMetadata?: Record<string, JSONObject>;
|
|
5059
|
-
}>;
|
|
5086
|
+
doGenerate(options: SpeechModelV4CallOptions): PromiseLike<SpeechModelV4Result>;
|
|
5060
5087
|
};
|
|
5061
5088
|
|
|
5062
5089
|
type TranscriptionModelV4ProviderOptions = Record<string, JSONObject>;
|
|
@@ -5099,103 +5126,108 @@ type TranscriptionModelV4CallOptions = {
|
|
|
5099
5126
|
};
|
|
5100
5127
|
|
|
5101
5128
|
/**
|
|
5102
|
-
*
|
|
5129
|
+
* The result of a transcription model doGenerate call.
|
|
5103
5130
|
*/
|
|
5104
|
-
type
|
|
5105
|
-
/**
|
|
5106
|
-
* The transcription model must specify which transcription model interface
|
|
5107
|
-
* version it implements. This will allow us to evolve the transcription
|
|
5108
|
-
* model interface and retain backwards compatibility. The different
|
|
5109
|
-
* implementation versions can be handled as a discriminated union
|
|
5110
|
-
* on our side.
|
|
5111
|
-
*/
|
|
5112
|
-
readonly specificationVersion: 'v4';
|
|
5113
|
-
/**
|
|
5114
|
-
* Name of the provider for logging purposes.
|
|
5115
|
-
*/
|
|
5116
|
-
readonly provider: string;
|
|
5131
|
+
type TranscriptionModelV4Result = {
|
|
5117
5132
|
/**
|
|
5118
|
-
*
|
|
5133
|
+
* The complete transcribed text from the audio.
|
|
5119
5134
|
*/
|
|
5120
|
-
|
|
5135
|
+
text: string;
|
|
5121
5136
|
/**
|
|
5122
|
-
*
|
|
5137
|
+
* Array of transcript segments with timing information.
|
|
5138
|
+
* Each segment represents a portion of the transcribed text with start and end times.
|
|
5123
5139
|
*/
|
|
5124
|
-
|
|
5140
|
+
segments: Array<{
|
|
5125
5141
|
/**
|
|
5126
|
-
* The
|
|
5142
|
+
* The text content of this segment.
|
|
5127
5143
|
*/
|
|
5128
5144
|
text: string;
|
|
5129
5145
|
/**
|
|
5130
|
-
*
|
|
5131
|
-
* Each segment represents a portion of the transcribed text with start and end times.
|
|
5146
|
+
* The start time of this segment in seconds.
|
|
5132
5147
|
*/
|
|
5133
|
-
|
|
5134
|
-
/**
|
|
5135
|
-
* The text content of this segment.
|
|
5136
|
-
*/
|
|
5137
|
-
text: string;
|
|
5138
|
-
/**
|
|
5139
|
-
* The start time of this segment in seconds.
|
|
5140
|
-
*/
|
|
5141
|
-
startSecond: number;
|
|
5142
|
-
/**
|
|
5143
|
-
* The end time of this segment in seconds.
|
|
5144
|
-
*/
|
|
5145
|
-
endSecond: number;
|
|
5146
|
-
}>;
|
|
5148
|
+
startSecond: number;
|
|
5147
5149
|
/**
|
|
5148
|
-
* The
|
|
5149
|
-
* May be undefined if the language couldn't be detected.
|
|
5150
|
+
* The end time of this segment in seconds.
|
|
5150
5151
|
*/
|
|
5151
|
-
|
|
5152
|
+
endSecond: number;
|
|
5153
|
+
}>;
|
|
5154
|
+
/**
|
|
5155
|
+
* The detected language of the audio content, as an ISO-639-1 code (e.g., 'en' for English).
|
|
5156
|
+
* May be undefined if the language couldn't be detected.
|
|
5157
|
+
*/
|
|
5158
|
+
language: string | undefined;
|
|
5159
|
+
/**
|
|
5160
|
+
* The total duration of the audio file in seconds.
|
|
5161
|
+
* May be undefined if the duration couldn't be determined.
|
|
5162
|
+
*/
|
|
5163
|
+
durationInSeconds: number | undefined;
|
|
5164
|
+
/**
|
|
5165
|
+
* Warnings for the call, e.g. unsupported settings.
|
|
5166
|
+
*/
|
|
5167
|
+
warnings: Array<SharedV4Warning>;
|
|
5168
|
+
/**
|
|
5169
|
+
* Optional request information for telemetry and debugging purposes.
|
|
5170
|
+
*/
|
|
5171
|
+
request?: {
|
|
5152
5172
|
/**
|
|
5153
|
-
*
|
|
5154
|
-
*
|
|
5173
|
+
* Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
|
|
5174
|
+
* Non-HTTP(s) providers should not set this.
|
|
5155
5175
|
*/
|
|
5156
|
-
|
|
5176
|
+
body?: string;
|
|
5177
|
+
};
|
|
5178
|
+
/**
|
|
5179
|
+
* Response information for telemetry and debugging purposes.
|
|
5180
|
+
*/
|
|
5181
|
+
response: {
|
|
5157
5182
|
/**
|
|
5158
|
-
*
|
|
5183
|
+
* Timestamp for the start of the generated response.
|
|
5159
5184
|
*/
|
|
5160
|
-
|
|
5185
|
+
timestamp: Date;
|
|
5161
5186
|
/**
|
|
5162
|
-
*
|
|
5187
|
+
* The ID of the response model that was used to generate the response.
|
|
5163
5188
|
*/
|
|
5164
|
-
|
|
5165
|
-
/**
|
|
5166
|
-
* Raw request HTTP body that was sent to the provider API as a string (JSON should be stringified).
|
|
5167
|
-
* Non-HTTP(s) providers should not set this.
|
|
5168
|
-
*/
|
|
5169
|
-
body?: string;
|
|
5170
|
-
};
|
|
5189
|
+
modelId: string;
|
|
5171
5190
|
/**
|
|
5172
|
-
* Response
|
|
5191
|
+
* Response headers.
|
|
5173
5192
|
*/
|
|
5174
|
-
|
|
5175
|
-
/**
|
|
5176
|
-
* Timestamp for the start of the generated response.
|
|
5177
|
-
*/
|
|
5178
|
-
timestamp: Date;
|
|
5179
|
-
/**
|
|
5180
|
-
* The ID of the response model that was used to generate the response.
|
|
5181
|
-
*/
|
|
5182
|
-
modelId: string;
|
|
5183
|
-
/**
|
|
5184
|
-
* Response headers.
|
|
5185
|
-
*/
|
|
5186
|
-
headers?: SharedV4Headers;
|
|
5187
|
-
/**
|
|
5188
|
-
* Response body.
|
|
5189
|
-
*/
|
|
5190
|
-
body?: unknown;
|
|
5191
|
-
};
|
|
5193
|
+
headers?: SharedV4Headers;
|
|
5192
5194
|
/**
|
|
5193
|
-
*
|
|
5194
|
-
* from the provider to the AI SDK and enable provider-specific
|
|
5195
|
-
* results that can be fully encapsulated in the provider.
|
|
5195
|
+
* Response body.
|
|
5196
5196
|
*/
|
|
5197
|
-
|
|
5198
|
-
}
|
|
5197
|
+
body?: unknown;
|
|
5198
|
+
};
|
|
5199
|
+
/**
|
|
5200
|
+
* Additional provider-specific metadata. They are passed through
|
|
5201
|
+
* from the provider to the AI SDK and enable provider-specific
|
|
5202
|
+
* results that can be fully encapsulated in the provider.
|
|
5203
|
+
*/
|
|
5204
|
+
providerMetadata?: Record<string, JSONObject>;
|
|
5205
|
+
};
|
|
5206
|
+
|
|
5207
|
+
/**
|
|
5208
|
+
* Transcription model specification version 3.
|
|
5209
|
+
*/
|
|
5210
|
+
type TranscriptionModelV4 = {
|
|
5211
|
+
/**
|
|
5212
|
+
* The transcription model must specify which transcription model interface
|
|
5213
|
+
* version it implements. This will allow us to evolve the transcription
|
|
5214
|
+
* model interface and retain backwards compatibility. The different
|
|
5215
|
+
* implementation versions can be handled as a discriminated union
|
|
5216
|
+
* on our side.
|
|
5217
|
+
*/
|
|
5218
|
+
readonly specificationVersion: 'v4';
|
|
5219
|
+
/**
|
|
5220
|
+
* Name of the provider for logging purposes.
|
|
5221
|
+
*/
|
|
5222
|
+
readonly provider: string;
|
|
5223
|
+
/**
|
|
5224
|
+
* Provider-specific model ID for logging purposes.
|
|
5225
|
+
*/
|
|
5226
|
+
readonly modelId: string;
|
|
5227
|
+
/**
|
|
5228
|
+
* Generates a transcript.
|
|
5229
|
+
*/
|
|
5230
|
+
doGenerate(options: TranscriptionModelV4CallOptions): PromiseLike<TranscriptionModelV4Result>;
|
|
5199
5231
|
};
|
|
5200
5232
|
|
|
5201
5233
|
interface SkillsV4File {
|
|
@@ -5204,11 +5236,14 @@ interface SkillsV4File {
|
|
|
5204
5236
|
*/
|
|
5205
5237
|
path: string;
|
|
5206
5238
|
/**
|
|
5207
|
-
* The
|
|
5239
|
+
* The file data.
|
|
5240
|
+
*
|
|
5241
|
+
* - `{ type: 'data', data }`: raw bytes (`Uint8Array`) or a base64-encoded string.
|
|
5242
|
+
* - `{ type: 'text', text }`: inline text (UTF-8).
|
|
5208
5243
|
*/
|
|
5209
|
-
|
|
5244
|
+
data: SharedV4FileDataData | SharedV4FileDataText;
|
|
5210
5245
|
}
|
|
5211
|
-
interface
|
|
5246
|
+
interface SkillsV4UploadSkillCallOptions {
|
|
5212
5247
|
/**
|
|
5213
5248
|
* The files that make up the skill.
|
|
5214
5249
|
*/
|
|
@@ -5222,7 +5257,8 @@ interface SkillsV4UploadParams {
|
|
|
5222
5257
|
*/
|
|
5223
5258
|
providerOptions?: SharedV4ProviderOptions;
|
|
5224
5259
|
}
|
|
5225
|
-
|
|
5260
|
+
|
|
5261
|
+
interface SkillsV4UploadSkillResult {
|
|
5226
5262
|
/**
|
|
5227
5263
|
* A provider reference mapping provider names to provider-specific skill identifiers.
|
|
5228
5264
|
*/
|
|
@@ -5252,6 +5288,7 @@ interface SkillsV4UploadResult {
|
|
|
5252
5288
|
*/
|
|
5253
5289
|
warnings: SharedV4Warning[];
|
|
5254
5290
|
}
|
|
5291
|
+
|
|
5255
5292
|
/**
|
|
5256
5293
|
* Skills specification version 4.
|
|
5257
5294
|
*/
|
|
@@ -5271,7 +5308,7 @@ interface SkillsV4 {
|
|
|
5271
5308
|
/**
|
|
5272
5309
|
* Uploads a new skill from the given files.
|
|
5273
5310
|
*/
|
|
5274
|
-
uploadSkill(params:
|
|
5311
|
+
uploadSkill(params: SkillsV4UploadSkillCallOptions): PromiseLike<SkillsV4UploadSkillResult>;
|
|
5275
5312
|
}
|
|
5276
5313
|
|
|
5277
5314
|
/**
|
|
@@ -6256,9 +6293,6 @@ type VideoModelV4CallOptions = {
|
|
|
6256
6293
|
headers?: Record<string, string | undefined>;
|
|
6257
6294
|
};
|
|
6258
6295
|
|
|
6259
|
-
type GetMaxVideosPerCallFunction$1 = (options: {
|
|
6260
|
-
modelId: string;
|
|
6261
|
-
}) => PromiseLike<number | undefined> | number | undefined;
|
|
6262
6296
|
/**
|
|
6263
6297
|
* Generated video data. Can be a URL, base64-encoded string, or binary data.
|
|
6264
6298
|
*/
|
|
@@ -6284,6 +6318,65 @@ type VideoModelV4VideoData = {
|
|
|
6284
6318
|
data: Uint8Array;
|
|
6285
6319
|
mediaType: string;
|
|
6286
6320
|
};
|
|
6321
|
+
/**
|
|
6322
|
+
* The result of a video model doGenerate call.
|
|
6323
|
+
*/
|
|
6324
|
+
type VideoModelV4Result = {
|
|
6325
|
+
/**
|
|
6326
|
+
* Generated videos as URLs, base64 strings, or binary data.
|
|
6327
|
+
*
|
|
6328
|
+
* Most providers return URLs to video files (MP4, WebM) due to large file sizes.
|
|
6329
|
+
* Use the discriminated union to indicate the type of video data being returned.
|
|
6330
|
+
*/
|
|
6331
|
+
videos: Array<VideoModelV4VideoData>;
|
|
6332
|
+
/**
|
|
6333
|
+
* Warnings for the call, e.g. unsupported features.
|
|
6334
|
+
*/
|
|
6335
|
+
warnings: Array<SharedV4Warning>;
|
|
6336
|
+
/**
|
|
6337
|
+
* Additional provider-specific metadata. They are passed through
|
|
6338
|
+
* from the provider to the AI SDK and enable provider-specific
|
|
6339
|
+
* results that can be fully encapsulated in the provider.
|
|
6340
|
+
*
|
|
6341
|
+
* The outer record is keyed by the provider name, and the inner
|
|
6342
|
+
* record is provider-specific metadata.
|
|
6343
|
+
*
|
|
6344
|
+
* ```ts
|
|
6345
|
+
* {
|
|
6346
|
+
* "fal": {
|
|
6347
|
+
* "videos": [{
|
|
6348
|
+
* "duration": 5.0,
|
|
6349
|
+
* "fps": 24,
|
|
6350
|
+
* "width": 1280,
|
|
6351
|
+
* "height": 720
|
|
6352
|
+
* }]
|
|
6353
|
+
* }
|
|
6354
|
+
* }
|
|
6355
|
+
* ```
|
|
6356
|
+
*/
|
|
6357
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
6358
|
+
/**
|
|
6359
|
+
* Response information for telemetry and debugging purposes.
|
|
6360
|
+
*/
|
|
6361
|
+
response: {
|
|
6362
|
+
/**
|
|
6363
|
+
* Timestamp for the start of the generated response.
|
|
6364
|
+
*/
|
|
6365
|
+
timestamp: Date;
|
|
6366
|
+
/**
|
|
6367
|
+
* The ID of the response model that was used to generate the response.
|
|
6368
|
+
*/
|
|
6369
|
+
modelId: string;
|
|
6370
|
+
/**
|
|
6371
|
+
* Response headers.
|
|
6372
|
+
*/
|
|
6373
|
+
headers: Record<string, string> | undefined;
|
|
6374
|
+
};
|
|
6375
|
+
};
|
|
6376
|
+
|
|
6377
|
+
type GetMaxVideosPerCallFunction$1 = (options: {
|
|
6378
|
+
modelId: string;
|
|
6379
|
+
}) => PromiseLike<number | undefined> | number | undefined;
|
|
6287
6380
|
/**
|
|
6288
6381
|
* Video generation model specification version 3.
|
|
6289
6382
|
*/
|
|
@@ -6317,58 +6410,7 @@ type VideoModelV4 = {
|
|
|
6317
6410
|
/**
|
|
6318
6411
|
* Generates an array of videos.
|
|
6319
6412
|
*/
|
|
6320
|
-
doGenerate(options: VideoModelV4CallOptions): PromiseLike<
|
|
6321
|
-
/**
|
|
6322
|
-
* Generated videos as URLs, base64 strings, or binary data.
|
|
6323
|
-
*
|
|
6324
|
-
* Most providers return URLs to video files (MP4, WebM) due to large file sizes.
|
|
6325
|
-
* Use the discriminated union to indicate the type of video data being returned.
|
|
6326
|
-
*/
|
|
6327
|
-
videos: Array<VideoModelV4VideoData>;
|
|
6328
|
-
/**
|
|
6329
|
-
* Warnings for the call, e.g. unsupported features.
|
|
6330
|
-
*/
|
|
6331
|
-
warnings: Array<SharedV4Warning>;
|
|
6332
|
-
/**
|
|
6333
|
-
* Additional provider-specific metadata. They are passed through
|
|
6334
|
-
* from the provider to the AI SDK and enable provider-specific
|
|
6335
|
-
* results that can be fully encapsulated in the provider.
|
|
6336
|
-
*
|
|
6337
|
-
* The outer record is keyed by the provider name, and the inner
|
|
6338
|
-
* record is provider-specific metadata.
|
|
6339
|
-
*
|
|
6340
|
-
* ```ts
|
|
6341
|
-
* {
|
|
6342
|
-
* "fal": {
|
|
6343
|
-
* "videos": [{
|
|
6344
|
-
* "duration": 5.0,
|
|
6345
|
-
* "fps": 24,
|
|
6346
|
-
* "width": 1280,
|
|
6347
|
-
* "height": 720
|
|
6348
|
-
* }]
|
|
6349
|
-
* }
|
|
6350
|
-
* }
|
|
6351
|
-
* ```
|
|
6352
|
-
*/
|
|
6353
|
-
providerMetadata?: SharedV4ProviderMetadata;
|
|
6354
|
-
/**
|
|
6355
|
-
* Response information for telemetry and debugging purposes.
|
|
6356
|
-
*/
|
|
6357
|
-
response: {
|
|
6358
|
-
/**
|
|
6359
|
-
* Timestamp for the start of the generated response.
|
|
6360
|
-
*/
|
|
6361
|
-
timestamp: Date;
|
|
6362
|
-
/**
|
|
6363
|
-
* The ID of the response model that was used to generate the response.
|
|
6364
|
-
*/
|
|
6365
|
-
modelId: string;
|
|
6366
|
-
/**
|
|
6367
|
-
* Response headers.
|
|
6368
|
-
*/
|
|
6369
|
-
headers: Record<string, string> | undefined;
|
|
6370
|
-
};
|
|
6371
|
-
}>;
|
|
6413
|
+
doGenerate(options: VideoModelV4CallOptions): PromiseLike<VideoModelV4Result>;
|
|
6372
6414
|
};
|
|
6373
6415
|
|
|
6374
6416
|
/**
|
|
@@ -6587,4 +6629,4 @@ type VideoModelV3 = {
|
|
|
6587
6629
|
}>;
|
|
6588
6630
|
};
|
|
6589
6631
|
|
|
6590
|
-
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 VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, 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 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
|
|
6632
|
+
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 VideoModelV3 as Experimental_VideoModelV3, type VideoModelV3CallOptions as Experimental_VideoModelV3CallOptions, type VideoModelV3File as Experimental_VideoModelV3File, type VideoModelV3VideoData as Experimental_VideoModelV3VideoData, type VideoModelV4 as Experimental_VideoModelV4, type VideoModelV4CallOptions as Experimental_VideoModelV4CallOptions, type VideoModelV4File as Experimental_VideoModelV4File, 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 };
|