ai 5.1.0-beta.14 → 5.1.0-beta.3
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 -94
- package/dist/index.d.mts +90 -200
- package/dist/index.d.ts +90 -200
- package/dist/index.js +116 -133
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +75 -90
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +4 -4
- package/dist/internal/index.d.ts +4 -4
- package/dist/internal/index.js +10 -10
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +10 -10
- package/dist/internal/index.mjs.map +1 -1
- package/dist/test/index.d.mts +46 -46
- package/dist/test/index.d.ts +46 -46
- package/dist/test/index.js +19 -19
- package/dist/test/index.js.map +1 -1
- package/dist/test/index.mjs +15 -15
- package/dist/test/index.mjs.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,99 +1,5 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
-
## 5.1.0-beta.14
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 7c3c216: fixed docs and exported NoSpeechGeneratedError
|
|
8
|
-
- 8dac895: feat: `LanguageModelV3`
|
|
9
|
-
- e0d1ea9: fix(ai): align logic of text-end with reasoning-end
|
|
10
|
-
- 10c1322: fix: moved dependency `@ai-sdk/test-server` to devDependencies
|
|
11
|
-
- Updated dependencies [8dac895]
|
|
12
|
-
- @ai-sdk/provider-utils@3.1.0-beta.5
|
|
13
|
-
- @ai-sdk/provider@2.1.0-beta.3
|
|
14
|
-
- @ai-sdk/gateway@1.1.0-beta.9
|
|
15
|
-
|
|
16
|
-
## 5.1.0-beta.13
|
|
17
|
-
|
|
18
|
-
### Patch Changes
|
|
19
|
-
|
|
20
|
-
- 1c2a4c1: fix(ai): remove outdated jsdoc param descriptions
|
|
21
|
-
|
|
22
|
-
## 5.1.0-beta.12
|
|
23
|
-
|
|
24
|
-
### Patch Changes
|
|
25
|
-
|
|
26
|
-
- Updated dependencies [c823faf]
|
|
27
|
-
- @ai-sdk/gateway@1.1.0-beta.8
|
|
28
|
-
|
|
29
|
-
## 5.1.0-beta.11
|
|
30
|
-
|
|
31
|
-
### Patch Changes
|
|
32
|
-
|
|
33
|
-
- 4616b86: chore: update zod peer depenedency version
|
|
34
|
-
- Updated dependencies [4616b86]
|
|
35
|
-
- @ai-sdk/provider-utils@3.1.0-beta.4
|
|
36
|
-
- @ai-sdk/gateway@1.1.0-beta.7
|
|
37
|
-
|
|
38
|
-
## 5.1.0-beta.10
|
|
39
|
-
|
|
40
|
-
### Patch Changes
|
|
41
|
-
|
|
42
|
-
- 8c98371: Extend addToolResult to support error results
|
|
43
|
-
|
|
44
|
-
## 5.1.0-beta.9
|
|
45
|
-
|
|
46
|
-
### Patch Changes
|
|
47
|
-
|
|
48
|
-
- ed329cb: feat: `Provider-V3`
|
|
49
|
-
- 177b475: fix(ai): download files when intermediate file cannot be downloaded
|
|
50
|
-
- 522f6b8: feat: `ImageModelV3`
|
|
51
|
-
- Updated dependencies [aaf5ebf]
|
|
52
|
-
- Updated dependencies [ed329cb]
|
|
53
|
-
- Updated dependencies [522f6b8]
|
|
54
|
-
- @ai-sdk/gateway@1.1.0-beta.6
|
|
55
|
-
- @ai-sdk/provider@2.1.0-beta.2
|
|
56
|
-
- @ai-sdk/provider-utils@3.1.0-beta.3
|
|
57
|
-
|
|
58
|
-
## 5.1.0-beta.8
|
|
59
|
-
|
|
60
|
-
### Patch Changes
|
|
61
|
-
|
|
62
|
-
- 7eca093: fix(ai): update `uiMessageChunkSchema` to satisfy the `UIMessageChunk` type
|
|
63
|
-
|
|
64
|
-
## 5.1.0-beta.7
|
|
65
|
-
|
|
66
|
-
### Patch Changes
|
|
67
|
-
|
|
68
|
-
- 5a4e732: Export `parseJsonEventStream` and `uiMessageChunkSchema` from "ai" package
|
|
69
|
-
|
|
70
|
-
## 5.1.0-beta.6
|
|
71
|
-
|
|
72
|
-
### Patch Changes
|
|
73
|
-
|
|
74
|
-
- 0c4822d: feat: `EmbeddingModelV3`
|
|
75
|
-
- Updated dependencies [5d21222]
|
|
76
|
-
- Updated dependencies [0c4822d]
|
|
77
|
-
- Updated dependencies [1cad0ab]
|
|
78
|
-
- @ai-sdk/gateway@1.1.0-beta.5
|
|
79
|
-
- @ai-sdk/provider@2.1.0-beta.1
|
|
80
|
-
- @ai-sdk/provider-utils@3.1.0-beta.2
|
|
81
|
-
|
|
82
|
-
## 5.1.0-beta.5
|
|
83
|
-
|
|
84
|
-
### Patch Changes
|
|
85
|
-
|
|
86
|
-
- Updated dependencies [7ccb36f]
|
|
87
|
-
- Updated dependencies [6c766ef]
|
|
88
|
-
- @ai-sdk/gateway@1.1.0-beta.4
|
|
89
|
-
|
|
90
|
-
## 5.1.0-beta.4
|
|
91
|
-
|
|
92
|
-
### Patch Changes
|
|
93
|
-
|
|
94
|
-
- Updated dependencies [ea9ca31]
|
|
95
|
-
- @ai-sdk/gateway@1.1.0-beta.3
|
|
96
|
-
|
|
97
3
|
## 5.1.0-beta.3
|
|
98
4
|
|
|
99
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, LanguageModelV3, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV2ProviderMetadata, SpeechModelV2, SpeechModelV2CallWarning, TranscriptionModelV2, TranscriptionModelV2CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, 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
|
/**
|
|
@@ -198,7 +197,7 @@ type JSONValue = JSONValue$1;
|
|
|
198
197
|
/**
|
|
199
198
|
Language model that is used by the AI SDK Core functions.
|
|
200
199
|
*/
|
|
201
|
-
type LanguageModel = string |
|
|
200
|
+
type LanguageModel = string | LanguageModelV2;
|
|
202
201
|
/**
|
|
203
202
|
Reason why a language model finished generating a response.
|
|
204
203
|
|
|
@@ -210,16 +209,16 @@ Can be one of the following:
|
|
|
210
209
|
- `error`: model stopped because of an error
|
|
211
210
|
- `other`: model stopped for other reasons
|
|
212
211
|
*/
|
|
213
|
-
type FinishReason =
|
|
212
|
+
type FinishReason = LanguageModelV2FinishReason;
|
|
214
213
|
/**
|
|
215
214
|
Warning from the model provider for this call. The call will proceed, but e.g.
|
|
216
215
|
some settings might not be supported, which can lead to suboptimal results.
|
|
217
216
|
*/
|
|
218
|
-
type CallWarning =
|
|
217
|
+
type CallWarning = LanguageModelV2CallWarning;
|
|
219
218
|
/**
|
|
220
219
|
A source that has been used as input to generate the response.
|
|
221
220
|
*/
|
|
222
|
-
type Source =
|
|
221
|
+
type Source = LanguageModelV2Source;
|
|
223
222
|
/**
|
|
224
223
|
Tool choice for the generation. It supports the following settings:
|
|
225
224
|
|
|
@@ -233,7 +232,7 @@ type ToolChoice<TOOLS extends Record<string, unknown>> = 'auto' | 'none' | 'requ
|
|
|
233
232
|
toolName: Extract<keyof TOOLS, string>;
|
|
234
233
|
};
|
|
235
234
|
|
|
236
|
-
type LanguageModelMiddleware =
|
|
235
|
+
type LanguageModelMiddleware = LanguageModelV2Middleware;
|
|
237
236
|
|
|
238
237
|
type LanguageModelRequestMetadata = {
|
|
239
238
|
/**
|
|
@@ -363,7 +362,7 @@ type TranscriptionModelResponseMetadata = {
|
|
|
363
362
|
/**
|
|
364
363
|
Represents the number of tokens used in a prompt and completion.
|
|
365
364
|
*/
|
|
366
|
-
type LanguageModelUsage =
|
|
365
|
+
type LanguageModelUsage = LanguageModelV2Usage;
|
|
367
366
|
/**
|
|
368
367
|
Represents the number of tokens used in an embedding.
|
|
369
368
|
*/
|
|
@@ -811,7 +810,7 @@ type PartialObject<ObjectType extends object> = {
|
|
|
811
810
|
|
|
812
811
|
interface Output<OUTPUT, PARTIAL> {
|
|
813
812
|
readonly type: 'object' | 'text';
|
|
814
|
-
responseFormat:
|
|
813
|
+
responseFormat: LanguageModelV2CallOptions['responseFormat'];
|
|
815
814
|
parsePartial(options: {
|
|
816
815
|
text: string;
|
|
817
816
|
}): Promise<{
|
|
@@ -961,13 +960,13 @@ declare const coreMessageSchema: z.ZodType<CoreMessage>;
|
|
|
961
960
|
type ToolCallRepairFunction<TOOLS extends ToolSet> = (options: {
|
|
962
961
|
system: string | undefined;
|
|
963
962
|
messages: ModelMessage[];
|
|
964
|
-
toolCall:
|
|
963
|
+
toolCall: LanguageModelV2ToolCall;
|
|
965
964
|
tools: TOOLS;
|
|
966
965
|
inputSchema: (options: {
|
|
967
966
|
toolName: string;
|
|
968
967
|
}) => JSONSchema7;
|
|
969
968
|
error: NoSuchToolError | InvalidToolInputError;
|
|
970
|
-
}) => Promise<
|
|
969
|
+
}) => Promise<LanguageModelV2ToolCall | null>;
|
|
971
970
|
|
|
972
971
|
/**
|
|
973
972
|
Callback that is set using the `onStepFinish` option.
|
|
@@ -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.
|
|
1965
|
+
|
|
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.
|
|
2076
1972
|
|
|
2077
|
-
|
|
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
|
/**
|
|
@@ -2544,7 +2452,7 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
|
|
|
2544
2452
|
file: GeneratedFile;
|
|
2545
2453
|
} | {
|
|
2546
2454
|
type: 'stream-start';
|
|
2547
|
-
warnings:
|
|
2455
|
+
warnings: LanguageModelV2CallWarning[];
|
|
2548
2456
|
} | {
|
|
2549
2457
|
type: 'response-metadata';
|
|
2550
2458
|
id?: string;
|
|
@@ -2675,16 +2583,6 @@ declare class NoOutputSpecifiedError extends AISDKError {
|
|
|
2675
2583
|
static isInstance(error: unknown): error is NoOutputSpecifiedError;
|
|
2676
2584
|
}
|
|
2677
2585
|
|
|
2678
|
-
/**
|
|
2679
|
-
Error that is thrown when no speech audio was generated.
|
|
2680
|
-
*/
|
|
2681
|
-
declare class NoSpeechGeneratedError extends AISDKError {
|
|
2682
|
-
readonly responses: Array<SpeechModelResponseMetadata>;
|
|
2683
|
-
constructor(options: {
|
|
2684
|
-
responses: Array<SpeechModelResponseMetadata>;
|
|
2685
|
-
});
|
|
2686
|
-
}
|
|
2687
|
-
|
|
2688
2586
|
declare const symbol$6: unique symbol;
|
|
2689
2587
|
declare class ToolCallRepairError extends AISDKError {
|
|
2690
2588
|
private readonly [symbol$6];
|
|
@@ -2825,7 +2723,7 @@ declare function generateImage({ model, prompt, n, maxImagesPerCall, size, aspec
|
|
|
2825
2723
|
/**
|
|
2826
2724
|
The image model to use.
|
|
2827
2725
|
*/
|
|
2828
|
-
model:
|
|
2726
|
+
model: ImageModelV2;
|
|
2829
2727
|
/**
|
|
2830
2728
|
The prompt that should be used to generate the image.
|
|
2831
2729
|
*/
|
|
@@ -3547,7 +3445,7 @@ declare function generateSpeech({ model, text, voice, outputFormat, instructions
|
|
|
3547
3445
|
headers?: Record<string, string>;
|
|
3548
3446
|
}): Promise<SpeechResult>;
|
|
3549
3447
|
|
|
3550
|
-
type Warning =
|
|
3448
|
+
type Warning = LanguageModelV2CallWarning | ImageModelV2CallWarning | SpeechModelV2CallWarning | TranscriptionModelV2CallWarning;
|
|
3551
3449
|
type LogWarningsFunction = (warnings: Warning[]) => void;
|
|
3552
3450
|
|
|
3553
3451
|
/**
|
|
@@ -3555,19 +3453,19 @@ type LogWarningsFunction = (warnings: Warning[]) => void;
|
|
|
3555
3453
|
*/
|
|
3556
3454
|
declare function defaultSettingsMiddleware({ settings, }: {
|
|
3557
3455
|
settings: Partial<{
|
|
3558
|
-
maxOutputTokens?:
|
|
3559
|
-
temperature?:
|
|
3560
|
-
stopSequences?:
|
|
3561
|
-
topP?:
|
|
3562
|
-
topK?:
|
|
3563
|
-
presencePenalty?:
|
|
3564
|
-
frequencyPenalty?:
|
|
3565
|
-
responseFormat?:
|
|
3566
|
-
seed?:
|
|
3567
|
-
tools?:
|
|
3568
|
-
toolChoice?:
|
|
3569
|
-
headers?:
|
|
3570
|
-
providerOptions?:
|
|
3456
|
+
maxOutputTokens?: LanguageModelV2CallOptions['maxOutputTokens'];
|
|
3457
|
+
temperature?: LanguageModelV2CallOptions['temperature'];
|
|
3458
|
+
stopSequences?: LanguageModelV2CallOptions['stopSequences'];
|
|
3459
|
+
topP?: LanguageModelV2CallOptions['topP'];
|
|
3460
|
+
topK?: LanguageModelV2CallOptions['topK'];
|
|
3461
|
+
presencePenalty?: LanguageModelV2CallOptions['presencePenalty'];
|
|
3462
|
+
frequencyPenalty?: LanguageModelV2CallOptions['frequencyPenalty'];
|
|
3463
|
+
responseFormat?: LanguageModelV2CallOptions['responseFormat'];
|
|
3464
|
+
seed?: LanguageModelV2CallOptions['seed'];
|
|
3465
|
+
tools?: LanguageModelV2CallOptions['tools'];
|
|
3466
|
+
toolChoice?: LanguageModelV2CallOptions['toolChoice'];
|
|
3467
|
+
headers?: LanguageModelV2CallOptions['headers'];
|
|
3468
|
+
providerOptions?: LanguageModelV2CallOptions['providerOptions'];
|
|
3571
3469
|
}>;
|
|
3572
3470
|
}): LanguageModelMiddleware;
|
|
3573
3471
|
|
|
@@ -3591,39 +3489,39 @@ declare function extractReasoningMiddleware({ tagName, separator, startWithReaso
|
|
|
3591
3489
|
declare function simulateStreamingMiddleware(): LanguageModelMiddleware;
|
|
3592
3490
|
|
|
3593
3491
|
/**
|
|
3594
|
-
* Wraps a
|
|
3492
|
+
* Wraps a LanguageModelV2 instance with middleware functionality.
|
|
3595
3493
|
* This function allows you to apply middleware to transform parameters,
|
|
3596
3494
|
* wrap generate operations, and wrap stream operations of a language model.
|
|
3597
3495
|
*
|
|
3598
3496
|
* @param options - Configuration options for wrapping the language model.
|
|
3599
|
-
* @param options.model - The original
|
|
3497
|
+
* @param options.model - The original LanguageModelV2 instance to be wrapped.
|
|
3600
3498
|
* @param options.middleware - The middleware to be applied to the language model. When multiple middlewares are provided, the first middleware will transform the input first, and the last middleware will be wrapped directly around the model.
|
|
3601
3499
|
* @param options.modelId - Optional custom model ID to override the original model's ID.
|
|
3602
3500
|
* @param options.providerId - Optional custom provider ID to override the original model's provider ID.
|
|
3603
|
-
* @returns A new
|
|
3501
|
+
* @returns A new LanguageModelV2 instance with middleware applied.
|
|
3604
3502
|
*/
|
|
3605
3503
|
declare const wrapLanguageModel: ({ model, middleware: middlewareArg, modelId, providerId, }: {
|
|
3606
|
-
model:
|
|
3504
|
+
model: LanguageModelV2;
|
|
3607
3505
|
middleware: LanguageModelMiddleware | LanguageModelMiddleware[];
|
|
3608
3506
|
modelId?: string;
|
|
3609
3507
|
providerId?: string;
|
|
3610
|
-
}) =>
|
|
3508
|
+
}) => LanguageModelV2;
|
|
3611
3509
|
|
|
3612
3510
|
/**
|
|
3613
|
-
* Wraps a
|
|
3511
|
+
* Wraps a ProviderV2 instance with middleware functionality.
|
|
3614
3512
|
* This function allows you to apply middleware to all language models
|
|
3615
3513
|
* from the provider, enabling you to transform parameters, wrap generate
|
|
3616
3514
|
* operations, and wrap stream operations for every language model.
|
|
3617
3515
|
*
|
|
3618
3516
|
* @param options - Configuration options for wrapping the provider.
|
|
3619
|
-
* @param options.provider - The original
|
|
3517
|
+
* @param options.provider - The original ProviderV2 instance to be wrapped.
|
|
3620
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.
|
|
3621
|
-
* @returns A new
|
|
3519
|
+
* @returns A new ProviderV2 instance with middleware applied to all language models.
|
|
3622
3520
|
*/
|
|
3623
3521
|
declare function wrapProvider({ provider, languageModelMiddleware, }: {
|
|
3624
|
-
provider:
|
|
3522
|
+
provider: ProviderV2;
|
|
3625
3523
|
languageModelMiddleware: LanguageModelMiddleware | LanguageModelMiddleware[];
|
|
3626
|
-
}):
|
|
3524
|
+
}): ProviderV2;
|
|
3627
3525
|
|
|
3628
3526
|
/**
|
|
3629
3527
|
* Creates a custom provider with specified language models, text embedding models, image models, transcription models, speech models, and an optional fallback provider.
|
|
@@ -3639,17 +3537,17 @@ declare function wrapProvider({ provider, languageModelMiddleware, }: {
|
|
|
3639
3537
|
*
|
|
3640
3538
|
* @throws {NoSuchModelError} Throws when a requested model is not found and no fallback provider is available.
|
|
3641
3539
|
*/
|
|
3642
|
-
declare function customProvider<LANGUAGE_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, }: {
|
|
3643
3541
|
languageModels?: LANGUAGE_MODELS;
|
|
3644
3542
|
textEmbeddingModels?: EMBEDDING_MODELS;
|
|
3645
3543
|
imageModels?: IMAGE_MODELS;
|
|
3646
3544
|
transcriptionModels?: TRANSCRIPTION_MODELS;
|
|
3647
3545
|
speechModels?: SPEECH_MODELS;
|
|
3648
|
-
fallbackProvider?:
|
|
3649
|
-
}):
|
|
3650
|
-
languageModel(modelId: ExtractModelId<LANGUAGE_MODELS>):
|
|
3651
|
-
textEmbeddingModel(modelId: ExtractModelId<EMBEDDING_MODELS>):
|
|
3652
|
-
imageModel(modelId: ExtractModelId<IMAGE_MODELS>):
|
|
3546
|
+
fallbackProvider?: ProviderV2;
|
|
3547
|
+
}): ProviderV2 & {
|
|
3548
|
+
languageModel(modelId: ExtractModelId<LANGUAGE_MODELS>): LanguageModelV2;
|
|
3549
|
+
textEmbeddingModel(modelId: ExtractModelId<EMBEDDING_MODELS>): EmbeddingModelV2<string>;
|
|
3550
|
+
imageModel(modelId: ExtractModelId<IMAGE_MODELS>): ImageModelV2;
|
|
3653
3551
|
transcriptionModel(modelId: ExtractModelId<TRANSCRIPTION_MODELS>): TranscriptionModelV2;
|
|
3654
3552
|
speechModel(modelId: ExtractModelId<SPEECH_MODELS>): SpeechModelV2;
|
|
3655
3553
|
};
|
|
@@ -3675,13 +3573,13 @@ declare class NoSuchProviderError extends NoSuchModelError {
|
|
|
3675
3573
|
}
|
|
3676
3574
|
|
|
3677
3575
|
type ExtractLiteralUnion<T> = T extends string ? string extends T ? never : T : never;
|
|
3678
|
-
interface ProviderRegistryProvider<PROVIDERS extends Record<string,
|
|
3679
|
-
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never):
|
|
3680
|
-
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never):
|
|
3681
|
-
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['textEmbeddingModel']>>[0]>}` : never):
|
|
3682
|
-
textEmbeddingModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never):
|
|
3683
|
-
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['imageModel']>>[0]>}` : never):
|
|
3684
|
-
imageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never):
|
|
3576
|
+
interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV2> = Record<string, ProviderV2>, SEPARATOR extends string = ':'> {
|
|
3577
|
+
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['languageModel']>>[0]>}` : never): LanguageModelV2;
|
|
3578
|
+
languageModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): LanguageModelV2;
|
|
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;
|
|
3685
3583
|
transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['transcriptionModel']>>[0]>}` : never): TranscriptionModelV2;
|
|
3686
3584
|
transcriptionModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${string}` : never): TranscriptionModelV2;
|
|
3687
3585
|
speechModel<KEY extends keyof PROVIDERS>(id: KEY extends string ? `${KEY & string}${SEPARATOR}${ExtractLiteralUnion<Parameters<NonNullable<PROVIDERS[KEY]['speechModel']>>[0]>}` : never): SpeechModelV2;
|
|
@@ -3699,7 +3597,7 @@ interface ProviderRegistryProvider<PROVIDERS extends Record<string, ProviderV3>
|
|
|
3699
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.
|
|
3700
3598
|
* @returns A new ProviderRegistryProvider instance that provides access to all registered providers with optional middleware applied to language models.
|
|
3701
3599
|
*/
|
|
3702
|
-
declare function createProviderRegistry<PROVIDERS extends Record<string,
|
|
3600
|
+
declare function createProviderRegistry<PROVIDERS extends Record<string, ProviderV2>, SEPARATOR extends string = ':'>(providers: PROVIDERS, { separator, languageModelMiddleware, }?: {
|
|
3703
3601
|
separator?: SEPARATOR;
|
|
3704
3602
|
languageModelMiddleware?: LanguageModelMiddleware | LanguageModelMiddleware[];
|
|
3705
3603
|
}): ProviderRegistryProvider<PROVIDERS, SEPARATOR>;
|
|
@@ -4318,18 +4216,10 @@ declare abstract class AbstractChat<UI_MESSAGE extends UIMessage> {
|
|
|
4318
4216
|
* Clear the error state and set the status to ready if the chat is in an error state.
|
|
4319
4217
|
*/
|
|
4320
4218
|
clearError: () => void;
|
|
4321
|
-
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({
|
|
4322
|
-
state?: "output-available";
|
|
4219
|
+
addToolResult: <TOOL extends keyof InferUIMessageTools<UI_MESSAGE>>({ tool, toolCallId, output, }: {
|
|
4323
4220
|
tool: TOOL;
|
|
4324
4221
|
toolCallId: string;
|
|
4325
4222
|
output: InferUIMessageTools<UI_MESSAGE>[TOOL]["output"];
|
|
4326
|
-
errorText?: never;
|
|
4327
|
-
} | {
|
|
4328
|
-
state: "output-error";
|
|
4329
|
-
tool: TOOL;
|
|
4330
|
-
toolCallId: string;
|
|
4331
|
-
output?: never;
|
|
4332
|
-
errorText: string;
|
|
4333
4223
|
}) => Promise<void>;
|
|
4334
4224
|
/**
|
|
4335
4225
|
* Abort the current request immediately, keep the generated tokens if any.
|
|
@@ -4609,7 +4499,7 @@ declare global {
|
|
|
4609
4499
|
*
|
|
4610
4500
|
* @see https://ai-sdk.dev/docs/ai-sdk-core/provider-management#global-provider-configuration
|
|
4611
4501
|
*/
|
|
4612
|
-
var AI_SDK_DEFAULT_PROVIDER:
|
|
4502
|
+
var AI_SDK_DEFAULT_PROVIDER: ProviderV2 | undefined;
|
|
4613
4503
|
/**
|
|
4614
4504
|
* The warning logger to use for the AI SDK.
|
|
4615
4505
|
*
|
|
@@ -4620,4 +4510,4 @@ declare global {
|
|
|
4620
4510
|
var AI_SDK_LOG_WARNINGS: LogWarningsFunction | undefined | false;
|
|
4621
4511
|
}
|
|
4622
4512
|
|
|
4623
|
-
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,
|
|
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 };
|