@ai-sdk/openai 4.0.59 → 4.0.61

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.
@@ -31,6 +31,22 @@ export type OpenaiResponsesProviderMetadata = {
31
31
  openai: ResponsesProviderMetadata;
32
32
  };
33
33
 
34
+ export type ResponsesToolCallProviderMetadata = {
35
+ itemId: string;
36
+ async?: boolean;
37
+ namespace?: string;
38
+ caller?:
39
+ | { type: 'direct' }
40
+ | {
41
+ type: 'program';
42
+ callerId: string;
43
+ };
44
+ };
45
+
46
+ export type OpenaiResponsesToolCallProviderMetadata = {
47
+ openai: ResponsesToolCallProviderMetadata;
48
+ };
49
+
34
50
  export type ResponsesCompactionProviderMetadata = {
35
51
  type: 'compaction';
36
52
  itemId: string;
@@ -9,6 +9,7 @@ export const customArgsSchema = lazySchema(() =>
9
9
  zodSchema(
10
10
  z.object({
11
11
  description: z.string().optional(),
12
+ async: z.boolean().optional(),
12
13
  format: z
13
14
  .union([
14
15
  z.object({
@@ -35,6 +36,12 @@ export const customToolFactory = createProviderDefinedToolFactory<
35
36
  */
36
37
  description?: string;
37
38
 
39
+ /**
40
+ * Whether the model can continue generating after calling this tool
41
+ * without waiting for its result.
42
+ */
43
+ async?: boolean;
44
+
38
45
  /**
39
46
  * The output format specification for the tool.
40
47
  * Omit for unconstrained text output.