ai 5.1.0-beta.13 → 5.1.0-beta.2
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 +0 -89
- package/dist/index.d.mts +59 -159
- package/dist/index.d.ts +59 -159
- package/dist/index.js +23 -26
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +23 -25
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +7 -7
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +7 -7
- package/dist/internal/index.mjs.map +1 -1
- package/dist/test/index.d.mts +32 -32
- package/dist/test/index.d.ts +32 -32
- package/dist/test/index.js +14 -14
- package/dist/test/index.js.map +1 -1
- package/dist/test/index.mjs +11 -11
- package/dist/test/index.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,94 +1,5 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
-
## 5.1.0-beta.13
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 1c2a4c1: fix(ai): remove outdated jsdoc param descriptions
|
|
8
|
-
|
|
9
|
-
## 5.1.0-beta.12
|
|
10
|
-
|
|
11
|
-
### Patch Changes
|
|
12
|
-
|
|
13
|
-
- Updated dependencies [c823faf]
|
|
14
|
-
- @ai-sdk/gateway@1.1.0-beta.8
|
|
15
|
-
|
|
16
|
-
## 5.1.0-beta.11
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- 4616b86: chore: update zod peer depenedency version
|
|
21
|
-
- Updated dependencies [4616b86]
|
|
22
|
-
- @ai-sdk/provider-utils@3.1.0-beta.4
|
|
23
|
-
- @ai-sdk/gateway@1.1.0-beta.7
|
|
24
|
-
|
|
25
|
-
## 5.1.0-beta.10
|
|
26
|
-
|
|
27
|
-
### Patch Changes
|
|
28
|
-
|
|
29
|
-
- 8c98371: Extend addToolResult to support error results
|
|
30
|
-
|
|
31
|
-
## 5.1.0-beta.9
|
|
32
|
-
|
|
33
|
-
### Patch Changes
|
|
34
|
-
|
|
35
|
-
- ed329cb: feat: `Provider-V3`
|
|
36
|
-
- 177b475: fix(ai): download files when intermediate file cannot be downloaded
|
|
37
|
-
- 522f6b8: feat: `ImageModelV3`
|
|
38
|
-
- Updated dependencies [aaf5ebf]
|
|
39
|
-
- Updated dependencies [ed329cb]
|
|
40
|
-
- Updated dependencies [522f6b8]
|
|
41
|
-
- @ai-sdk/gateway@1.1.0-beta.6
|
|
42
|
-
- @ai-sdk/provider@2.1.0-beta.2
|
|
43
|
-
- @ai-sdk/provider-utils@3.1.0-beta.3
|
|
44
|
-
|
|
45
|
-
## 5.1.0-beta.8
|
|
46
|
-
|
|
47
|
-
### Patch Changes
|
|
48
|
-
|
|
49
|
-
- 7eca093: fix(ai): update `uiMessageChunkSchema` to satisfy the `UIMessageChunk` type
|
|
50
|
-
|
|
51
|
-
## 5.1.0-beta.7
|
|
52
|
-
|
|
53
|
-
### Patch Changes
|
|
54
|
-
|
|
55
|
-
- 5a4e732: Export `parseJsonEventStream` and `uiMessageChunkSchema` from "ai" package
|
|
56
|
-
|
|
57
|
-
## 5.1.0-beta.6
|
|
58
|
-
|
|
59
|
-
### Patch Changes
|
|
60
|
-
|
|
61
|
-
- 0c4822d: feat: `EmbeddingModelV3`
|
|
62
|
-
- Updated dependencies [5d21222]
|
|
63
|
-
- Updated dependencies [0c4822d]
|
|
64
|
-
- Updated dependencies [1cad0ab]
|
|
65
|
-
- @ai-sdk/gateway@1.1.0-beta.5
|
|
66
|
-
- @ai-sdk/provider@2.1.0-beta.1
|
|
67
|
-
- @ai-sdk/provider-utils@3.1.0-beta.2
|
|
68
|
-
|
|
69
|
-
## 5.1.0-beta.5
|
|
70
|
-
|
|
71
|
-
### Patch Changes
|
|
72
|
-
|
|
73
|
-
- Updated dependencies [7ccb36f]
|
|
74
|
-
- Updated dependencies [6c766ef]
|
|
75
|
-
- @ai-sdk/gateway@1.1.0-beta.4
|
|
76
|
-
|
|
77
|
-
## 5.1.0-beta.4
|
|
78
|
-
|
|
79
|
-
### Patch Changes
|
|
80
|
-
|
|
81
|
-
- Updated dependencies [ea9ca31]
|
|
82
|
-
- @ai-sdk/gateway@1.1.0-beta.3
|
|
83
|
-
|
|
84
|
-
## 5.1.0-beta.3
|
|
85
|
-
|
|
86
|
-
### Patch Changes
|
|
87
|
-
|
|
88
|
-
- Updated dependencies [3e83633]
|
|
89
|
-
- Updated dependencies [f83903d]
|
|
90
|
-
- @ai-sdk/gateway@1.1.0-beta.2
|
|
91
|
-
|
|
92
3
|
## 5.1.0-beta.2
|
|
93
4
|
|
|
94
5
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
export { createGateway, gateway } from '@ai-sdk/gateway';
|
|
2
2
|
import { ModelMessage, Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, Schema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, InferSchema, FlexibleSchema, DataContent, Validator, StandardSchemaV1, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
|
|
3
|
-
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, IdGenerator, ImagePart, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema,
|
|
3
|
+
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, IdGenerator, ImagePart, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, tool, zodSchema } from '@ai-sdk/provider-utils';
|
|
4
4
|
import { AttributeValue, Tracer } from '@opentelemetry/api';
|
|
5
|
-
import
|
|
6
|
-
import { EmbeddingModelV3, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV2FinishReason, LanguageModelV2CallWarning, LanguageModelV2Source, LanguageModelV2Middleware, SharedV2ProviderMetadata, SpeechModelV2, SpeechModelV2CallWarning, TranscriptionModelV2, TranscriptionModelV2CallWarning, LanguageModelV2Usage, LanguageModelV2CallOptions, AISDKError, LanguageModelV2ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, NoSuchModelError, JSONObject } from '@ai-sdk/provider';
|
|
5
|
+
import { EmbeddingModelV2, EmbeddingModelV2Embedding, ImageModelV2, ImageModelV2CallWarning, ImageModelV2ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV2, LanguageModelV2FinishReason, LanguageModelV2CallWarning, LanguageModelV2Source, LanguageModelV2Middleware, SharedV2ProviderMetadata, SpeechModelV2, SpeechModelV2CallWarning, TranscriptionModelV2, TranscriptionModelV2CallWarning, LanguageModelV2Usage, LanguageModelV2CallOptions, AISDKError, LanguageModelV2ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV2, NoSuchModelError, JSONObject } from '@ai-sdk/provider';
|
|
7
6
|
export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, InvalidResponseDataError, JSONParseError, JSONSchema7, LoadAPIKeyError, NoContentGeneratedError, NoSuchModelError, TooManyEmbeddingValuesForCallError, TypeValidationError, UnsupportedFunctionalityError } from '@ai-sdk/provider';
|
|
8
7
|
import * as z3 from 'zod/v3';
|
|
9
8
|
import * as z4 from 'zod/v4';
|
|
@@ -158,25 +157,25 @@ type TelemetrySettings = {
|
|
|
158
157
|
/**
|
|
159
158
|
Embedding model that is used by the AI SDK Core functions.
|
|
160
159
|
*/
|
|
161
|
-
type EmbeddingModel<VALUE = string> = string |
|
|
160
|
+
type EmbeddingModel<VALUE = string> = string | EmbeddingModelV2<VALUE>;
|
|
162
161
|
/**
|
|
163
162
|
Embedding.
|
|
164
163
|
*/
|
|
165
|
-
type Embedding =
|
|
164
|
+
type Embedding = EmbeddingModelV2Embedding;
|
|
166
165
|
|
|
167
166
|
/**
|
|
168
167
|
Image model that is used by the AI SDK Core functions.
|
|
169
168
|
*/
|
|
170
|
-
type ImageModel =
|
|
169
|
+
type ImageModel = ImageModelV2;
|
|
171
170
|
/**
|
|
172
171
|
Warning from the model provider for this call. The call will proceed, but e.g.
|
|
173
172
|
some settings might not be supported, which can lead to suboptimal results.
|
|
174
173
|
*/
|
|
175
|
-
type ImageGenerationWarning =
|
|
174
|
+
type ImageGenerationWarning = ImageModelV2CallWarning;
|
|
176
175
|
/**
|
|
177
176
|
Metadata from the model provider for this call
|
|
178
177
|
*/
|
|
179
|
-
type ImageModelProviderMetadata =
|
|
178
|
+
type ImageModelProviderMetadata = ImageModelV2ProviderMetadata;
|
|
180
179
|
|
|
181
180
|
type ImageModelResponseMetadata = {
|
|
182
181
|
/**
|
|
@@ -1594,115 +1593,6 @@ type InferUIMessageToolCall<UI_MESSAGE extends UIMessage> = ValueOf<{
|
|
|
1594
1593
|
dynamic: true;
|
|
1595
1594
|
});
|
|
1596
1595
|
|
|
1597
|
-
declare const uiMessageChunkSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
1598
|
-
type: z.ZodLiteral<"text-start">;
|
|
1599
|
-
id: z.ZodString;
|
|
1600
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1601
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1602
|
-
type: z.ZodLiteral<"text-delta">;
|
|
1603
|
-
id: z.ZodString;
|
|
1604
|
-
delta: z.ZodString;
|
|
1605
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1606
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1607
|
-
type: z.ZodLiteral<"text-end">;
|
|
1608
|
-
id: z.ZodString;
|
|
1609
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1610
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1611
|
-
type: z.ZodLiteral<"error">;
|
|
1612
|
-
errorText: z.ZodString;
|
|
1613
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1614
|
-
type: z.ZodLiteral<"tool-input-start">;
|
|
1615
|
-
toolCallId: z.ZodString;
|
|
1616
|
-
toolName: z.ZodString;
|
|
1617
|
-
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
1618
|
-
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
1619
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1620
|
-
type: z.ZodLiteral<"tool-input-delta">;
|
|
1621
|
-
toolCallId: z.ZodString;
|
|
1622
|
-
inputTextDelta: z.ZodString;
|
|
1623
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1624
|
-
type: z.ZodLiteral<"tool-input-available">;
|
|
1625
|
-
toolCallId: z.ZodString;
|
|
1626
|
-
toolName: z.ZodString;
|
|
1627
|
-
input: z.ZodUnknown;
|
|
1628
|
-
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
1629
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1630
|
-
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
1631
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1632
|
-
type: z.ZodLiteral<"tool-input-error">;
|
|
1633
|
-
toolCallId: z.ZodString;
|
|
1634
|
-
toolName: z.ZodString;
|
|
1635
|
-
input: z.ZodUnknown;
|
|
1636
|
-
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
1637
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1638
|
-
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
1639
|
-
errorText: z.ZodString;
|
|
1640
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1641
|
-
type: z.ZodLiteral<"tool-output-available">;
|
|
1642
|
-
toolCallId: z.ZodString;
|
|
1643
|
-
output: z.ZodUnknown;
|
|
1644
|
-
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
1645
|
-
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
1646
|
-
preliminary: z.ZodOptional<z.ZodBoolean>;
|
|
1647
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1648
|
-
type: z.ZodLiteral<"tool-output-error">;
|
|
1649
|
-
toolCallId: z.ZodString;
|
|
1650
|
-
errorText: z.ZodString;
|
|
1651
|
-
providerExecuted: z.ZodOptional<z.ZodBoolean>;
|
|
1652
|
-
dynamic: z.ZodOptional<z.ZodBoolean>;
|
|
1653
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1654
|
-
type: z.ZodLiteral<"reasoning-start">;
|
|
1655
|
-
id: z.ZodString;
|
|
1656
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1657
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1658
|
-
type: z.ZodLiteral<"reasoning-delta">;
|
|
1659
|
-
id: z.ZodString;
|
|
1660
|
-
delta: z.ZodString;
|
|
1661
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1662
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1663
|
-
type: z.ZodLiteral<"reasoning-end">;
|
|
1664
|
-
id: z.ZodString;
|
|
1665
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1666
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1667
|
-
type: z.ZodLiteral<"source-url">;
|
|
1668
|
-
sourceId: z.ZodString;
|
|
1669
|
-
url: z.ZodString;
|
|
1670
|
-
title: z.ZodOptional<z.ZodString>;
|
|
1671
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1672
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1673
|
-
type: z.ZodLiteral<"source-document">;
|
|
1674
|
-
sourceId: z.ZodString;
|
|
1675
|
-
mediaType: z.ZodString;
|
|
1676
|
-
title: z.ZodString;
|
|
1677
|
-
filename: z.ZodOptional<z.ZodString>;
|
|
1678
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1679
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1680
|
-
type: z.ZodLiteral<"file">;
|
|
1681
|
-
url: z.ZodString;
|
|
1682
|
-
mediaType: z.ZodString;
|
|
1683
|
-
providerMetadata: z.ZodOptional<z.ZodType<_ai_sdk_provider.SharedV2ProviderMetadata, unknown, z.core.$ZodTypeInternals<_ai_sdk_provider.SharedV2ProviderMetadata, unknown>>>;
|
|
1684
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1685
|
-
type: z.ZodCustom<`data-${string}`, `data-${string}`>;
|
|
1686
|
-
id: z.ZodOptional<z.ZodString>;
|
|
1687
|
-
data: z.ZodUnknown;
|
|
1688
|
-
transient: z.ZodOptional<z.ZodBoolean>;
|
|
1689
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1690
|
-
type: z.ZodLiteral<"start-step">;
|
|
1691
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1692
|
-
type: z.ZodLiteral<"finish-step">;
|
|
1693
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1694
|
-
type: z.ZodLiteral<"start">;
|
|
1695
|
-
messageId: z.ZodOptional<z.ZodString>;
|
|
1696
|
-
messageMetadata: z.ZodOptional<z.ZodUnknown>;
|
|
1697
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1698
|
-
type: z.ZodLiteral<"finish">;
|
|
1699
|
-
messageMetadata: z.ZodOptional<z.ZodUnknown>;
|
|
1700
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1701
|
-
type: z.ZodLiteral<"abort">;
|
|
1702
|
-
}, z.core.$strict>, z.ZodObject<{
|
|
1703
|
-
type: z.ZodLiteral<"message-metadata">;
|
|
1704
|
-
messageMetadata: z.ZodUnknown;
|
|
1705
|
-
}, z.core.$strict>]>;
|
|
1706
1596
|
type DataUIMessageChunk<DATA_TYPES extends UIDataTypes> = ValueOf<{
|
|
1707
1597
|
[NAME in keyof DATA_TYPES & string]: {
|
|
1708
1598
|
type: `data-${NAME}`;
|
|
@@ -1797,7 +1687,6 @@ type UIMessageChunk<METADATA = unknown, DATA_TYPES extends UIDataTypes = UIDataT
|
|
|
1797
1687
|
type: 'file';
|
|
1798
1688
|
url: string;
|
|
1799
1689
|
mediaType: string;
|
|
1800
|
-
providerMetadata?: ProviderMetadata;
|
|
1801
1690
|
} | DataUIMessageChunk<DATA_TYPES> | {
|
|
1802
1691
|
type: 'start-step';
|
|
1803
1692
|
} | {
|
|
@@ -2072,28 +1961,47 @@ interface StreamTextResult<TOOLS extends ToolSet, PARTIAL_OUTPUT> {
|
|
|
2072
1961
|
*/
|
|
2073
1962
|
consumeStream(options?: ConsumeStreamOptions): Promise<void>;
|
|
2074
1963
|
/**
|
|
2075
|
-
|
|
1964
|
+
Converts the result to a UI message stream.
|
|
2076
1965
|
|
|
2077
|
-
|
|
1966
|
+
@param options.getErrorMessage an optional function that converts an error to an error message.
|
|
1967
|
+
@param options.sendUsage whether to send the usage information to the client. Defaults to true.
|
|
1968
|
+
@param options.sendReasoning whether to send the reasoning information to the client. Defaults to false.
|
|
1969
|
+
@param options.sendSources whether to send the sources information to the client. Defaults to false.
|
|
1970
|
+
@param options.experimental_sendFinish whether to send the finish information to the client. Defaults to true.
|
|
1971
|
+
@param options.experimental_sendStart whether to send the start information to the client. Defaults to true.
|
|
1972
|
+
|
|
1973
|
+
@return A UI message stream.
|
|
2078
1974
|
*/
|
|
2079
1975
|
toUIMessageStream<UI_MESSAGE extends UIMessage>(options?: UIMessageStreamOptions<UI_MESSAGE>): AsyncIterableStream<InferUIMessageChunk<UI_MESSAGE>>;
|
|
2080
1976
|
/**
|
|
2081
|
-
|
|
2082
|
-
|
|
1977
|
+
Writes UI message stream output to a Node.js response-like object.
|
|
1978
|
+
@param response A Node.js response-like object (ServerResponse).
|
|
1979
|
+
@param options.status The status code.
|
|
1980
|
+
@param options.statusText The status text.
|
|
1981
|
+
@param options.headers The headers.
|
|
1982
|
+
@param options.getErrorMessage An optional function that converts an error to an error message.
|
|
1983
|
+
@param options.sendUsage Whether to send the usage information to the client. Defaults to true.
|
|
1984
|
+
@param options.sendReasoning Whether to send the reasoning information to the client. Defaults to false.
|
|
1985
|
+
*/
|
|
2083
1986
|
pipeUIMessageStreamToResponse<UI_MESSAGE extends UIMessage>(response: ServerResponse, options?: UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): void;
|
|
2084
1987
|
/**
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
@param init Optional headers, status code, and status text.
|
|
1988
|
+
Writes text delta output to a Node.js response-like object.
|
|
1989
|
+
It sets a `Content-Type` header to `text/plain; charset=utf-8` and
|
|
1990
|
+
writes each text delta as a separate chunk.
|
|
1991
|
+
@param response A Node.js response-like object (ServerResponse).
|
|
1992
|
+
@param init Optional headers, status code, and status text.
|
|
2091
1993
|
*/
|
|
2092
1994
|
pipeTextStreamToResponse(response: ServerResponse, init?: ResponseInit): void;
|
|
2093
1995
|
/**
|
|
2094
|
-
|
|
1996
|
+
Converts the result to a streamed response object with a stream data part stream.
|
|
2095
1997
|
|
|
2096
|
-
|
|
1998
|
+
@param options.status The status code.
|
|
1999
|
+
@param options.statusText The status text.
|
|
2000
|
+
@param options.headers The headers.
|
|
2001
|
+
@param options.getErrorMessage An optional function that converts an error to an error message.
|
|
2002
|
+
@param options.sendUsage Whether to send the usage information to the client. Defaults to true.
|
|
2003
|
+
@param options.sendReasoning Whether to send the reasoning information to the client. Defaults to false.
|
|
2004
|
+
@return A response object.
|
|
2097
2005
|
*/
|
|
2098
2006
|
toUIMessageStreamResponse<UI_MESSAGE extends UIMessage>(options?: UIMessageStreamResponseInit & UIMessageStreamOptions<UI_MESSAGE>): Response;
|
|
2099
2007
|
/**
|
|
@@ -2815,7 +2723,7 @@ declare function generateImage({ model, prompt, n, maxImagesPerCall, size, aspec
|
|
|
2815
2723
|
/**
|
|
2816
2724
|
The image model to use.
|
|
2817
2725
|
*/
|
|
2818
|
-
model:
|
|
2726
|
+
model: ImageModelV2;
|
|
2819
2727
|
/**
|
|
2820
2728
|
The prompt that should be used to generate the image.
|
|
2821
2729
|
*/
|
|
@@ -3537,7 +3445,7 @@ declare function generateSpeech({ model, text, voice, outputFormat, instructions
|
|
|
3537
3445
|
headers?: Record<string, string>;
|
|
3538
3446
|
}): Promise<SpeechResult>;
|
|
3539
3447
|
|
|
3540
|
-
type Warning = LanguageModelV2CallWarning |
|
|
3448
|
+
type Warning = LanguageModelV2CallWarning | ImageModelV2CallWarning | SpeechModelV2CallWarning | TranscriptionModelV2CallWarning;
|
|
3541
3449
|
type LogWarningsFunction = (warnings: Warning[]) => void;
|
|
3542
3450
|
|
|
3543
3451
|
/**
|
|
@@ -3600,20 +3508,20 @@ declare const wrapLanguageModel: ({ model, middleware: middlewareArg, modelId, p
|
|
|
3600
3508
|
}) => LanguageModelV2;
|
|
3601
3509
|
|
|
3602
3510
|
/**
|
|
3603
|
-
* Wraps a
|
|
3511
|
+
* Wraps a ProviderV2 instance with middleware functionality.
|
|
3604
3512
|
* This function allows you to apply middleware to all language models
|
|
3605
3513
|
* from the provider, enabling you to transform parameters, wrap generate
|
|
3606
3514
|
* operations, and wrap stream operations for every language model.
|
|
3607
3515
|
*
|
|
3608
3516
|
* @param options - Configuration options for wrapping the provider.
|
|
3609
|
-
* @param options.provider - The original
|
|
3517
|
+
* @param options.provider - The original ProviderV2 instance to be wrapped.
|
|
3610
3518
|
* @param options.languageModelMiddleware - The middleware to be applied to all language models from the provider. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
|
|
3611
|
-
* @returns A new
|
|
3519
|
+
* @returns A new ProviderV2 instance with middleware applied to all language models.
|
|
3612
3520
|
*/
|
|
3613
3521
|
declare function wrapProvider({ provider, languageModelMiddleware, }: {
|
|
3614
|
-
provider:
|
|
3522
|
+
provider: ProviderV2;
|
|
3615
3523
|
languageModelMiddleware: LanguageModelMiddleware | LanguageModelMiddleware[];
|
|
3616
|
-
}):
|
|
3524
|
+
}): ProviderV2;
|
|
3617
3525
|
|
|
3618
3526
|
/**
|
|
3619
3527
|
* Creates a custom provider with specified language models, text embedding models, image models, transcription models, speech models, and an optional fallback provider.
|
|
@@ -3629,17 +3537,17 @@ declare function wrapProvider({ provider, languageModelMiddleware, }: {
|
|
|
3629
3537
|
*
|
|
3630
3538
|
* @throws {NoSuchModelError} Throws when a requested model is not found and no fallback provider is available.
|
|
3631
3539
|
*/
|
|
3632
|
-
declare function customProvider<LANGUAGE_MODELS extends Record<string, LanguageModelV2>, EMBEDDING_MODELS extends Record<string,
|
|
3540
|
+
declare function customProvider<LANGUAGE_MODELS extends Record<string, LanguageModelV2>, EMBEDDING_MODELS extends Record<string, EmbeddingModelV2<string>>, IMAGE_MODELS extends Record<string, ImageModelV2>, TRANSCRIPTION_MODELS extends Record<string, TranscriptionModelV2>, SPEECH_MODELS extends Record<string, SpeechModelV2>>({ languageModels, textEmbeddingModels, imageModels, transcriptionModels, speechModels, fallbackProvider, }: {
|
|
3633
3541
|
languageModels?: LANGUAGE_MODELS;
|
|
3634
3542
|
textEmbeddingModels?: EMBEDDING_MODELS;
|
|
3635
3543
|
imageModels?: IMAGE_MODELS;
|
|
3636
3544
|
transcriptionModels?: TRANSCRIPTION_MODELS;
|
|
3637
3545
|
speechModels?: SPEECH_MODELS;
|
|
3638
|
-
fallbackProvider?:
|
|
3639
|
-
}):
|
|
3546
|
+
fallbackProvider?: ProviderV2;
|
|
3547
|
+
}): ProviderV2 & {
|
|
3640
3548
|
languageModel(modelId: ExtractModelId<LANGUAGE_MODELS>): LanguageModelV2;
|
|
3641
|
-
textEmbeddingModel(modelId: ExtractModelId<EMBEDDING_MODELS>):
|
|
3642
|
-
imageModel(modelId: ExtractModelId<IMAGE_MODELS>):
|
|
3549
|
+
textEmbeddingModel(modelId: ExtractModelId<EMBEDDING_MODELS>): EmbeddingModelV2<string>;
|
|
3550
|
+
imageModel(modelId: ExtractModelId<IMAGE_MODELS>): ImageModelV2;
|
|
3643
3551
|
transcriptionModel(modelId: ExtractModelId<TRANSCRIPTION_MODELS>): TranscriptionModelV2;
|
|
3644
3552
|
speechModel(modelId: ExtractModelId<SPEECH_MODELS>): SpeechModelV2;
|
|
3645
3553
|
};
|
|
@@ -3665,13 +3573,13 @@ declare class NoSuchProviderError extends NoSuchModelError {
|
|
|
3665
3573
|
}
|
|
3666
3574
|
|
|
3667
3575
|
type ExtractLiteralUnion<T> = T extends string ? string extends T ? never : T : never;
|
|
3668
|
-
interface ProviderRegistryProvider<PROVIDERS extends Record<string,
|
|
3576
|
+
interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV2> = Record<string, ProviderV2>, SEPARATOR extends string = ':'> {
|
|
3669
3577
|
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV2;
|
|
3670
3578
|
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): LanguageModelV2;
|
|
3671
|
-
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['textEmbeddingModel']>>[0]>}` : never):
|
|
3672
|
-
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never):
|
|
3673
|
-
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never):
|
|
3674
|
-
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never):
|
|
3579
|
+
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['textEmbeddingModel']>>[0]>}` : never): EmbeddingModelV2<string>;
|
|
3580
|
+
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): EmbeddingModelV2<string>;
|
|
3581
|
+
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never): ImageModelV2;
|
|
3582
|
+
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): ImageModelV2;
|
|
3675
3583
|
transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['transcriptionModel']>>[0]>}` : never): TranscriptionModelV2;
|
|
3676
3584
|
transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): TranscriptionModelV2;
|
|
3677
3585
|
speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['speechModel']>>[0]>}` : never): SpeechModelV2;
|
|
@@ -3689,7 +3597,7 @@ interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV3>
|
|
|
3689
3597
|
* @param options.languageModelMiddleware - Optional middleware to be applied to all language models from the registry. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
|
|
3690
3598
|
* @returns A new ProviderRegistryProvider instance that provides access to all registered providers with optional middleware applied to language models.
|
|
3691
3599
|
*/
|
|
3692
|
-
declare function createProviderRegistry<PROVIDERS extends Record<string,
|
|
3600
|
+
declare function createProviderRegistry<PROVIDERS extends Record<string, ProviderV2>, SEPARATOR extends string = ':'>(providers: PROVIDERS, { separator, languageModelMiddleware, }?: {
|
|
3693
3601
|
separator?: SEPARATOR;
|
|
3694
3602
|
languageModelMiddleware?: LanguageModelMiddleware | LanguageModelMiddleware[];
|
|
3695
3603
|
}): ProviderRegistryProvider<PROVIDERS, SEPARATOR>;
|
|
@@ -4308,18 +4216,10 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
4308
4216
|
* Clear the error state and set the status to ready if the chat is in an error state.
|
|
4309
4217
|
*/
|
|
4310
4218
|
clearError: () => void;
|
|
4311
|
-
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({
|
|
4312
|
-
state?: "output-available";
|
|
4219
|
+
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ tool, toolCallId, output, }: {
|
|
4313
4220
|
tool: TOOL;
|
|
4314
4221
|
toolCallId: string;
|
|
4315
4222
|
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
4316
|
-
errorText?: never;
|
|
4317
|
-
} | {
|
|
4318
|
-
state: "output-error";
|
|
4319
|
-
tool: TOOL;
|
|
4320
|
-
toolCallId: string;
|
|
4321
|
-
output?: never;
|
|
4322
|
-
errorText: string;
|
|
4323
4223
|
}) => Promise<void>;
|
|
4324
4224
|
/**
|
|
4325
4225
|
* Abort the current request immediately, keep the generated tokens if any.
|
|
@@ -4599,7 +4499,7 @@ declare global {
|
|
|
4599
4499
|
*
|
|
4600
4500
|
* @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
|
|
4601
4501
|
*/
|
|
4602
|
-
var AI_SDK_DEFAULT_PROVIDER:
|
|
4502
|
+
var AI_SDK_DEFAULT_PROVIDER: ProviderV2 | undefined;
|
|
4603
4503
|
/**
|
|
4604
4504
|
* The warning logger to use for the AI SDK.
|
|
4605
4505
|
*
|
|
@@ -4610,4 +4510,4 @@ declare global {
|
|
|
4610
4510
|
var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
|
|
4611
4511
|
}
|
|
4612
4512
|
|
|
4613
|
-
export { AbstractChat, AsyncIterableStream, CallSettings, CallWarning, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, Agent as Experimental_Agent, AgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDeepEqualData, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema,
|
|
4513
|
+
export { AbstractChat, AsyncIterableStream, CallSettings, CallWarning, ChatInit, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatOnToolCallCallback, ChatRequestOptions, ChatState, ChatStatus, ChatTransport, ChunkDetector, CompletionRequestOptions, CoreAssistantMessage, CoreMessage, CoreSystemMessage, CoreToolMessage, CoreUserMessage, CreateUIMessage, DataUIPart, DeepPartial, DefaultChatTransport, DownloadError, DynamicToolCall, DynamicToolError, DynamicToolResult, DynamicToolUIPart, EmbedManyResult, EmbedResult, Embedding, EmbeddingModel, EmbeddingModelUsage, ErrorHandler, Agent as Experimental_Agent, AgentSettings as Experimental_AgentSettings, DownloadFunction as Experimental_DownloadFunction, GenerateImageResult as Experimental_GenerateImageResult, GeneratedFile as Experimental_GeneratedImage, InferAgentUIMessage as Experimental_InferAgentUIMessage, LogWarningsFunction as Experimental_LogWarningsFunction, SpeechResult as Experimental_SpeechResult, TranscriptionResult as Experimental_TranscriptionResult, Warning as Experimental_Warning, FileUIPart, FinishReason, GenerateObjectResult, GenerateTextOnStepFinishCallback, GenerateTextResult, GeneratedAudioFile, GeneratedFile, HttpChatTransport, HttpChatTransportInitOptions, ImageModel, ImageGenerationWarning as ImageModelCallWarning, ImageModelProviderMetadata, ImageModelResponseMetadata, InferUIDataParts, InferUIMessageChunk, InferUITool, InferUITools, InvalidArgumentError, InvalidDataContentError, InvalidMessageRoleError, InvalidStreamPartError, InvalidToolInputError, JSONRPCError, JSONRPCMessage, JSONRPCNotification, JSONRPCRequest, JSONRPCResponse, JSONValue, JsonToSseTransformStream, LanguageModel, LanguageModelMiddleware, LanguageModelRequestMetadata, LanguageModelResponseMetadata, LanguageModelUsage, MCPClientError, MCPTransport, MessageConversionError, NoImageGeneratedError, NoObjectGeneratedError, NoOutputGeneratedError, NoOutputSpecifiedError, NoSuchProviderError, NoSuchToolError, ObjectStreamPart, output as Output, PrepareReconnectToStreamRequest, PrepareSendMessagesRequest, PrepareStepFunction, PrepareStepResult, Prompt, Provider, ProviderMetadata, ProviderRegistryProvider, ReasoningOutput, ReasoningUIPart, RepairTextFunction, RetryError, SafeValidateUIMessagesResult, SerialJobExecutor, SourceDocumentUIPart, SourceUrlUIPart, SpeechModel, SpeechModelResponseMetadata, SpeechWarning, StaticToolCall, StaticToolError, StaticToolResult, StepResult, StepStartUIPart, StopCondition, StreamObjectOnFinishCallback, StreamObjectResult, StreamTextOnChunkCallback, StreamTextOnErrorCallback, StreamTextOnFinishCallback, StreamTextOnStepFinishCallback, StreamTextResult, StreamTextTransform, TelemetrySettings, TextStreamChatTransport, TextStreamPart, TextUIPart, ToolCallRepairError, ToolCallRepairFunction, ToolChoice, ToolSet, ToolUIPart, TranscriptionModel, TranscriptionModelResponseMetadata, TranscriptionWarning, TypedToolCall, TypedToolError, TypedToolResult, UIDataPartSchemas, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UIMessageStreamOnFinishCallback, UIMessageStreamOptions, UIMessageStreamWriter, UITool, UIToolInvocation, UITools, UI_MESSAGE_STREAM_HEADERS, UnsupportedModelVersionError, UseCompletionOptions, assistantModelMessageSchema, callCompletionApi, consumeStream, convertFileListToFileUIParts, convertToCoreMessages, convertToModelMessages, coreAssistantMessageSchema, coreMessageSchema, coreSystemMessageSchema, coreToolMessageSchema, coreUserMessageSchema, cosineSimilarity, createProviderRegistry, createTextStreamResponse, createUIMessageStream, createUIMessageStreamResponse, customProvider, defaultSettingsMiddleware, embed, embedMany, MCPClient as experimental_MCPClient, MCPClientConfig as experimental_MCPClientConfig, createMCPClient as experimental_createMCPClient, experimental_createProviderRegistry, experimental_customProvider, generateImage as experimental_generateImage, generateSpeech as experimental_generateSpeech, transcribe as experimental_transcribe, extractReasoningMiddleware, generateObject, generateText, getTextFromDataUrl, getToolName, getToolOrDynamicToolName, hasToolCall, isDeepEqualData, isToolOrDynamicToolUIPart, isToolUIPart, lastAssistantMessageIsCompleteWithToolCalls, modelMessageSchema, parsePartialJson, pipeTextStreamToResponse, pipeUIMessageStreamToResponse, readUIMessageStream, safeValidateUIMessages, simulateReadableStream, simulateStreamingMiddleware, smoothStream, stepCountIs, streamObject, streamText, systemModelMessageSchema, toolModelMessageSchema, userModelMessageSchema, validateUIMessages, wrapLanguageModel, wrapProvider };
|