@ai-sdk/openai 3.0.35 → 3.0.36

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.
@@ -997,7 +997,7 @@ var OpenAIChatLanguageModel = class {
997
997
  for (const toolCallDelta of delta.tool_calls) {
998
998
  const index = toolCallDelta.index;
999
999
  if (toolCalls[index] == null) {
1000
- if (toolCallDelta.type !== "function") {
1000
+ if (toolCallDelta.type != null && toolCallDelta.type !== "function") {
1001
1001
  throw new InvalidResponseDataError({
1002
1002
  data: toolCallDelta,
1003
1003
  message: `Expected 'function' type.`