@ai-sdk/openai 3.0.111 → 3.0.112

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
@@ -1136,6 +1136,12 @@ var OpenAIChatLanguageModel = class {
1136
1136
  fetch: this.config.fetch
1137
1137
  });
1138
1138
  const choice = response.choices[0];
1139
+ if (choice == null) {
1140
+ throw new InvalidResponseDataError({
1141
+ data: rawResponse,
1142
+ message: "Response did not contain any choices."
1143
+ });
1144
+ }
1139
1145
  const content = [];
1140
1146
  const text = choice.message.content;
1141
1147
  if (text != null && text.length > 0) {
@@ -8226,7 +8232,7 @@ var OpenAITranscriptionModel = class {
8226
8232
  };
8227
8233
 
8228
8234
  // src/version.ts
8229
- var VERSION = true ? "3.0.111" : "0.0.0-test";
8235
+ var VERSION = true ? "3.0.112" : "0.0.0-test";
8230
8236
 
8231
8237
  // src/openai-provider.ts
8232
8238
  function createOpenAI(options = {}) {