ai 4.1.59 → 4.1.60
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 +42 -38
- package/dist/index.d.ts +42 -38
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -3940,7 +3940,7 @@ async function generateText({
|
|
3940
3940
|
}),
|
3941
3941
|
tracer,
|
3942
3942
|
fn: async (span) => {
|
3943
|
-
var _a18, _b, _c, _d, _e, _f, _g, _h, _i, _j;
|
3943
|
+
var _a18, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k;
|
3944
3944
|
const mode = {
|
3945
3945
|
type: "regular",
|
3946
3946
|
...prepareToolsAndToolChoice({ tools, toolChoice, activeTools })
|
@@ -4146,6 +4146,7 @@ async function generateText({
|
|
4146
4146
|
response: {
|
4147
4147
|
...currentModelResponse.response,
|
4148
4148
|
headers: (_g = currentModelResponse.rawResponse) == null ? void 0 : _g.headers,
|
4149
|
+
body: (_h = currentModelResponse.rawResponse) == null ? void 0 : _h.body,
|
4149
4150
|
// deep clone msgs to avoid mutating past messages in multi-step:
|
4150
4151
|
messages: structuredClone(responseMessages)
|
4151
4152
|
},
|
@@ -4192,11 +4193,11 @@ async function generateText({
|
|
4192
4193
|
finishReason: currentModelResponse.finishReason,
|
4193
4194
|
usage,
|
4194
4195
|
warnings: currentModelResponse.warnings,
|
4195
|
-
request: (
|
4196
|
+
request: (_i = currentModelResponse.request) != null ? _i : {},
|
4196
4197
|
response: {
|
4197
4198
|
...currentModelResponse.response,
|
4198
|
-
headers: (
|
4199
|
-
body: (
|
4199
|
+
headers: (_j = currentModelResponse.rawResponse) == null ? void 0 : _j.headers,
|
4200
|
+
body: (_k = currentModelResponse.rawResponse) == null ? void 0 : _k.body,
|
4200
4201
|
messages: responseMessages
|
4201
4202
|
},
|
4202
4203
|
logprobs: currentModelResponse.logprobs,
|