ai 6.0.0-beta.125 → 6.0.0-beta.127

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,17 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.0-beta.127
4
+
5
+ ### Patch Changes
6
+
7
+ - 614599a: chore(ai): deprecate generateObject and streamObject
8
+
9
+ ## 6.0.0-beta.126
10
+
11
+ ### Patch Changes
12
+
13
+ - b67d224: Fixes an issue where `providerMetadata` and `providerExecuted` were lost when tool input validation failed
14
+
3
15
  ## 6.0.0-beta.125
4
16
 
5
17
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -4156,6 +4156,8 @@ functionality that can be fully encapsulated in the provider.
4156
4156
 
4157
4157
  @returns
4158
4158
  A result object that contains the generated object, the finish reason, the token usage, and additional information.
4159
+
4160
+ @deprecated Use `generateText` with an `output` setting instead.
4159
4161
  */
4160
4162
  declare function generateObject<SCHEMA extends FlexibleSchema<unknown> = FlexibleSchema<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
4161
4163
  /**
@@ -4500,6 +4502,8 @@ functionality that can be fully encapsulated in the provider.
4500
4502
 
4501
4503
  @returns
4502
4504
  A result object for accessing the partial object stream and additional information.
4505
+
4506
+ @deprecated Use `streamText` with an `output` setting instead.
4503
4507
  */
4504
4508
  declare function streamObject<SCHEMA extends FlexibleSchema<unknown> = FlexibleSchema<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
4505
4509
  /**
package/dist/index.d.ts CHANGED
@@ -4156,6 +4156,8 @@ functionality that can be fully encapsulated in the provider.
4156
4156
 
4157
4157
  @returns
4158
4158
  A result object that contains the generated object, the finish reason, the token usage, and additional information.
4159
+
4160
+ @deprecated Use `generateText` with an `output` setting instead.
4159
4161
  */
4160
4162
  declare function generateObject<SCHEMA extends FlexibleSchema<unknown> = FlexibleSchema<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
4161
4163
  /**
@@ -4500,6 +4502,8 @@ functionality that can be fully encapsulated in the provider.
4500
4502
 
4501
4503
  @returns
4502
4504
  A result object for accessing the partial object stream and additional information.
4505
+
4506
+ @deprecated Use `streamText` with an `output` setting instead.
4503
4507
  */
4504
4508
  declare function streamObject<SCHEMA extends FlexibleSchema<unknown> = FlexibleSchema<JSONValue$1>, OUTPUT extends 'object' | 'array' | 'enum' | 'no-schema' = InferSchema<SCHEMA> extends string ? 'enum' : 'object', RESULT = OUTPUT extends 'array' ? Array<InferSchema<SCHEMA>> : InferSchema<SCHEMA>>(options: Omit<CallSettings, 'stopSequences'> & Prompt & (OUTPUT extends 'enum' ? {
4505
4509
  /**
package/dist/index.js CHANGED
@@ -870,7 +870,7 @@ function detectMediaType({
870
870
  var import_provider_utils2 = require("@ai-sdk/provider-utils");
871
871
 
872
872
  // src/version.ts
873
- var VERSION = true ? "6.0.0-beta.125" : "0.0.0-test";
873
+ var VERSION = true ? "6.0.0-beta.127" : "0.0.0-test";
874
874
 
875
875
  // src/util/download/download.ts
876
876
  var download = async ({ url }) => {
@@ -3010,7 +3010,9 @@ async function parseToolCall({
3010
3010
  dynamic: true,
3011
3011
  invalid: true,
3012
3012
  error,
3013
- title: (_a15 = tools == null ? void 0 : tools[toolCall.toolName]) == null ? void 0 : _a15.title
3013
+ title: (_a15 = tools == null ? void 0 : tools[toolCall.toolName]) == null ? void 0 : _a15.title,
3014
+ providerExecuted: toolCall.providerExecuted,
3015
+ providerMetadata: toolCall.providerMetadata
3014
3016
  };
3015
3017
  }
3016
3018
  }
@@ -6963,7 +6965,8 @@ function convertToModelMessages(messages, options) {
6963
6965
  output: part.state === "output-error" ? part.errorText : part.output,
6964
6966
  tool: (_b = options == null ? void 0 : options.tools) == null ? void 0 : _b[toolName],
6965
6967
  errorMode: part.state === "output-error" ? "json" : "none"
6966
- })
6968
+ }),
6969
+ ...part.callProviderMetadata != null ? { providerOptions: part.callProviderMetadata } : {}
6967
6970
  });
6968
6971
  }
6969
6972
  }