ai 5.0.0-alpha.8 → 5.0.0-beta.1

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.
@@ -1,8 +1,6 @@
1
- import { ToolResultContent, Schema } from '@ai-sdk/provider-utils';
1
+ import { ModelMessage, Tool } from '@ai-sdk/provider-utils';
2
2
  export { convertAsyncIteratorToReadableStream } from '@ai-sdk/provider-utils';
3
- import { SharedV2ProviderOptions, LanguageModelV2Prompt, JSONValue, JSONObject, LanguageModelV2FunctionTool, LanguageModelV2ProviderDefinedTool, LanguageModelV2ToolChoice } from '@ai-sdk/provider';
4
- import * as z3 from 'zod/v3';
5
- import * as z4 from 'zod/v4/core';
3
+ import { LanguageModelV2Prompt, LanguageModelV2FunctionTool, LanguageModelV2ProviderDefinedTool, LanguageModelV2ToolChoice } from '@ai-sdk/provider';
6
4
 
7
5
  declare function download({ url }: {
8
6
  url: URL;
@@ -11,237 +9,6 @@ declare function download({ url }: {
11
9
  mediaType: string | undefined;
12
10
  }>;
13
11
 
14
- /**
15
- Additional provider-specific options.
16
-
17
- They are passed through to the provider from the AI SDK and enable
18
- provider-specific functionality that can be fully encapsulated in the provider.
19
- */
20
- type ProviderOptions = SharedV2ProviderOptions;
21
-
22
- /**
23
- Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
24
- */
25
- type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
26
-
27
- /**
28
- Text content part of a prompt. It contains a string of text.
29
- */
30
- interface TextPart {
31
- type: 'text';
32
- /**
33
- The text content.
34
- */
35
- text: string;
36
- /**
37
- Additional provider-specific metadata. They are passed through
38
- to the provider from the AI SDK and enable provider-specific
39
- functionality that can be fully encapsulated in the provider.
40
- */
41
- providerOptions?: ProviderOptions;
42
- }
43
- /**
44
- Image content part of a prompt. It contains an image.
45
- */
46
- interface ImagePart {
47
- type: 'image';
48
- /**
49
- Image data. Can either be:
50
-
51
- - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
52
- - URL: a URL that points to the image
53
- */
54
- image: DataContent | URL;
55
- /**
56
- Optional IANA media type of the image.
57
-
58
- @see https://www.iana.org/assignments/media-types/media-types.xhtml
59
- */
60
- mediaType?: string;
61
- /**
62
- Additional provider-specific metadata. They are passed through
63
- to the provider from the AI SDK and enable provider-specific
64
- functionality that can be fully encapsulated in the provider.
65
- */
66
- providerOptions?: ProviderOptions;
67
- }
68
- /**
69
- File content part of a prompt. It contains a file.
70
- */
71
- interface FilePart {
72
- type: 'file';
73
- /**
74
- File data. Can either be:
75
-
76
- - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
77
- - URL: a URL that points to the image
78
- */
79
- data: DataContent | URL;
80
- /**
81
- Optional filename of the file.
82
- */
83
- filename?: string;
84
- /**
85
- IANA media type of the file.
86
-
87
- @see https://www.iana.org/assignments/media-types/media-types.xhtml
88
- */
89
- mediaType: string;
90
- /**
91
- Additional provider-specific metadata. They are passed through
92
- to the provider from the AI SDK and enable provider-specific
93
- functionality that can be fully encapsulated in the provider.
94
- */
95
- providerOptions?: ProviderOptions;
96
- }
97
- /**
98
- * Reasoning content part of a prompt. It contains a reasoning.
99
- */
100
- interface ReasoningPart {
101
- type: 'reasoning';
102
- /**
103
- The reasoning text.
104
- */
105
- text: string;
106
- /**
107
- Additional provider-specific metadata. They are passed through
108
- to the provider from the AI SDK and enable provider-specific
109
- functionality that can be fully encapsulated in the provider.
110
- */
111
- providerOptions?: ProviderOptions;
112
- }
113
- /**
114
- Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
115
- */
116
- interface ToolCallPart {
117
- type: 'tool-call';
118
- /**
119
- ID of the tool call. This ID is used to match the tool call with the tool result.
120
- */
121
- toolCallId: string;
122
- /**
123
- Name of the tool that is being called.
124
- */
125
- toolName: string;
126
- /**
127
- Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
128
- */
129
- args: unknown;
130
- /**
131
- Additional provider-specific metadata. They are passed through
132
- to the provider from the AI SDK and enable provider-specific
133
- functionality that can be fully encapsulated in the provider.
134
- */
135
- providerOptions?: ProviderOptions;
136
- }
137
- /**
138
- Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
139
- */
140
- interface ToolResultPart {
141
- type: 'tool-result';
142
- /**
143
- ID of the tool call that this result is associated with.
144
- */
145
- toolCallId: string;
146
- /**
147
- Name of the tool that generated this result.
148
- */
149
- toolName: string;
150
- /**
151
- Result of the tool call. This is a JSON-serializable object.
152
- */
153
- result: unknown;
154
- /**
155
- Multi-part content of the tool result. Only for tools that support multipart results.
156
- */
157
- experimental_content?: ToolResultContent;
158
- /**
159
- Optional flag if the result is an error or an error message.
160
- */
161
- isError?: boolean;
162
- /**
163
- Additional provider-specific metadata. They are passed through
164
- to the provider from the AI SDK and enable provider-specific
165
- functionality that can be fully encapsulated in the provider.
166
- */
167
- providerOptions?: ProviderOptions;
168
- }
169
-
170
- /**
171
- A system message. It can contain system information.
172
-
173
- Note: using the "system" part of the prompt is strongly preferred
174
- to increase the resilience against prompt injection attacks,
175
- and because not all providers support several system messages.
176
- */
177
- type SystemModelMessage = {
178
- role: 'system';
179
- content: string;
180
- /**
181
- Additional provider-specific metadata. They are passed through
182
- to the provider from the AI SDK and enable provider-specific
183
- functionality that can be fully encapsulated in the provider.
184
- */
185
- providerOptions?: ProviderOptions;
186
- };
187
- /**
188
- A user message. It can contain text or a combination of text and images.
189
- */
190
- type UserModelMessage = {
191
- role: 'user';
192
- content: UserContent;
193
- /**
194
- Additional provider-specific metadata. They are passed through
195
- to the provider from the AI SDK and enable provider-specific
196
- functionality that can be fully encapsulated in the provider.
197
- */
198
- providerOptions?: ProviderOptions;
199
- };
200
- /**
201
- Content of a user message. It can be a string or an array of text and image parts.
202
- */
203
- type UserContent = string | Array<TextPart | ImagePart | FilePart>;
204
- /**
205
- An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
206
- */
207
- type AssistantModelMessage = {
208
- role: 'assistant';
209
- content: AssistantContent;
210
- /**
211
- Additional provider-specific metadata. They are passed through
212
- to the provider from the AI SDK and enable provider-specific
213
- functionality that can be fully encapsulated in the provider.
214
- */
215
- providerOptions?: ProviderOptions;
216
- };
217
- /**
218
- Content of an assistant message.
219
- It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts.
220
- */
221
- type AssistantContent = string | Array<TextPart | FilePart | ReasoningPart | ToolCallPart>;
222
- /**
223
- A tool message. It contains the result of one or more tool calls.
224
- */
225
- type ToolModelMessage = {
226
- role: 'tool';
227
- content: ToolContent;
228
- /**
229
- Additional provider-specific metadata. They are passed through
230
- to the provider from the AI SDK and enable provider-specific
231
- functionality that can be fully encapsulated in the provider.
232
- */
233
- providerOptions?: ProviderOptions;
234
- };
235
- /**
236
- Content of a tool message. It is an array of tool result parts.
237
- */
238
- type ToolContent = Array<ToolResultPart>;
239
- /**
240
- A message that can be used in the `messages` field of a prompt.
241
- It can be a user message, an assistant message, or a tool message.
242
- */
243
- type ModelMessage = SystemModelMessage | UserModelMessage | AssistantModelMessage | ToolModelMessage;
244
-
245
12
  /**
246
13
  Prompt part of the AI function options.
247
14
  It contains a system message, a simple text prompt, or a list of messages.
@@ -367,77 +134,7 @@ type ToolChoice<TOOLS extends Record<string, unknown>> = 'auto' | 'none' | 'requ
367
134
  toolName: Extract<keyof TOOLS, string>;
368
135
  };
369
136
 
370
- type ToolParameters<T = JSONObject> = z4.$ZodType<T> | z3.Schema<T> | Schema<T>;
371
- interface ToolExecutionOptions {
372
- /**
373
- * The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
374
- */
375
- toolCallId: string;
376
- /**
377
- * Messages that were sent to the language model to initiate the response that contained the tool call.
378
- * The messages **do not** include the system prompt nor the assistant response that contained the tool call.
379
- */
380
- messages: ModelMessage[];
381
- /**
382
- * An optional abort signal that indicates that the overall operation should be aborted.
383
- */
384
- abortSignal?: AbortSignal;
385
- }
386
- type NeverOptional<N, T> = 0 extends 1 & N ? Partial<T> : [N] extends [never] ? Partial<Record<keyof T, undefined>> : T;
387
- /**
388
- A tool contains the description and the schema of the input that the tool expects.
389
- This enables the language model to generate the input.
390
-
391
- The tool can also contain an optional execute function for the actual execution function of the tool.
392
- */
393
- type Tool<PARAMETERS extends JSONValue | unknown | never = any, RESULT = any> = {
394
- /**
395
- An optional description of what the tool does.
396
- Will be used by the language model to decide whether to use the tool.
397
- Not used for provider-defined tools.
398
- */
399
- description?: string;
400
- } & NeverOptional<PARAMETERS, {
401
- /**
402
- The schema of the input that the tool expects. The language model will use this to generate the input.
403
- It is also used to validate the output of the language model.
404
- Use descriptions to make the input understandable for the language model.
405
- */
406
- parameters: ToolParameters<PARAMETERS>;
407
- }> & NeverOptional<RESULT, {
408
- /**
409
- An async function that is called with the arguments from the tool call and produces a result.
410
- If not provided, the tool will not be executed automatically.
411
-
412
- @args is the input of the tool call.
413
- @options.abortSignal is a signal that can be used to abort the tool call.
414
- */
415
- execute: (args: [PARAMETERS] extends [never] ? undefined : PARAMETERS, options: ToolExecutionOptions) => PromiseLike<RESULT>;
416
- /**
417
- Optional conversion function that maps the tool result to multi-part tool content for LLMs.
418
- */
419
- experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
420
- }> & ({
421
- /**
422
- Function tool.
423
- */
424
- type?: undefined | 'function';
425
- } | {
426
- /**
427
- Provider-defined tool.
428
- */
429
- type: 'provider-defined';
430
- /**
431
- The ID of the tool. Should follow the format `<provider-name>.<tool-name>`.
432
- */
433
- id: `${string}.${string}`;
434
- /**
435
- The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
436
- */
437
- args: Record<string, unknown>;
438
- });
439
-
440
- type ToolSet = Record<string, (Tool<never, never> | Tool<any, any> | Tool<any, never> | Tool<never, any>) & Pick<Tool<any, any>, 'execute'>>;
137
+ type ToolSet = Record<string, (Tool<never, never> | Tool<any, any> | Tool<any, never> | Tool<never, any>) & Pick<Tool<any, any>, 'execute' | 'onInputAvailable' | 'onInputStart' | 'onInputDelta'>>;
441
138
 
442
139
  declare function prepareToolsAndToolChoice<TOOLS extends ToolSet>({ tools, toolChoice, activeTools, }: {
443
140
  tools: TOOLS | undefined;
@@ -1,8 +1,6 @@
1
- import { ToolResultContent, Schema } from '@ai-sdk/provider-utils';
1
+ import { ModelMessage, Tool } from '@ai-sdk/provider-utils';
2
2
  export { convertAsyncIteratorToReadableStream } from '@ai-sdk/provider-utils';
3
- import { SharedV2ProviderOptions, LanguageModelV2Prompt, JSONValue, JSONObject, LanguageModelV2FunctionTool, LanguageModelV2ProviderDefinedTool, LanguageModelV2ToolChoice } from '@ai-sdk/provider';
4
- import * as z3 from 'zod/v3';
5
- import * as z4 from 'zod/v4/core';
3
+ import { LanguageModelV2Prompt, LanguageModelV2FunctionTool, LanguageModelV2ProviderDefinedTool, LanguageModelV2ToolChoice } from '@ai-sdk/provider';
6
4
 
7
5
  declare function download({ url }: {
8
6
  url: URL;
@@ -11,237 +9,6 @@ declare function download({ url }: {
11
9
  mediaType: string | undefined;
12
10
  }>;
13
11
 
14
- /**
15
- Additional provider-specific options.
16
-
17
- They are passed through to the provider from the AI SDK and enable
18
- provider-specific functionality that can be fully encapsulated in the provider.
19
- */
20
- type ProviderOptions = SharedV2ProviderOptions;
21
-
22
- /**
23
- Data content. Can either be a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer.
24
- */
25
- type DataContent = string | Uint8Array | ArrayBuffer | Buffer;
26
-
27
- /**
28
- Text content part of a prompt. It contains a string of text.
29
- */
30
- interface TextPart {
31
- type: 'text';
32
- /**
33
- The text content.
34
- */
35
- text: string;
36
- /**
37
- Additional provider-specific metadata. They are passed through
38
- to the provider from the AI SDK and enable provider-specific
39
- functionality that can be fully encapsulated in the provider.
40
- */
41
- providerOptions?: ProviderOptions;
42
- }
43
- /**
44
- Image content part of a prompt. It contains an image.
45
- */
46
- interface ImagePart {
47
- type: 'image';
48
- /**
49
- Image data. Can either be:
50
-
51
- - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
52
- - URL: a URL that points to the image
53
- */
54
- image: DataContent | URL;
55
- /**
56
- Optional IANA media type of the image.
57
-
58
- @see https://www.iana.org/assignments/media-types/media-types.xhtml
59
- */
60
- mediaType?: string;
61
- /**
62
- Additional provider-specific metadata. They are passed through
63
- to the provider from the AI SDK and enable provider-specific
64
- functionality that can be fully encapsulated in the provider.
65
- */
66
- providerOptions?: ProviderOptions;
67
- }
68
- /**
69
- File content part of a prompt. It contains a file.
70
- */
71
- interface FilePart {
72
- type: 'file';
73
- /**
74
- File data. Can either be:
75
-
76
- - data: a base64-encoded string, a Uint8Array, an ArrayBuffer, or a Buffer
77
- - URL: a URL that points to the image
78
- */
79
- data: DataContent | URL;
80
- /**
81
- Optional filename of the file.
82
- */
83
- filename?: string;
84
- /**
85
- IANA media type of the file.
86
-
87
- @see https://www.iana.org/assignments/media-types/media-types.xhtml
88
- */
89
- mediaType: string;
90
- /**
91
- Additional provider-specific metadata. They are passed through
92
- to the provider from the AI SDK and enable provider-specific
93
- functionality that can be fully encapsulated in the provider.
94
- */
95
- providerOptions?: ProviderOptions;
96
- }
97
- /**
98
- * Reasoning content part of a prompt. It contains a reasoning.
99
- */
100
- interface ReasoningPart {
101
- type: 'reasoning';
102
- /**
103
- The reasoning text.
104
- */
105
- text: string;
106
- /**
107
- Additional provider-specific metadata. They are passed through
108
- to the provider from the AI SDK and enable provider-specific
109
- functionality that can be fully encapsulated in the provider.
110
- */
111
- providerOptions?: ProviderOptions;
112
- }
113
- /**
114
- Tool call content part of a prompt. It contains a tool call (usually generated by the AI model).
115
- */
116
- interface ToolCallPart {
117
- type: 'tool-call';
118
- /**
119
- ID of the tool call. This ID is used to match the tool call with the tool result.
120
- */
121
- toolCallId: string;
122
- /**
123
- Name of the tool that is being called.
124
- */
125
- toolName: string;
126
- /**
127
- Arguments of the tool call. This is a JSON-serializable object that matches the tool's input schema.
128
- */
129
- args: unknown;
130
- /**
131
- Additional provider-specific metadata. They are passed through
132
- to the provider from the AI SDK and enable provider-specific
133
- functionality that can be fully encapsulated in the provider.
134
- */
135
- providerOptions?: ProviderOptions;
136
- }
137
- /**
138
- Tool result content part of a prompt. It contains the result of the tool call with the matching ID.
139
- */
140
- interface ToolResultPart {
141
- type: 'tool-result';
142
- /**
143
- ID of the tool call that this result is associated with.
144
- */
145
- toolCallId: string;
146
- /**
147
- Name of the tool that generated this result.
148
- */
149
- toolName: string;
150
- /**
151
- Result of the tool call. This is a JSON-serializable object.
152
- */
153
- result: unknown;
154
- /**
155
- Multi-part content of the tool result. Only for tools that support multipart results.
156
- */
157
- experimental_content?: ToolResultContent;
158
- /**
159
- Optional flag if the result is an error or an error message.
160
- */
161
- isError?: boolean;
162
- /**
163
- Additional provider-specific metadata. They are passed through
164
- to the provider from the AI SDK and enable provider-specific
165
- functionality that can be fully encapsulated in the provider.
166
- */
167
- providerOptions?: ProviderOptions;
168
- }
169
-
170
- /**
171
- A system message. It can contain system information.
172
-
173
- Note: using the "system" part of the prompt is strongly preferred
174
- to increase the resilience against prompt injection attacks,
175
- and because not all providers support several system messages.
176
- */
177
- type SystemModelMessage = {
178
- role: 'system';
179
- content: string;
180
- /**
181
- Additional provider-specific metadata. They are passed through
182
- to the provider from the AI SDK and enable provider-specific
183
- functionality that can be fully encapsulated in the provider.
184
- */
185
- providerOptions?: ProviderOptions;
186
- };
187
- /**
188
- A user message. It can contain text or a combination of text and images.
189
- */
190
- type UserModelMessage = {
191
- role: 'user';
192
- content: UserContent;
193
- /**
194
- Additional provider-specific metadata. They are passed through
195
- to the provider from the AI SDK and enable provider-specific
196
- functionality that can be fully encapsulated in the provider.
197
- */
198
- providerOptions?: ProviderOptions;
199
- };
200
- /**
201
- Content of a user message. It can be a string or an array of text and image parts.
202
- */
203
- type UserContent = string | Array<TextPart | ImagePart | FilePart>;
204
- /**
205
- An assistant message. It can contain text, tool calls, or a combination of text and tool calls.
206
- */
207
- type AssistantModelMessage = {
208
- role: 'assistant';
209
- content: AssistantContent;
210
- /**
211
- Additional provider-specific metadata. They are passed through
212
- to the provider from the AI SDK and enable provider-specific
213
- functionality that can be fully encapsulated in the provider.
214
- */
215
- providerOptions?: ProviderOptions;
216
- };
217
- /**
218
- Content of an assistant message.
219
- It can be a string or an array of text, image, reasoning, redacted reasoning, and tool call parts.
220
- */
221
- type AssistantContent = string | Array<TextPart | FilePart | ReasoningPart | ToolCallPart>;
222
- /**
223
- A tool message. It contains the result of one or more tool calls.
224
- */
225
- type ToolModelMessage = {
226
- role: 'tool';
227
- content: ToolContent;
228
- /**
229
- Additional provider-specific metadata. They are passed through
230
- to the provider from the AI SDK and enable provider-specific
231
- functionality that can be fully encapsulated in the provider.
232
- */
233
- providerOptions?: ProviderOptions;
234
- };
235
- /**
236
- Content of a tool message. It is an array of tool result parts.
237
- */
238
- type ToolContent = Array<ToolResultPart>;
239
- /**
240
- A message that can be used in the `messages` field of a prompt.
241
- It can be a user message, an assistant message, or a tool message.
242
- */
243
- type ModelMessage = SystemModelMessage | UserModelMessage | AssistantModelMessage | ToolModelMessage;
244
-
245
12
  /**
246
13
  Prompt part of the AI function options.
247
14
  It contains a system message, a simple text prompt, or a list of messages.
@@ -367,77 +134,7 @@ type ToolChoice<TOOLS extends Record<string, unknown>> = 'auto' | 'none' | 'requ
367
134
  toolName: Extract<keyof TOOLS, string>;
368
135
  };
369
136
 
370
- type ToolParameters<T = JSONObject> = z4.$ZodType<T> | z3.Schema<T> | Schema<T>;
371
- interface ToolExecutionOptions {
372
- /**
373
- * The ID of the tool call. You can use it e.g. when sending tool-call related information with stream data.
374
- */
375
- toolCallId: string;
376
- /**
377
- * Messages that were sent to the language model to initiate the response that contained the tool call.
378
- * The messages **do not** include the system prompt nor the assistant response that contained the tool call.
379
- */
380
- messages: ModelMessage[];
381
- /**
382
- * An optional abort signal that indicates that the overall operation should be aborted.
383
- */
384
- abortSignal?: AbortSignal;
385
- }
386
- type NeverOptional<N, T> = 0 extends 1 & N ? Partial<T> : [N] extends [never] ? Partial<Record<keyof T, undefined>> : T;
387
- /**
388
- A tool contains the description and the schema of the input that the tool expects.
389
- This enables the language model to generate the input.
390
-
391
- The tool can also contain an optional execute function for the actual execution function of the tool.
392
- */
393
- type Tool<PARAMETERS extends JSONValue | unknown | never = any, RESULT = any> = {
394
- /**
395
- An optional description of what the tool does.
396
- Will be used by the language model to decide whether to use the tool.
397
- Not used for provider-defined tools.
398
- */
399
- description?: string;
400
- } & NeverOptional<PARAMETERS, {
401
- /**
402
- The schema of the input that the tool expects. The language model will use this to generate the input.
403
- It is also used to validate the output of the language model.
404
- Use descriptions to make the input understandable for the language model.
405
- */
406
- parameters: ToolParameters<PARAMETERS>;
407
- }> & NeverOptional<RESULT, {
408
- /**
409
- An async function that is called with the arguments from the tool call and produces a result.
410
- If not provided, the tool will not be executed automatically.
411
-
412
- @args is the input of the tool call.
413
- @options.abortSignal is a signal that can be used to abort the tool call.
414
- */
415
- execute: (args: [PARAMETERS] extends [never] ? undefined : PARAMETERS, options: ToolExecutionOptions) => PromiseLike<RESULT>;
416
- /**
417
- Optional conversion function that maps the tool result to multi-part tool content for LLMs.
418
- */
419
- experimental_toToolResultContent?: (result: RESULT) => ToolResultContent;
420
- }> & ({
421
- /**
422
- Function tool.
423
- */
424
- type?: undefined | 'function';
425
- } | {
426
- /**
427
- Provider-defined tool.
428
- */
429
- type: 'provider-defined';
430
- /**
431
- The ID of the tool. Should follow the format `<provider-name>.<tool-name>`.
432
- */
433
- id: `${string}.${string}`;
434
- /**
435
- The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
436
- */
437
- args: Record<string, unknown>;
438
- });
439
-
440
- type ToolSet = Record<string, (Tool<never, never> | Tool<any, any> | Tool<any, never> | Tool<never, any>) & Pick<Tool<any, any>, 'execute'>>;
137
+ type ToolSet = Record<string, (Tool<never, never> | Tool<any, any> | Tool<any, never> | Tool<never, any>) & Pick<Tool<any, any>, 'execute' | 'onInputAvailable' | 'onInputStart' | 'onInputDelta'>>;
441
138
 
442
139
  declare function prepareToolsAndToolChoice<TOOLS extends ToolSet>({ tools, toolChoice, activeTools, }: {
443
140
  tools: TOOLS | undefined;