@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider-utils",
3
- "version": "4.0.26",
3
+ "version": "4.0.27",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",
package/src/types/tool.ts CHANGED
@@ -1,4 +1,4 @@
1
- import type { JSONValue, SharedV3ProviderMetadata } from '@ai-sdk/provider';
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
- * `providerMetadata` so consumers can read it from tool call / result
137
- * parts and UI message parts. This is useful for sources of dynamic
138
- * tools (e.g. an MCP server) to identify themselves.
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
- providerMetadata?: SharedV3ProviderMetadata;
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
- providerMetadata?: SharedV3ProviderMetadata;
302
+ metadata?: JSONObject;
303
303
  inputSchema: FlexibleSchema<unknown>;
304
304
  execute: ToolExecuteFunction<unknown, unknown>;
305
305