@ai-sdk/gateway 3.0.142 → 3.0.144
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 +16 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +122 -121
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -2
- package/dist/index.mjs.map +1 -1
- package/docs/00-ai-gateway.mdx +7 -2
- package/package.json +2 -2
- package/src/errors/extract-api-call-response.ts +2 -1
- package/src/gateway-language-model-settings.ts +1 -0
package/dist/index.mjs
CHANGED
|
@@ -401,13 +401,14 @@ var gatewayErrorResponseSchema = lazySchema2(
|
|
|
401
401
|
);
|
|
402
402
|
|
|
403
403
|
// src/errors/extract-api-call-response.ts
|
|
404
|
+
import { secureJsonParse } from "@ai-sdk/provider-utils";
|
|
404
405
|
function extractApiCallResponse(error) {
|
|
405
406
|
if (error.data !== void 0) {
|
|
406
407
|
return error.data;
|
|
407
408
|
}
|
|
408
409
|
if (error.responseBody != null) {
|
|
409
410
|
try {
|
|
410
|
-
return
|
|
411
|
+
return secureJsonParse(error.responseBody);
|
|
411
412
|
} catch (e) {
|
|
412
413
|
return error.responseBody;
|
|
413
414
|
}
|
|
@@ -2162,7 +2163,7 @@ async function getVercelRequestId() {
|
|
|
2162
2163
|
}
|
|
2163
2164
|
|
|
2164
2165
|
// src/version.ts
|
|
2165
|
-
var VERSION = true ? "3.0.
|
|
2166
|
+
var VERSION = true ? "3.0.144" : "0.0.0-test";
|
|
2166
2167
|
|
|
2167
2168
|
// src/gateway-provider.ts
|
|
2168
2169
|
var AI_GATEWAY_PROTOCOL_VERSION = "0.0.1";
|