@ai-sdk/provider-utils 5.0.0-beta.29 → 5.0.0-beta.30
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.ts +11 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types/tool.ts +12 -1
package/package.json
CHANGED
package/src/types/tool.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { JSONValue } from '@ai-sdk/provider';
|
|
1
|
+
import type { JSONValue, SharedV4ProviderMetadata } from '@ai-sdk/provider';
|
|
2
2
|
import type { FlexibleSchema } from '../schema';
|
|
3
3
|
import type { ToolResultOutput } from './content-part';
|
|
4
4
|
import type { Context } from './context';
|
|
@@ -69,6 +69,17 @@ type BaseTool<
|
|
|
69
69
|
*/
|
|
70
70
|
providerOptions?: ProviderOptions;
|
|
71
71
|
|
|
72
|
+
/**
|
|
73
|
+
* Optional metadata about the tool itself (e.g. its source).
|
|
74
|
+
*
|
|
75
|
+
* Unlike `providerOptions`, this metadata is not sent to the language
|
|
76
|
+
* model. Instead, it is propagated onto the resulting tool call's
|
|
77
|
+
* `providerMetadata` so consumers can read it from tool call / result
|
|
78
|
+
* parts and UI message parts. This is useful for sources of dynamic
|
|
79
|
+
* tools (e.g. an MCP server) to identify themselves.
|
|
80
|
+
*/
|
|
81
|
+
providerMetadata?: SharedV4ProviderMetadata;
|
|
82
|
+
|
|
72
83
|
/**
|
|
73
84
|
* The schema of the input that the tool expects.
|
|
74
85
|
* The language model will use this to generate the input.
|