ai 7.0.57 → 7.0.58
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 +22 -0
- package/dist/index.d.ts +9 -8
- package/dist/index.js +563 -534
- package/dist/index.js.map +1 -1
- package/dist/internal/index.js +183 -152
- package/dist/internal/index.js.map +1 -1
- package/docs/03-ai-sdk-core/38-video-generation.mdx +16 -0
- package/docs/03-ai-sdk-harnesses/05-harness-adapters.mdx +2 -0
- package/docs/07-reference/01-ai-sdk-core/13-generate-video.mdx +1 -1
- package/package.json +4 -4
- package/src/agent/tool-loop-agent.ts +2 -2
- package/src/generate-video/generate-video.ts +4 -3
- package/src/prompt/content-part.ts +18 -17
- package/src/prompt/message.ts +10 -12
- package/src/prompt/standardize-prompt.ts +1 -1
- package/src/types/json-value.ts +2 -2
- package/src/types/provider-metadata.ts +2 -2
- package/src/ui/validate-ui-messages.ts +2 -2
- package/src/ui-message-stream/ui-message-chunks.ts +2 -2
- package/src/util/zod.ts +43 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 7.0.58
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 72ad23f: Respect ToolLoopAgent timeouts configured in agent settings.
|
|
8
|
+
- ad6a650: feat(video): allow `aspectRatio: 'adaptive'` on `generateVideo`
|
|
9
|
+
|
|
10
|
+
Some video models derive the output ratio from the input and reject explicit
|
|
11
|
+
`{width}:{height}` values — BytePlus Seedance 2.5 does this for first-frame,
|
|
12
|
+
first-and-last-frame, editing, and extension tasks. `aspectRatio` on
|
|
13
|
+
`VideoModelV3CallOptions`, `VideoModelV4CallOptions`, and
|
|
14
|
+
`experimental_generateVideo` is now `` `${number}:${number}` | 'adaptive' ``, so
|
|
15
|
+
those calls no longer need a type assertion. Support is provider-specific.
|
|
16
|
+
|
|
17
|
+
- 81cd026: Reduce bundle size by making internal Zod v4 imports tree-shakeable.
|
|
18
|
+
- Updated dependencies [c477556]
|
|
19
|
+
- Updated dependencies [ad6a650]
|
|
20
|
+
- Updated dependencies [81cd026]
|
|
21
|
+
- @ai-sdk/gateway@4.0.46
|
|
22
|
+
- @ai-sdk/provider@4.0.7
|
|
23
|
+
- @ai-sdk/provider-utils@5.0.25
|
|
24
|
+
|
|
3
25
|
## 7.0.57
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
package/dist/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { ModelMessage, AssistantModelMessage, ToolModelMessage, ProviderOptions,
|
|
|
7
7
|
export { AssistantContent, AssistantModelMessage, DataContent, DownloadError, Experimental_SandboxProcess, Experimental_SandboxSession, Experimental_ToolCallerTool, FilePart, FlexibleSchema, IdGenerator, ImagePart, InferSchema, InferToolInput, InferToolOutput, ModelMessage, Schema, SystemModelMessage, TextPart, Tool, ToolApprovalRequest, ToolApprovalResponse, ToolCallPart, ToolContent, ToolExecuteFunction, ToolExecutionOptions, ToolModelMessage, ToolResultPart, ToolSet, UserContent, UserModelMessage, asSchema, createIdGenerator, dynamicTool, experimental_toolCaller, generateId, jsonSchema, parseJsonEventStream, tool, zodSchema } from '@ai-sdk/provider-utils';
|
|
8
8
|
import { ServerResponse } from 'node:http';
|
|
9
9
|
import { ServerResponse as ServerResponse$1 } from 'http';
|
|
10
|
-
import {
|
|
10
|
+
import { ZodType } from 'zod/v4';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Embedding model that is used by the AI SDK.
|
|
@@ -659,11 +659,11 @@ type RequestOptions<TOOLS extends ToolSet = ToolSet> = {
|
|
|
659
659
|
timeout?: TimeoutConfiguration<TOOLS>;
|
|
660
660
|
};
|
|
661
661
|
|
|
662
|
-
declare const systemModelMessageSchema:
|
|
663
|
-
declare const userModelMessageSchema:
|
|
664
|
-
declare const assistantModelMessageSchema:
|
|
665
|
-
declare const toolModelMessageSchema:
|
|
666
|
-
declare const modelMessageSchema:
|
|
662
|
+
declare const systemModelMessageSchema: ZodType<SystemModelMessage>;
|
|
663
|
+
declare const userModelMessageSchema: ZodType<UserModelMessage>;
|
|
664
|
+
declare const assistantModelMessageSchema: ZodType<AssistantModelMessage>;
|
|
665
|
+
declare const toolModelMessageSchema: ZodType<ToolModelMessage>;
|
|
666
|
+
declare const modelMessageSchema: ZodType<ModelMessage>;
|
|
667
667
|
|
|
668
668
|
/**
|
|
669
669
|
* Instructions to include in the prompt. Can be used with `prompt` or `messages`.
|
|
@@ -8057,9 +8057,10 @@ declare function experimental_generateVideo({ model: modelArg, prompt: promptArg
|
|
|
8057
8057
|
*/
|
|
8058
8058
|
maxVideosPerCall?: number;
|
|
8059
8059
|
/**
|
|
8060
|
-
* Aspect ratio of the videos to generate. Must have the format
|
|
8060
|
+
* Aspect ratio of the videos to generate. Must have the format
|
|
8061
|
+
* `{width}:{height}`, or `'adaptive'` to inherit the ratio from the input media.
|
|
8061
8062
|
*/
|
|
8062
|
-
aspectRatio?: `${number}:${number}
|
|
8063
|
+
aspectRatio?: `${number}:${number}` | 'adaptive';
|
|
8063
8064
|
/**
|
|
8064
8065
|
* Resolution of the videos to generate. Must have the format `{width}x${height}`.
|
|
8065
8066
|
*/
|