@ai-sdk/provider-utils 4.0.26 → 4.0.27
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 +6 -0
- package/dist/index.d.mts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/types/tool.ts +6 -6
package/package.json
CHANGED
package/src/types/tool.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONValue,
|
|
1
|
+
import type { JSONValue, JSONObject } from '@ai-sdk/provider';
|
|
2
2
|
import type { FlexibleSchema } from '../schema';
|
|
3
3
|
import type { ToolResultOutput } from './content-part';
|
|
4
4
|
import type { ModelMessage } from './model-message';
|
|
@@ -133,11 +133,11 @@ export type Tool<
|
|
|
133
133
|
*
|
|
134
134
|
* Unlike `providerOptions`, this metadata is not sent to the language
|
|
135
135
|
* model. Instead, it is propagated onto the resulting tool call's
|
|
136
|
-
* `
|
|
137
|
-
*
|
|
138
|
-
*
|
|
136
|
+
* `toolMetadata` so consumers can read it from tool call / result parts
|
|
137
|
+
* and UI message parts. This is useful for sources of dynamic tools (e.g.
|
|
138
|
+
* an MCP server) to identify themselves.
|
|
139
139
|
*/
|
|
140
|
-
|
|
140
|
+
metadata?: JSONObject;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* The schema of the input that the tool expects.
|
|
@@ -299,7 +299,7 @@ export function dynamicTool(tool: {
|
|
|
299
299
|
description?: string;
|
|
300
300
|
title?: string;
|
|
301
301
|
providerOptions?: ProviderOptions;
|
|
302
|
-
|
|
302
|
+
metadata?: JSONObject;
|
|
303
303
|
inputSchema: FlexibleSchema<unknown>;
|
|
304
304
|
execute: ToolExecuteFunction<unknown, unknown>;
|
|
305
305
|
|