@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.
@@ -879,7 +879,7 @@ var OpenAIChatLanguageModel = class {
879
879
  };
880
880
  }
881
881
  async doGenerate(options) {
882
- var _a, _b, _c, _d, _e, _f, _g;
882
+ var _a, _b, _c, _d, _e, _f;
883
883
  const { args: body, warnings } = await this.getArgs(options);
884
884
  const {
885
885
  responseHeaders,
@@ -923,7 +923,6 @@ var OpenAIChatLanguageModel = class {
923
923
  });
924
924
  }
925
925
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
926
- const promptTokenDetails = (_e = response.usage) == null ? void 0 : _e.prompt_tokens_details;
927
926
  const providerMetadata = { openai: {} };
928
927
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {
929
928
  providerMetadata.openai.acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;
@@ -931,14 +930,14 @@ var OpenAIChatLanguageModel = class {
931
930
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {
932
931
  providerMetadata.openai.rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;
933
932
  }
934
- if (((_f = choice.logprobs) == null ? void 0 : _f.content) != null) {
933
+ if (((_e = choice.logprobs) == null ? void 0 : _e.content) != null) {
935
934
  providerMetadata.openai.logprobs = choice.logprobs.content;
936
935
  }
937
936
  return {
938
937
  content,
939
938
  finishReason: {
940
939
  unified: mapOpenAIFinishReason(choice.finish_reason),
941
- raw: (_g = choice.finish_reason) != null ? _g : void 0
940
+ raw: (_f = choice.finish_reason) != null ? _f : void 0
942
941
  },
943
942
  usage: convertOpenAIChatUsage(response.usage),
944
943
  request: { body },