@ai-sdk/provider-utils 5.0.0-beta.12 → 5.0.0-beta.15

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,30 @@
1
1
  # @ai-sdk/provider-utils
2
2
 
3
+ ## 5.0.0-beta.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [e311194]
8
+ - @ai-sdk/provider@4.0.0-beta.9
9
+
10
+ ## 5.0.0-beta.14
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies [34bd95d]
15
+ - Updated dependencies [008271d]
16
+ - @ai-sdk/provider@4.0.0-beta.8
17
+
18
+ ## 5.0.0-beta.13
19
+
20
+ ### Major Changes
21
+
22
+ - 7e26e81: chore: rename experimental_context to context
23
+
24
+ ### Patch Changes
25
+
26
+ - b0c2869: chore(ai): remove deprecated `media` type part from `ToolResultOutput`
27
+
3
28
  ## 5.0.0-beta.12
4
29
 
5
30
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -837,13 +837,6 @@ type ToolResultOutput = {
837
837
  * Provider-specific options.
838
838
  */
839
839
  providerOptions?: ProviderOptions;
840
- } | {
841
- /**
842
- * @deprecated Use image-data or file-data instead.
843
- */
844
- type: 'media';
845
- data: string;
846
- mediaType: string;
847
840
  } | {
848
841
  type: 'file-data';
849
842
  /**
@@ -1119,7 +1112,7 @@ interface ToolExecutionOptions<CONTEXT extends Context> {
1119
1112
  */
1120
1113
  abortSignal?: AbortSignal;
1121
1114
  /**
1122
- * User-defined context.
1115
+ * User-defined runtime context.
1123
1116
  *
1124
1117
  * Treat the context object as immutable inside tools.
1125
1118
  * Mutating the context object can lead to race conditions and unexpected results
@@ -1127,10 +1120,8 @@ interface ToolExecutionOptions<CONTEXT extends Context> {
1127
1120
  *
1128
1121
  * If you need to mutate the context, analyze the tool calls and results
1129
1122
  * in `prepareStep` and update it there.
1130
- *
1131
- * Experimental (can break in patch releases).
1132
1123
  */
1133
- experimental_context: CONTEXT;
1124
+ context: CONTEXT;
1134
1125
  }
1135
1126
  /**
1136
1127
  * Function that is called to determine if the tool needs approval before it can be executed.
@@ -1146,11 +1137,16 @@ type ToolNeedsApprovalFunction<INPUT, CONTEXT extends Context> = (input: INPUT,
1146
1137
  */
1147
1138
  messages: ModelMessage[];
1148
1139
  /**
1149
- * Additional context.
1140
+ * User-defined runtime context.
1150
1141
  *
1151
- * Experimental (can break in patch releases).
1142
+ * Treat the context object as immutable inside tools.
1143
+ * Mutating the context object can lead to race conditions and unexpected results
1144
+ * when tools are called in parallel.
1145
+ *
1146
+ * If you need to mutate the context, analyze the tool calls and results
1147
+ * in `prepareStep` and update it there.
1152
1148
  */
1153
- experimental_context: CONTEXT;
1149
+ context: CONTEXT;
1154
1150
  }) => boolean | PromiseLike<boolean>;
1155
1151
  /**
1156
1152
  * Function that executes the tool and returns either a single result or a stream of results.
package/dist/index.d.ts CHANGED
@@ -837,13 +837,6 @@ type ToolResultOutput = {
837
837
  * Provider-specific options.
838
838
  */
839
839
  providerOptions?: ProviderOptions;
840
- } | {
841
- /**
842
- * @deprecated Use image-data or file-data instead.
843
- */
844
- type: 'media';
845
- data: string;
846
- mediaType: string;
847
840
  } | {
848
841
  type: 'file-data';
849
842
  /**
@@ -1119,7 +1112,7 @@ interface ToolExecutionOptions<CONTEXT extends Context> {
1119
1112
  */
1120
1113
  abortSignal?: AbortSignal;
1121
1114
  /**
1122
- * User-defined context.
1115
+ * User-defined runtime context.
1123
1116
  *
1124
1117
  * Treat the context object as immutable inside tools.
1125
1118
  * Mutating the context object can lead to race conditions and unexpected results
@@ -1127,10 +1120,8 @@ interface ToolExecutionOptions<CONTEXT extends Context> {
1127
1120
  *
1128
1121
  * If you need to mutate the context, analyze the tool calls and results
1129
1122
  * in `prepareStep` and update it there.
1130
- *
1131
- * Experimental (can break in patch releases).
1132
1123
  */
1133
- experimental_context: CONTEXT;
1124
+ context: CONTEXT;
1134
1125
  }
1135
1126
  /**
1136
1127
  * Function that is called to determine if the tool needs approval before it can be executed.
@@ -1146,11 +1137,16 @@ type ToolNeedsApprovalFunction<INPUT, CONTEXT extends Context> = (input: INPUT,
1146
1137
  */
1147
1138
  messages: ModelMessage[];
1148
1139
  /**
1149
- * Additional context.
1140
+ * User-defined runtime context.
1150
1141
  *
1151
- * Experimental (can break in patch releases).
1142
+ * Treat the context object as immutable inside tools.
1143
+ * Mutating the context object can lead to race conditions and unexpected results
1144
+ * when tools are called in parallel.
1145
+ *
1146
+ * If you need to mutate the context, analyze the tool calls and results
1147
+ * in `prepareStep` and update it there.
1152
1148
  */
1153
- experimental_context: CONTEXT;
1149
+ context: CONTEXT;
1154
1150
  }) => boolean | PromiseLike<boolean>;
1155
1151
  /**
1156
1152
  * Function that executes the tool and returns either a single result or a stream of results.
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 ? "5.0.0-beta.12" : "0.0.0-test";
681
+ var VERSION = true ? "5.0.0-beta.15" : "0.0.0-test";
682
682
 
683
683
  // src/get-from-api.ts
684
684
  var getOriginalFetch = () => globalThis.fetch;