@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/dist/index.mjs CHANGED
@@ -848,7 +848,7 @@ var OpenAIChatLanguageModel = class {
848
848
  };
849
849
  }
850
850
  async doGenerate(options) {
851
- var _a, _b, _c, _d, _e, _f, _g;
851
+ var _a, _b, _c, _d, _e, _f;
852
852
  const { args: body, warnings } = await this.getArgs(options);
853
853
  const {
854
854
  responseHeaders,
@@ -892,7 +892,6 @@ var OpenAIChatLanguageModel = class {
892
892
  });
893
893
  }
894
894
  const completionTokenDetails = (_d = response.usage) == null ? void 0 : _d.completion_tokens_details;
895
- const promptTokenDetails = (_e = response.usage) == null ? void 0 : _e.prompt_tokens_details;
896
895
  const providerMetadata = { openai: {} };
897
896
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens) != null) {
898
897
  providerMetadata.openai.acceptedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.accepted_prediction_tokens;
@@ -900,14 +899,14 @@ var OpenAIChatLanguageModel = class {
900
899
  if ((completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens) != null) {
901
900
  providerMetadata.openai.rejectedPredictionTokens = completionTokenDetails == null ? void 0 : completionTokenDetails.rejected_prediction_tokens;
902
901
  }
903
- if (((_f = choice.logprobs) == null ? void 0 : _f.content) != null) {
902
+ if (((_e = choice.logprobs) == null ? void 0 : _e.content) != null) {
904
903
  providerMetadata.openai.logprobs = choice.logprobs.content;
905
904
  }
906
905
  return {
907
906
  content,
908
907
  finishReason: {
909
908
  unified: mapOpenAIFinishReason(choice.finish_reason),
910
- raw: (_g = choice.finish_reason) != null ? _g : void 0
909
+ raw: (_f = choice.finish_reason) != null ? _f : void 0
911
910
  },
912
911
  usage: convertOpenAIChatUsage(response.usage),
913
912
  request: { body },
@@ -7054,7 +7053,7 @@ var OpenAISkills = class {
7054
7053
  };
7055
7054
 
7056
7055
  // src/version.ts
7057
- var VERSION = true ? "4.0.0-beta.27" : "0.0.0-test";
7056
+ var VERSION = true ? "4.0.0-beta.29" : "0.0.0-test";
7058
7057
 
7059
7058
  // src/openai-provider.ts
7060
7059
  function createOpenAI(options = {}) {