@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/CHANGELOG.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LanguageModelV3FunctionTool, LanguageModelV3ProviderTool, ImageModelV3File, AISDKError, JSONSchema7, JSONParseError, TypeValidationError, JSONValue, APICallError, LanguageModelV3Prompt, SharedV3ProviderOptions,
|
|
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
|
-
* `
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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,
|
|
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
|
-
* `
|
|
1078
|
-
*
|
|
1079
|
-
*
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
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;
|