@ai-sdk/provider 3.0.0-beta.6 → 3.0.0-beta.7

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
2
2
 
3
+ ## 3.0.0-beta.7
4
+
5
+ ### Patch Changes
6
+
7
+ - 81d4308: feat: provider-executed dynamic tools
8
+
3
9
  ## 3.0.0-beta.6
4
10
 
5
11
  ### Major Changes
package/dist/index.d.mts CHANGED
@@ -1063,24 +1063,24 @@ IANA media type.
1063
1063
  };
1064
1064
 
1065
1065
  /**
1066
- The configuration of a tool that is defined by the provider.
1066
+ * The configuration of a tool that is defined by the provider.
1067
1067
  */
1068
1068
  type LanguageModelV3ProviderDefinedTool = {
1069
1069
  /**
1070
- The type of the tool (always 'provider-defined').
1070
+ * The type of the tool (always 'provider-defined').
1071
1071
  */
1072
1072
  type: 'provider-defined';
1073
1073
  /**
1074
- The ID of the tool. Should follow the format `<provider-name>.<unique-tool-name>`.
1074
+ * The ID of the tool. Should follow the format `<provider-id>.<unique-tool-name>`.
1075
1075
  */
1076
1076
  id: `${string}.${string}`;
1077
1077
  /**
1078
- The name of the tool that the user must use in the tool set.
1078
+ * The name of the tool that the user must use in the tool set.
1079
1079
  */
1080
1080
  name: string;
1081
1081
  /**
1082
- The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
1083
- */
1082
+ * The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
1083
+ */
1084
1084
  args: Record<string, unknown>;
1085
1085
  };
1086
1086
 
@@ -1337,6 +1337,11 @@ type LanguageModelV3ToolCall = {
1337
1337
  * If this flag is not set or is false, the tool call will be executed by the client.
1338
1338
  */
1339
1339
  providerExecuted?: boolean;
1340
+ /**
1341
+ * Whether the tool is dynamic, i.e. defined at runtime.
1342
+ * For example, MCP (Model Context Protocol) tools that are executed by the provider.
1343
+ */
1344
+ dynamic?: boolean;
1340
1345
  /**
1341
1346
  * Additional provider-specific metadata for the tool call.
1342
1347
  */
@@ -1381,6 +1386,11 @@ type LanguageModelV3ToolResult = {
1381
1386
  * If this flag is not set or is false, the tool result is not preliminary.
1382
1387
  */
1383
1388
  preliminary?: boolean;
1389
+ /**
1390
+ * Whether the tool is dynamic, i.e. defined at runtime.
1391
+ * For example, MCP (Model Context Protocol) tools that are executed by the provider.
1392
+ */
1393
+ dynamic?: boolean;
1384
1394
  /**
1385
1395
  * Additional provider-specific metadata for the tool result.
1386
1396
  */
@@ -1481,6 +1491,7 @@ type LanguageModelV3StreamPart = {
1481
1491
  toolName: string;
1482
1492
  providerMetadata?: SharedV3ProviderMetadata;
1483
1493
  providerExecuted?: boolean;
1494
+ dynamic?: boolean;
1484
1495
  } | {
1485
1496
  type: 'tool-input-delta';
1486
1497
  id: string;
@@ -1517,11 +1528,11 @@ type LanguageModelV3 = {
1517
1528
  */
1518
1529
  readonly specificationVersion: 'v3';
1519
1530
  /**
1520
- Name of the provider for logging purposes.
1531
+ Provider ID.
1521
1532
  */
1522
1533
  readonly provider: string;
1523
1534
  /**
1524
- Provider-specific model ID for logging purposes.
1535
+ Provider-specific model ID.
1525
1536
  */
1526
1537
  readonly modelId: string;
1527
1538
  /**
package/dist/index.d.ts CHANGED
@@ -1063,24 +1063,24 @@ IANA media type.
1063
1063
  };
1064
1064
 
1065
1065
  /**
1066
- The configuration of a tool that is defined by the provider.
1066
+ * The configuration of a tool that is defined by the provider.
1067
1067
  */
1068
1068
  type LanguageModelV3ProviderDefinedTool = {
1069
1069
  /**
1070
- The type of the tool (always 'provider-defined').
1070
+ * The type of the tool (always 'provider-defined').
1071
1071
  */
1072
1072
  type: 'provider-defined';
1073
1073
  /**
1074
- The ID of the tool. Should follow the format `<provider-name>.<unique-tool-name>`.
1074
+ * The ID of the tool. Should follow the format `<provider-id>.<unique-tool-name>`.
1075
1075
  */
1076
1076
  id: `${string}.${string}`;
1077
1077
  /**
1078
- The name of the tool that the user must use in the tool set.
1078
+ * The name of the tool that the user must use in the tool set.
1079
1079
  */
1080
1080
  name: string;
1081
1081
  /**
1082
- The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
1083
- */
1082
+ * The arguments for configuring the tool. Must match the expected arguments defined by the provider for this tool.
1083
+ */
1084
1084
  args: Record<string, unknown>;
1085
1085
  };
1086
1086
 
@@ -1337,6 +1337,11 @@ type LanguageModelV3ToolCall = {
1337
1337
  * If this flag is not set or is false, the tool call will be executed by the client.
1338
1338
  */
1339
1339
  providerExecuted?: boolean;
1340
+ /**
1341
+ * Whether the tool is dynamic, i.e. defined at runtime.
1342
+ * For example, MCP (Model Context Protocol) tools that are executed by the provider.
1343
+ */
1344
+ dynamic?: boolean;
1340
1345
  /**
1341
1346
  * Additional provider-specific metadata for the tool call.
1342
1347
  */
@@ -1381,6 +1386,11 @@ type LanguageModelV3ToolResult = {
1381
1386
  * If this flag is not set or is false, the tool result is not preliminary.
1382
1387
  */
1383
1388
  preliminary?: boolean;
1389
+ /**
1390
+ * Whether the tool is dynamic, i.e. defined at runtime.
1391
+ * For example, MCP (Model Context Protocol) tools that are executed by the provider.
1392
+ */
1393
+ dynamic?: boolean;
1384
1394
  /**
1385
1395
  * Additional provider-specific metadata for the tool result.
1386
1396
  */
@@ -1481,6 +1491,7 @@ type LanguageModelV3StreamPart = {
1481
1491
  toolName: string;
1482
1492
  providerMetadata?: SharedV3ProviderMetadata;
1483
1493
  providerExecuted?: boolean;
1494
+ dynamic?: boolean;
1484
1495
  } | {
1485
1496
  type: 'tool-input-delta';
1486
1497
  id: string;
@@ -1517,11 +1528,11 @@ type LanguageModelV3 = {
1517
1528
  */
1518
1529
  readonly specificationVersion: 'v3';
1519
1530
  /**
1520
- Name of the provider for logging purposes.
1531
+ Provider ID.
1521
1532
  */
1522
1533
  readonly provider: string;
1523
1534
  /**
1524
- Provider-specific model ID for logging purposes.
1535
+ Provider-specific model ID.
1525
1536
  */
1526
1537
  readonly modelId: string;
1527
1538
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/provider",
3
- "version": "3.0.0-beta.6",
3
+ "version": "3.0.0-beta.7",
4
4
  "license": "Apache-2.0",
5
5
  "sideEffects": false,
6
6
  "main": "./dist/index.js",