@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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 4.0.27
4
+
5
+ ### Patch Changes
6
+
7
+ - f591416: feat(ai): add toolMetadata for tool specific metdata
8
+
3
9
  ## 4.0.26
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { LanguageModelV3FunctionTool, LanguageModelV3ProviderTool, ImageModelV3File, AISDKError, JSONSchema7, JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, SharedV3ProviderOptions, SharedV3ProviderMetadata, TypeValidationContext } from '@ai-sdk/provider';
1
+ import { LanguageModelV3FunctionTool, LanguageModelV3ProviderTool, ImageModelV3File, AISDKError, JSONSchema7, JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, SharedV3ProviderOptions, JSONObject, TypeValidationContext } from '@ai-sdk/provider';
2
2
  import { StandardSchemaV1, StandardJSONSchemaV1 } from '@standard-schema/spec';
3
3
  export * from '@standard-schema/spec';
4
4
  import * as z3 from 'zod/v3';
@@ -1074,11 +1074,11 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
1074
1074
  *
1075
1075
  * Unlike `providerOptions`, this metadata is not sent to the language
1076
1076
  * model. Instead, it is propagated onto the resulting tool call's
1077
- * `providerMetadata` so consumers can read it from tool call / result
1078
- * parts and UI message parts. This is useful for sources of dynamic
1079
- * tools (e.g. an MCP server) to identify themselves.
1077
+ * `toolMetadata` so consumers can read it from tool call / result parts
1078
+ * and UI message parts. This is useful for sources of dynamic tools (e.g.
1079
+ * an MCP server) to identify themselves.
1080
1080
  */
1081
- providerMetadata?: SharedV3ProviderMetadata;
1081
+ metadata?: JSONObject;
1082
1082
  /**
1083
1083
  * The schema of the input that the tool expects.
1084
1084
  * The language model will use this to generate the input.
@@ -1206,7 +1206,7 @@ declare function dynamicTool(tool: {
1206
1206
  description?: string;
1207
1207
  title?: string;
1208
1208
  providerOptions?: ProviderOptions;
1209
- providerMetadata?: SharedV3ProviderMetadata;
1209
+ metadata?: JSONObject;
1210
1210
  inputSchema: FlexibleSchema<unknown>;
1211
1211
  execute: ToolExecuteFunction<unknown, unknown>;
1212
1212
  /**
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { LanguageModelV3FunctionTool, LanguageModelV3ProviderTool, ImageModelV3File, AISDKError, JSONSchema7, JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, SharedV3ProviderOptions, SharedV3ProviderMetadata, TypeValidationContext } from '@ai-sdk/provider';
1
+ import { LanguageModelV3FunctionTool, LanguageModelV3ProviderTool, ImageModelV3File, AISDKError, JSONSchema7, JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, SharedV3ProviderOptions, JSONObject, TypeValidationContext } from '@ai-sdk/provider';
2
2
  import { StandardSchemaV1, StandardJSONSchemaV1 } from '@standard-schema/spec';
3
3
  export * from '@standard-schema/spec';
4
4
  import * as z3 from 'zod/v3';
@@ -1074,11 +1074,11 @@ type Tool<INPUT extends JSONValue | unknown | never = any, OUTPUT extends JSONVa
1074
1074
  *
1075
1075
  * Unlike `providerOptions`, this metadata is not sent to the language
1076
1076
  * model. Instead, it is propagated onto the resulting tool call's
1077
- * `providerMetadata` so consumers can read it from tool call / result
1078
- * parts and UI message parts. This is useful for sources of dynamic
1079
- * tools (e.g. an MCP server) to identify themselves.
1077
+ * `toolMetadata` so consumers can read it from tool call / result parts
1078
+ * and UI message parts. This is useful for sources of dynamic tools (e.g.
1079
+ * an MCP server) to identify themselves.
1080
1080
  */
1081
- providerMetadata?: SharedV3ProviderMetadata;
1081
+ metadata?: JSONObject;
1082
1082
  /**
1083
1083
  * The schema of the input that the tool expects.
1084
1084
  * The language model will use this to generate the input.
@@ -1206,7 +1206,7 @@ declare function dynamicTool(tool: {
1206
1206
  description?: string;
1207
1207
  title?: string;
1208
1208
  providerOptions?: ProviderOptions;
1209
- providerMetadata?: SharedV3ProviderMetadata;
1209
+ metadata?: JSONObject;
1210
1210
  inputSchema: FlexibleSchema<unknown>;
1211
1211
  execute: ToolExecuteFunction<unknown, unknown>;
1212
1212
  /**
package/dist/index.js CHANGED
@@ -678,7 +678,7 @@ function withUserAgentSuffix(headers, ...userAgentSuffixParts) {
678
678
  }
679
679
 
680
680
  // src/version.ts
681
- var VERSION = true ? "4.0.26" : "0.0.0-test";
681
+ var VERSION = true ? "4.0.27" : "0.0.0-test";
682
682
 
683
683
  // src/get-from-api.ts
684
684
  var getOriginalFetch = () => globalThis.fetch;