@openrouter/ai-sdk-provider 1.0.0-beta.6 → 1.0.0-beta.7
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/README.md +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.d.mts +1 -1
- package/dist/internal/index.d.ts +1 -1
- package/dist/internal/index.js +12 -2
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +12 -2
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -139,7 +139,7 @@ type OpenRouterChatSettings = {
|
|
|
139
139
|
/**
|
|
140
140
|
Return the log probabilities of the tokens. Including logprobs will increase
|
|
141
141
|
the response size and can slow down response times. However, it can
|
|
142
|
-
be useful to better
|
|
142
|
+
be useful to understand better how the model is behaving.
|
|
143
143
|
|
|
144
144
|
Setting to true will return the log probabilities of the tokens that
|
|
145
145
|
were generated.
|
package/dist/internal/index.d.ts
CHANGED
|
@@ -139,7 +139,7 @@ type OpenRouterChatSettings = {
|
|
|
139
139
|
/**
|
|
140
140
|
Return the log probabilities of the tokens. Including logprobs will increase
|
|
141
141
|
the response size and can slow down response times. However, it can
|
|
142
|
-
be useful to better
|
|
142
|
+
be useful to understand better how the model is behaving.
|
|
143
143
|
|
|
144
144
|
Setting to true will return the log probabilities of the tokens that
|
|
145
145
|
were generated.
|
package/dist/internal/index.js
CHANGED
|
@@ -1309,6 +1309,7 @@ var OpenRouterChatLanguageModel = class {
|
|
|
1309
1309
|
tools,
|
|
1310
1310
|
toolChoice
|
|
1311
1311
|
}) {
|
|
1312
|
+
var _a15;
|
|
1312
1313
|
const baseArgs = __spreadValues(__spreadValues({
|
|
1313
1314
|
// model id:
|
|
1314
1315
|
model: this.modelId,
|
|
@@ -1336,9 +1337,18 @@ var OpenRouterChatLanguageModel = class {
|
|
|
1336
1337
|
reasoning: this.settings.reasoning,
|
|
1337
1338
|
usage: this.settings.usage
|
|
1338
1339
|
}, this.config.extraBody), this.settings.extraBody);
|
|
1339
|
-
if ((responseFormat == null ? void 0 : responseFormat.type) === "json") {
|
|
1340
|
+
if ((responseFormat == null ? void 0 : responseFormat.type) === "json" && responseFormat.schema != null) {
|
|
1340
1341
|
return __spreadProps(__spreadValues({}, baseArgs), {
|
|
1341
|
-
response_format: {
|
|
1342
|
+
response_format: {
|
|
1343
|
+
type: "json_schema",
|
|
1344
|
+
json_schema: __spreadValues({
|
|
1345
|
+
schema: responseFormat.schema,
|
|
1346
|
+
strict: true,
|
|
1347
|
+
name: (_a15 = responseFormat.name) != null ? _a15 : "response"
|
|
1348
|
+
}, responseFormat.description && {
|
|
1349
|
+
description: responseFormat.description
|
|
1350
|
+
})
|
|
1351
|
+
}
|
|
1342
1352
|
});
|
|
1343
1353
|
}
|
|
1344
1354
|
if (tools && tools.length > 0) {
|