@ai-sdk/openai 3.0.57 → 3.0.59

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.
@@ -339,6 +339,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
339
339
  call_id: string;
340
340
  name: string;
341
341
  arguments: string;
342
+ namespace?: string | null | undefined;
342
343
  } | {
343
344
  type: "web_search_call";
344
345
  id: string;
@@ -456,6 +457,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
456
457
  name: string;
457
458
  arguments: string;
458
459
  status: "completed";
460
+ namespace?: string | null | undefined;
459
461
  } | {
460
462
  type: "custom_tool_call";
461
463
  id: string;
@@ -339,6 +339,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
339
339
  call_id: string;
340
340
  name: string;
341
341
  arguments: string;
342
+ namespace?: string | null | undefined;
342
343
  } | {
343
344
  type: "web_search_call";
344
345
  id: string;
@@ -456,6 +457,7 @@ declare const openaiResponsesChunkSchema: _ai_sdk_provider_utils.LazySchema<{
456
457
  name: string;
457
458
  arguments: string;
458
459
  status: "completed";
460
+ namespace?: string | null | undefined;
459
461
  } | {
460
462
  type: "custom_tool_call";
461
463
  id: string;
@@ -282,7 +282,7 @@ function convertToOpenAIChatMessages({
282
282
  }
283
283
  messages.push({
284
284
  role: "assistant",
285
- content: text || null,
285
+ content: toolCalls.length > 0 ? text || null : text,
286
286
  tool_calls: toolCalls.length > 0 ? toolCalls : void 0
287
287
  });
288
288
  break;
@@ -3390,7 +3390,8 @@ var openaiResponsesChunkSchema = (0, import_provider_utils25.lazySchema)(
3390
3390
  id: import_v418.z.string(),
3391
3391
  call_id: import_v418.z.string(),
3392
3392
  name: import_v418.z.string(),
3393
- arguments: import_v418.z.string()
3393
+ arguments: import_v418.z.string(),
3394
+ namespace: import_v418.z.string().nullish()
3394
3395
  }),
3395
3396
  import_v418.z.object({
3396
3397
  type: import_v418.z.literal("web_search_call"),
@@ -3532,7 +3533,8 @@ var openaiResponsesChunkSchema = (0, import_provider_utils25.lazySchema)(
3532
3533
  call_id: import_v418.z.string(),
3533
3534
  name: import_v418.z.string(),
3534
3535
  arguments: import_v418.z.string(),
3535
- status: import_v418.z.literal("completed")
3536
+ status: import_v418.z.literal("completed"),
3537
+ namespace: import_v418.z.string().nullish()
3536
3538
  }),
3537
3539
  import_v418.z.object({
3538
3540
  type: import_v418.z.literal("custom_tool_call"),
@@ -3992,7 +3994,8 @@ var openaiResponsesResponseSchema = (0, import_provider_utils25.lazySchema)(
3992
3994
  call_id: import_v418.z.string(),
3993
3995
  name: import_v418.z.string(),
3994
3996
  arguments: import_v418.z.string(),
3995
- id: import_v418.z.string()
3997
+ id: import_v418.z.string(),
3998
+ namespace: import_v418.z.string().nullish()
3996
3999
  }),
3997
4000
  import_v418.z.object({
3998
4001
  type: import_v418.z.literal("custom_tool_call"),
@@ -5495,7 +5498,8 @@ var OpenAIResponsesLanguageModel = class {
5495
5498
  input: part.arguments,
5496
5499
  providerMetadata: {
5497
5500
  [providerOptionsName]: {
5498
- itemId: part.id
5501
+ itemId: part.id,
5502
+ ...part.namespace != null && { namespace: part.namespace }
5499
5503
  }
5500
5504
  }
5501
5505
  });
@@ -5978,7 +5982,14 @@ var OpenAIResponsesLanguageModel = class {
5978
5982
  hasFunctionCall = true;
5979
5983
  controller.enqueue({
5980
5984
  type: "tool-input-end",
5981
- id: value.item.call_id
5985
+ id: value.item.call_id,
5986
+ ...value.item.namespace != null && {
5987
+ providerMetadata: {
5988
+ [providerOptionsName]: {
5989
+ namespace: value.item.namespace
5990
+ }
5991
+ }
5992
+ }
5982
5993
  });
5983
5994
  controller.enqueue({
5984
5995
  type: "tool-call",
@@ -5987,7 +5998,10 @@ var OpenAIResponsesLanguageModel = class {
5987
5998
  input: value.item.arguments,
5988
5999
  providerMetadata: {
5989
6000
  [providerOptionsName]: {
5990
- itemId: value.item.id
6001
+ itemId: value.item.id,
6002
+ ...value.item.namespace != null && {
6003
+ namespace: value.item.namespace
6004
+ }
5991
6005
  }
5992
6006
  }
5993
6007
  });