@ai-sdk/openai 4.0.0-beta.27 → 4.0.0-beta.29

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 CHANGED
@@ -1,5 +1,20 @@
1
1
  # @ai-sdk/openai
2
2
 
3
+ ## 4.0.0-beta.29
4
+
5
+ ### Patch Changes
6
+
7
+ - 90e2d8a: chore: fix unused vars not being flagged by our lint tooling
8
+ - Updated dependencies [90e2d8a]
9
+ - @ai-sdk/provider-utils@5.0.0-beta.18
10
+
11
+ ## 4.0.0-beta.28
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies [3ae1786]
16
+ - @ai-sdk/provider-utils@5.0.0-beta.17
17
+
3
18
  ## 4.0.0-beta.27
4
19
 
5
20
  ### Patch Changes
package/dist/index.js CHANGED
@@ -852,7 +852,7 @@ var OpenAIChatLanguageModel = class {
852
852
  };
853
853
  }
854
854
  async doGenerate(options) {
855
- var _a, _b, _c, _d, _e, _f, _g;
855
+ var _a, _b, _c, _d, _e, _f;
856
856
  const { args: body, warnings } = await this.getArgs(options);
857
857
  const {
858
858
  responseHeaders,
@@ -896,7 +896,6 @@ var OpenAIChatLanguageModel = class {
896
896
  });
897
897
  }
898
898
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
899
- const promptTokenDetails = (_e = response.usage) == null ? void 0 : _e.prompt_tokens_details;
900
899
  const providerMetadata = { openai: {} };
901
900
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {
902
901
  providerMetadata.openai.acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;
@@ -904,14 +903,14 @@ var OpenAIChatLanguageModel = class {
904
903
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {
905
904
  providerMetadata.openai.rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;
906
905
  }
907
- if (((_f = choice.logprobs) == null ? void 0 : _f.content) != null) {
906
+ if (((_e = choice.logprobs) == null ? void 0 : _e.content) != null) {
908
907
  providerMetadata.openai.logprobs = choice.logprobs.content;
909
908
  }
910
909
  return {
911
910
  content,
912
911
  finishReason: {
913
912
  unified: mapOpenAIFinishReason(choice.finish_reason),
914
- raw: (_g = choice.finish_reason) != null ? _g : void 0
913
+ raw: (_f = choice.finish_reason) != null ? _f : void 0
915
914
  },
916
915
  usage: convertOpenAIChatUsage(response.usage),
917
916
  request: { body },
@@ -6941,7 +6940,7 @@ var OpenAISkills = class {
6941
6940
  };
6942
6941
 
6943
6942
  // src/version.ts
6944
- var VERSION = true ? "4.0.0-beta.27" : "0.0.0-test";
6943
+ var VERSION = true ? "4.0.0-beta.29" : "0.0.0-test";
6945
6944
 
6946
6945
  // src/openai-provider.ts
6947
6946
  function createOpenAI(options = {}) {