@ai-sdk/openai 2.0.94 → 2.0.95

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.
@@ -960,7 +960,7 @@ var OpenAIChatLanguageModel = class {
960
960
  for (const toolCallDelta of delta.tool_calls) {
961
961
  const index = toolCallDelta.index;
962
962
  if (toolCalls[index] == null) {
963
- if (toolCallDelta.type !== "function") {
963
+ if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
964
964
  throw new InvalidResponseDataError({
965
965
  data: toolCallDelta,
966
966
  message: `Expected 'function' type.`