ai 4.1.52 → 4.1.54

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/dist/index.mjs CHANGED
@@ -2794,7 +2794,8 @@ async function generateObject({
2794
2794
  request,
2795
2795
  response: {
2796
2796
  ...response,
2797
- headers: rawResponse == null ? void 0 : rawResponse.headers
2797
+ headers: rawResponse == null ? void 0 : rawResponse.headers,
2798
+ body: rawResponse == null ? void 0 : rawResponse.body
2798
2799
  },
2799
2800
  logprobs,
2800
2801
  providerMetadata: resultProviderMetadata
@@ -3931,7 +3932,7 @@ async function generateText({
3931
3932
  }),
3932
3933
  tracer,
3933
3934
  fn: async (span) => {
3934
- var _a17, _b, _c, _d, _e, _f, _g, _h, _i;
3935
+ var _a17, _b, _c, _d, _e, _f, _g, _h, _i, _j;
3935
3936
  const mode = {
3936
3937
  type: "regular",
3937
3938
  ...prepareToolsAndToolChoice({ tools, toolChoice, activeTools })
@@ -4187,6 +4188,7 @@ async function generateText({
4187
4188
  response: {
4188
4189
  ...currentModelResponse.response,
4189
4190
  headers: (_i = currentModelResponse.rawResponse) == null ? void 0 : _i.headers,
4191
+ body: (_j = currentModelResponse.rawResponse) == null ? void 0 : _j.body,
4190
4192
  messages: responseMessages
4191
4193
  },
4192
4194
  logprobs: currentModelResponse.logprobs,
@@ -6012,7 +6014,7 @@ function extractReasoningMiddleware({
6012
6014
  );
6013
6015
  textWithoutReasoning = beforeMatch + (beforeMatch.length > 0 && afterMatch.length > 0 ? separator : "") + afterMatch;
6014
6016
  }
6015
- return { text: textWithoutReasoning, reasoning, ...rest };
6017
+ return { ...rest, text: textWithoutReasoning, reasoning };
6016
6018
  },
6017
6019
  wrapStream: async ({ doStream }) => {
6018
6020
  const { stream, ...rest } = await doStream();