@llmgateway/ai-sdk-provider 2.1.1 → 2.2.1
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.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -0
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +13 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +13 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1348,6 +1348,19 @@ var LLMGatewayChatLanguageModel = class {
|
|
|
1348
1348
|
usage: this.settings.usage
|
|
1349
1349
|
}, this.config.extraBody), this.settings.extraBody);
|
|
1350
1350
|
if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
|
|
1351
|
+
if ("schema" in responseFormat && responseFormat.schema) {
|
|
1352
|
+
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1353
|
+
response_format: {
|
|
1354
|
+
type: "json_schema",
|
|
1355
|
+
json_schema: {
|
|
1356
|
+
name: responseFormat.name || "response",
|
|
1357
|
+
description: responseFormat.description,
|
|
1358
|
+
schema: responseFormat.schema,
|
|
1359
|
+
strict: true
|
|
1360
|
+
}
|
|
1361
|
+
}
|
|
1362
|
+
});
|
|
1363
|
+
}
|
|
1351
1364
|
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1352
1365
|
response_format: { type: "json_object" }
|
|
1353
1366
|
});
|