ai 6.0.0-beta.40 → 6.0.0-beta.42
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 +16 -0
- package/dist/index.d.mts +11 -11
- package/dist/index.d.ts +11 -11
- package/dist/index.js +446 -456
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -34
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +100 -110
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +9 -9
- package/dist/internal/index.mjs.map +1 -1
- package/dist/mcp-stdio/index.d.mts +1 -1
- package/dist/mcp-stdio/index.d.ts +1 -1
- package/dist/mcp-stdio/index.js +71 -81
- package/dist/mcp-stdio/index.js.map +1 -1
- package/dist/mcp-stdio/index.mjs +2 -2
- package/dist/mcp-stdio/index.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.0-beta.42
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [6306603]
|
|
8
|
+
- @ai-sdk/provider-utils@4.0.0-beta.16
|
|
9
|
+
- @ai-sdk/gateway@2.0.0-beta.29
|
|
10
|
+
|
|
11
|
+
## 6.0.0-beta.41
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies [f0b2157]
|
|
16
|
+
- @ai-sdk/gateway@2.0.0-beta.28
|
|
17
|
+
- @ai-sdk/provider-utils@4.0.0-beta.15
|
|
18
|
+
|
|
3
19
|
## 6.0.0-beta.40
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createGateway, gateway } from '@ai-sdk/gateway';
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
|
-
import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, ModelMessage, FlexibleSchema, InferSchema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, DataContent,
|
|
3
|
+
import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, ModelMessage, FlexibleSchema, InferSchema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, DataContent, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, FlexibleSchema, IdGenerator, ImagePart, InferSchema, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, parseJsonEventStream, tool, zodSchema } from '@ai-sdk/provider-utils';
|
|
5
5
|
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
6
6
|
import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError, JSONObject } from '@ai-sdk/provider';
|
|
@@ -8,7 +8,7 @@ export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, I
|
|
|
8
8
|
import { ServerResponse } from 'node:http';
|
|
9
9
|
import { AttributeValue, Tracer } from '@opentelemetry/api';
|
|
10
10
|
import { ServerResponse as ServerResponse$1 } from 'http';
|
|
11
|
-
import
|
|
11
|
+
import { z } from 'zod/v4';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
Embedding model that is used by the AI SDK Core functions.
|
|
@@ -1690,7 +1690,7 @@ type InferUIMessageToolCall<UI_MESSAGE extends UIMessage> = ValueOf<{
|
|
|
1690
1690
|
dynamic: true;
|
|
1691
1691
|
});
|
|
1692
1692
|
|
|
1693
|
-
declare const uiMessageChunkSchema: _ai_sdk_provider_utils.
|
|
1693
|
+
declare const uiMessageChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1694
1694
|
type: "text-start";
|
|
1695
1695
|
id: string;
|
|
1696
1696
|
providerMetadata?: _ai_sdk_provider.SharedV3ProviderMetadata | undefined;
|
|
@@ -4303,12 +4303,12 @@ type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESSAGE, 'id' | 'ro
|
|
|
4303
4303
|
id?: UI_MESSAGE['id'];
|
|
4304
4304
|
role?: UI_MESSAGE['role'];
|
|
4305
4305
|
};
|
|
4306
|
-
type UIDataPartSchemas = Record<string,
|
|
4306
|
+
type UIDataPartSchemas = Record<string, FlexibleSchema>;
|
|
4307
4307
|
type UIDataTypesToSchemas<T extends UIDataTypes> = {
|
|
4308
|
-
[K in keyof T]:
|
|
4308
|
+
[K in keyof T]: FlexibleSchema<T[K]>;
|
|
4309
4309
|
};
|
|
4310
4310
|
type InferUIDataParts<T extends UIDataPartSchemas> = {
|
|
4311
|
-
[K in keyof T]:
|
|
4311
|
+
[K in keyof T]: InferSchema<T[K]>;
|
|
4312
4312
|
};
|
|
4313
4313
|
type ChatRequestOptions = {
|
|
4314
4314
|
/**
|
|
@@ -4373,7 +4373,7 @@ interface ChatInit<UI_MESSAGE extends UIMessage> {
|
|
|
4373
4373
|
* generated.
|
|
4374
4374
|
*/
|
|
4375
4375
|
id?: string;
|
|
4376
|
-
messageMetadataSchema?:
|
|
4376
|
+
messageMetadataSchema?: FlexibleSchema<InferUIMessageMetadata<UI_MESSAGE>>;
|
|
4377
4377
|
dataPartSchemas?: UIDataTypesToSchemas<InferUIMessageData<UI_MESSAGE>>;
|
|
4378
4378
|
messages?: UI_MESSAGE[];
|
|
4379
4379
|
/**
|
|
@@ -4749,9 +4749,9 @@ type SafeValidateUIMessagesResult<UI_MESSAGE extends UIMessage> = {
|
|
|
4749
4749
|
*/
|
|
4750
4750
|
declare function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({ messages, metadataSchema, dataSchemas, tools, }: {
|
|
4751
4751
|
messages: unknown;
|
|
4752
|
-
metadataSchema?:
|
|
4752
|
+
metadataSchema?: FlexibleSchema<UIMessage['metadata']>;
|
|
4753
4753
|
dataSchemas?: {
|
|
4754
|
-
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?:
|
|
4754
|
+
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?: FlexibleSchema<InferUIMessageData<UI_MESSAGE>[NAME]>;
|
|
4755
4755
|
};
|
|
4756
4756
|
tools?: {
|
|
4757
4757
|
[NAME in keyof InferUIMessageTools<UI_MESSAGE> & string]?: Tool<InferUIMessageTools<UI_MESSAGE>[NAME]['input'], InferUIMessageTools<UI_MESSAGE>[NAME]['output']>;
|
|
@@ -4766,9 +4766,9 @@ declare function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({ messages
|
|
|
4766
4766
|
*/
|
|
4767
4767
|
declare function validateUIMessages<UI_MESSAGE extends UIMessage>({ messages, metadataSchema, dataSchemas, tools, }: {
|
|
4768
4768
|
messages: unknown;
|
|
4769
|
-
metadataSchema?:
|
|
4769
|
+
metadataSchema?: FlexibleSchema<UIMessage['metadata']>;
|
|
4770
4770
|
dataSchemas?: {
|
|
4771
|
-
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?:
|
|
4771
|
+
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?: FlexibleSchema<InferUIMessageData<UI_MESSAGE>[NAME]>;
|
|
4772
4772
|
};
|
|
4773
4773
|
tools?: {
|
|
4774
4774
|
[NAME in keyof InferUIMessageTools<UI_MESSAGE> & string]?: Tool<InferUIMessageTools<UI_MESSAGE>[NAME]['input'], InferUIMessageTools<UI_MESSAGE>[NAME]['output']>;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export { createGateway, gateway } from '@ai-sdk/gateway';
|
|
2
2
|
import * as _ai_sdk_provider_utils from '@ai-sdk/provider-utils';
|
|
3
|
-
import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, ModelMessage, FlexibleSchema, InferSchema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, DataContent,
|
|
3
|
+
import { Tool, InferToolInput, InferToolOutput, AssistantModelMessage, ToolModelMessage, ReasoningPart, ModelMessage, FlexibleSchema, InferSchema, SystemModelMessage, UserModelMessage, ProviderOptions, IdGenerator, ToolCall, DataContent, Resolvable, FetchFunction } from '@ai-sdk/provider-utils';
|
|
4
4
|
export { AssistantContent, AssistantModelMessage, DataContent, FilePart, FlexibleSchema, IdGenerator, ImagePart, InferSchema, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolCallOptions, ToolCallPart, ToolContent, ToolExecuteFunction, ToolModelMessage, ToolResultPart, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, generateId, jsonSchema, parseJsonEventStream, tool, zodSchema } from '@ai-sdk/provider-utils';
|
|
5
5
|
import * as _ai_sdk_provider from '@ai-sdk/provider';
|
|
6
6
|
import { EmbeddingModelV3, EmbeddingModelV2, EmbeddingModelV3Embedding, ImageModelV3, ImageModelV3CallWarning, ImageModelV3ProviderMetadata, JSONValue as JSONValue$1, LanguageModelV3, LanguageModelV2, LanguageModelV3FinishReason, LanguageModelV3CallWarning, LanguageModelV3Source, LanguageModelV3Middleware, SharedV3ProviderMetadata, SpeechModelV3, SpeechModelV3CallWarning, TranscriptionModelV3, TranscriptionModelV3CallWarning, LanguageModelV3Usage, LanguageModelV3CallOptions, AISDKError, LanguageModelV3ToolCall, JSONSchema7, JSONParseError, TypeValidationError, ProviderV3, ProviderV2, NoSuchModelError, JSONObject } from '@ai-sdk/provider';
|
|
@@ -8,7 +8,7 @@ export { AISDKError, APICallError, EmptyResponseBodyError, InvalidPromptError, I
|
|
|
8
8
|
import { ServerResponse } from 'node:http';
|
|
9
9
|
import { AttributeValue, Tracer } from '@opentelemetry/api';
|
|
10
10
|
import { ServerResponse as ServerResponse$1 } from 'http';
|
|
11
|
-
import
|
|
11
|
+
import { z } from 'zod/v4';
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
Embedding model that is used by the AI SDK Core functions.
|
|
@@ -1690,7 +1690,7 @@ type InferUIMessageToolCall<UI_MESSAGE extends UIMessage> = ValueOf<{
|
|
|
1690
1690
|
dynamic: true;
|
|
1691
1691
|
});
|
|
1692
1692
|
|
|
1693
|
-
declare const uiMessageChunkSchema: _ai_sdk_provider_utils.
|
|
1693
|
+
declare const uiMessageChunkSchema: _ai_sdk_provider_utils.LazySchema<{
|
|
1694
1694
|
type: "text-start";
|
|
1695
1695
|
id: string;
|
|
1696
1696
|
providerMetadata?: _ai_sdk_provider.SharedV3ProviderMetadata | undefined;
|
|
@@ -4303,12 +4303,12 @@ type CreateUIMessage<UI_MESSAGE extends UIMessage> = Omit<UI_MESSAGE, 'id' | 'ro
|
|
|
4303
4303
|
id?: UI_MESSAGE['id'];
|
|
4304
4304
|
role?: UI_MESSAGE['role'];
|
|
4305
4305
|
};
|
|
4306
|
-
type UIDataPartSchemas = Record<string,
|
|
4306
|
+
type UIDataPartSchemas = Record<string, FlexibleSchema>;
|
|
4307
4307
|
type UIDataTypesToSchemas<T extends UIDataTypes> = {
|
|
4308
|
-
[K in keyof T]:
|
|
4308
|
+
[K in keyof T]: FlexibleSchema<T[K]>;
|
|
4309
4309
|
};
|
|
4310
4310
|
type InferUIDataParts<T extends UIDataPartSchemas> = {
|
|
4311
|
-
[K in keyof T]:
|
|
4311
|
+
[K in keyof T]: InferSchema<T[K]>;
|
|
4312
4312
|
};
|
|
4313
4313
|
type ChatRequestOptions = {
|
|
4314
4314
|
/**
|
|
@@ -4373,7 +4373,7 @@ interface ChatInit<UI_MESSAGE extends UIMessage> {
|
|
|
4373
4373
|
* generated.
|
|
4374
4374
|
*/
|
|
4375
4375
|
id?: string;
|
|
4376
|
-
messageMetadataSchema?:
|
|
4376
|
+
messageMetadataSchema?: FlexibleSchema<InferUIMessageMetadata<UI_MESSAGE>>;
|
|
4377
4377
|
dataPartSchemas?: UIDataTypesToSchemas<InferUIMessageData<UI_MESSAGE>>;
|
|
4378
4378
|
messages?: UI_MESSAGE[];
|
|
4379
4379
|
/**
|
|
@@ -4749,9 +4749,9 @@ type SafeValidateUIMessagesResult<UI_MESSAGE extends UIMessage> = {
|
|
|
4749
4749
|
*/
|
|
4750
4750
|
declare function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({ messages, metadataSchema, dataSchemas, tools, }: {
|
|
4751
4751
|
messages: unknown;
|
|
4752
|
-
metadataSchema?:
|
|
4752
|
+
metadataSchema?: FlexibleSchema<UIMessage['metadata']>;
|
|
4753
4753
|
dataSchemas?: {
|
|
4754
|
-
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?:
|
|
4754
|
+
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?: FlexibleSchema<InferUIMessageData<UI_MESSAGE>[NAME]>;
|
|
4755
4755
|
};
|
|
4756
4756
|
tools?: {
|
|
4757
4757
|
[NAME in keyof InferUIMessageTools<UI_MESSAGE> & string]?: Tool<InferUIMessageTools<UI_MESSAGE>[NAME]['input'], InferUIMessageTools<UI_MESSAGE>[NAME]['output']>;
|
|
@@ -4766,9 +4766,9 @@ declare function safeValidateUIMessages<UI_MESSAGE extends UIMessage>({ messages
|
|
|
4766
4766
|
*/
|
|
4767
4767
|
declare function validateUIMessages<UI_MESSAGE extends UIMessage>({ messages, metadataSchema, dataSchemas, tools, }: {
|
|
4768
4768
|
messages: unknown;
|
|
4769
|
-
metadataSchema?:
|
|
4769
|
+
metadataSchema?: FlexibleSchema<UIMessage['metadata']>;
|
|
4770
4770
|
dataSchemas?: {
|
|
4771
|
-
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?:
|
|
4771
|
+
[NAME in keyof InferUIMessageData<UI_MESSAGE> & string]?: FlexibleSchema<InferUIMessageData<UI_MESSAGE>[NAME]>;
|
|
4772
4772
|
};
|
|
4773
4773
|
tools?: {
|
|
4774
4774
|
[NAME in keyof InferUIMessageTools<UI_MESSAGE> & string]?: Tool<InferUIMessageTools<UI_MESSAGE>[NAME]['input'], InferUIMessageTools<UI_MESSAGE>[NAME]['output']>;
|