@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.js
CHANGED
|
@@ -1383,6 +1383,19 @@ var LLMGatewayChatLanguageModel = class {
|
|
|
1383
1383
|
usage: this.settings.usage
|
|
1384
1384
|
}, this.config.extraBody), this.settings.extraBody);
|
|
1385
1385
|
if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
|
|
1386
|
+
if ("schema" in responseFormat && responseFormat.schema) {
|
|
1387
|
+
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1388
|
+
response_format: {
|
|
1389
|
+
type: "json_schema",
|
|
1390
|
+
json_schema: {
|
|
1391
|
+
name: responseFormat.name || "response",
|
|
1392
|
+
description: responseFormat.description,
|
|
1393
|
+
schema: responseFormat.schema,
|
|
1394
|
+
strict: true
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
});
|
|
1398
|
+
}
|
|
1386
1399
|
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1387
1400
|
response_format: { type: "json_object" }
|
|
1388
1401
|
});
|