@ai-sdk/openai-compatible 3.0.0-beta.0 → 3.0.0-beta.10

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.mjs CHANGED
@@ -8,6 +8,7 @@ import {
8
8
  createJsonErrorResponseHandler,
9
9
  createJsonResponseHandler,
10
10
  generateId,
11
+ isCustomReasoning,
11
12
  isParsableJson,
12
13
  parseProviderOptions,
13
14
  postJsonToApi
@@ -395,7 +396,7 @@ function prepareTools({
395
396
  var OpenAICompatibleChatLanguageModel = class {
396
397
  // type inferred via constructor
397
398
  constructor(modelId, config) {
398
- this.specificationVersion = "v3";
399
+ this.specificationVersion = "v4";
399
400
  var _a, _b;
400
401
  this.modelId = modelId;
401
402
  this.config = config;
@@ -428,6 +429,7 @@ var OpenAICompatibleChatLanguageModel = class {
428
429
  topK,
429
430
  frequencyPenalty,
430
431
  presencePenalty,
432
+ reasoning,
431
433
  providerOptions,
432
434
  stopSequences,
433
435
  responseFormat,
@@ -435,7 +437,7 @@ var OpenAICompatibleChatLanguageModel = class {
435
437
  toolChoice,
436
438
  tools
437
439
  }) {
438
- var _a, _b, _c, _d, _e;
440
+ var _a, _b, _c, _d, _e, _f;
439
441
  const warnings = [];
440
442
  const deprecatedOptions = await parseProviderOptions({
441
443
  provider: "openai-compatible",
@@ -512,7 +514,7 @@ var OpenAICompatibleChatLanguageModel = class {
512
514
  ).includes(key)
513
515
  )
514
516
  ),
515
- reasoning_effort: compatibleOptions.reasoningEffort,
517
+ reasoning_effort: (_f = compatibleOptions.reasoningEffort) != null ? _f : isCustomReasoning(reasoning) && reasoning !== "none" ? reasoning : void 0,
516
518
  verbosity: compatibleOptions.textVerbosity,
517
519
  // messages:
518
520
  messages: convertToOpenAICompatibleChatMessages(prompt),
@@ -1145,7 +1147,7 @@ var openaiCompatibleLanguageModelCompletionOptions = z4.object({
1145
1147
  var OpenAICompatibleCompletionLanguageModel = class {
1146
1148
  // type inferred via constructor
1147
1149
  constructor(modelId, config) {
1148
- this.specificationVersion = "v3";
1150
+ this.specificationVersion = "v4";
1149
1151
  var _a;
1150
1152
  this.modelId = modelId;
1151
1153
  this.config = config;
@@ -1432,7 +1434,7 @@ var openaiCompatibleEmbeddingModelOptions = z6.object({
1432
1434
  // src/embedding/openai-compatible-embedding-model.ts
1433
1435
  var OpenAICompatibleEmbeddingModel = class {
1434
1436
  constructor(modelId, config) {
1435
- this.specificationVersion = "v3";
1437
+ this.specificationVersion = "v4";
1436
1438
  this.modelId = modelId;
1437
1439
  this.config = config;
1438
1440
  }
@@ -1547,7 +1549,7 @@ var OpenAICompatibleImageModel = class {
1547
1549
  constructor(modelId, config) {
1548
1550
  this.modelId = modelId;
1549
1551
  this.config = config;
1550
- this.specificationVersion = "v3";
1552
+ this.specificationVersion = "v4";
1551
1553
  this.maxImagesPerCall = 10;
1552
1554
  }
1553
1555
  get provider() {
@@ -1682,7 +1684,7 @@ import {
1682
1684
  } from "@ai-sdk/provider-utils";
1683
1685
 
1684
1686
  // src/version.ts
1685
- var VERSION = true ? "3.0.0-beta.0" : "0.0.0-test";
1687
+ var VERSION = true ? "3.0.0-beta.10" : "0.0.0-test";
1686
1688
 
1687
1689
  // src/openai-compatible-provider.ts
1688
1690
  function createOpenAICompatible(options) {
@@ -1722,7 +1724,7 @@ function createOpenAICompatible(options) {
1722
1724
  });
1723
1725
  const createImageModel = (modelId) => new OpenAICompatibleImageModel(modelId, getCommonModelConfig("image"));
1724
1726
  const provider = (modelId) => createLanguageModel(modelId);
1725
- provider.specificationVersion = "v3";
1727
+ provider.specificationVersion = "v4";
1726
1728
  provider.languageModel = createLanguageModel;
1727
1729
  provider.chatModel = createChatModel;
1728
1730
  provider.completionModel = createCompletionModel;