4141 "DeltaThoughtSummaryContent" ,
4242 "DeltaThoughtSignature" ,
4343 "DeltaFunctionCall" ,
44- "DeltaFunctionResult" ,
45- "DeltaFunctionResultResult" ,
46- "DeltaFunctionResultResultItems" ,
47- "DeltaFunctionResultResultItemsItem" ,
4844 "DeltaCodeExecutionCall" ,
49- "DeltaCodeExecutionResult" ,
5045 "DeltaURLContextCall" ,
51- "DeltaURLContextResult" ,
5246 "DeltaGoogleSearchCall" ,
53- "DeltaGoogleSearchResult" ,
5447 "DeltaMCPServerToolCall" ,
55- "DeltaMCPServerToolResult" ,
56- "DeltaMCPServerToolResultResult" ,
57- "DeltaMCPServerToolResultResultItems" ,
58- "DeltaMCPServerToolResultResultItemsItem" ,
5948 "DeltaFileSearchCall" ,
49+ "DeltaFunctionResult" ,
50+ "DeltaFunctionResultResultFunctionResultSubcontentList" ,
51+ "DeltaCodeExecutionResult" ,
52+ "DeltaURLContextResult" ,
53+ "DeltaGoogleSearchResult" ,
54+ "DeltaMCPServerToolResult" ,
55+ "DeltaMCPServerToolResultResultFunctionResultSubcontentList" ,
6056 "DeltaFileSearchResult" ,
6157 "DeltaFileSearchResultResult" ,
6258]
@@ -157,22 +153,66 @@ class DeltaFunctionCall(BaseModel):
157153 type : Literal ["function_call" ]
158154
159155
160- DeltaFunctionResultResultItemsItem : TypeAlias = Union [TextContent , ImageContent ]
156+ class DeltaCodeExecutionCall (BaseModel ):
157+ id : str
158+ """A unique ID for this specific tool call."""
159+
160+ arguments : CodeExecutionCallArguments
161+ """The arguments to pass to the code execution."""
162+
163+ type : Literal ["code_execution_call" ]
164+
165+
166+ class DeltaURLContextCall (BaseModel ):
167+ id : str
168+ """A unique ID for this specific tool call."""
169+
170+ arguments : URLContextCallArguments
171+ """The arguments to pass to the URL context."""
172+
173+ type : Literal ["url_context_call" ]
174+
175+
176+ class DeltaGoogleSearchCall (BaseModel ):
177+ id : str
178+ """A unique ID for this specific tool call."""
179+
180+ arguments : GoogleSearchCallArguments
181+ """The arguments to pass to Google Search."""
182+
183+ type : Literal ["google_search_call" ]
184+
161185
186+ class DeltaMCPServerToolCall (BaseModel ):
187+ id : str
188+ """A unique ID for this specific tool call."""
189+
190+ arguments : Dict [str , object ]
162191
163- class DeltaFunctionResultResultItems (BaseModel ):
164- items : Optional [List [DeltaFunctionResultResultItemsItem ]] = None
192+ name : str
165193
194+ server_name : str
166195
167- DeltaFunctionResultResult : TypeAlias = Union [DeltaFunctionResultResultItems , str , object ]
196+ type : Literal ["mcp_server_tool_call" ]
197+
198+
199+ class DeltaFileSearchCall (BaseModel ):
200+ id : str
201+ """A unique ID for this specific tool call."""
202+
203+ type : Literal ["file_search_call" ]
204+
205+
206+ DeltaFunctionResultResultFunctionResultSubcontentList : TypeAlias = Annotated [
207+ Union [TextContent , ImageContent ], PropertyInfo (discriminator = "type" )
208+ ]
168209
169210
170211class DeltaFunctionResult (BaseModel ):
171212 call_id : str
172213 """ID to match the ID from the function call block."""
173214
174- result : DeltaFunctionResultResult
175- """Tool call result delta."""
215+ result : Union [List [DeltaFunctionResultResultFunctionResultSubcontentList ], str , object ]
176216
177217 type : Literal ["function_result" ]
178218
@@ -184,16 +224,6 @@ class DeltaFunctionResult(BaseModel):
184224 """A signature hash for backend validation."""
185225
186226
187- class DeltaCodeExecutionCall (BaseModel ):
188- id : str
189- """A unique ID for this specific tool call."""
190-
191- arguments : CodeExecutionCallArguments
192- """The arguments to pass to the code execution."""
193-
194- type : Literal ["code_execution_call" ]
195-
196-
197227class DeltaCodeExecutionResult (BaseModel ):
198228 call_id : str
199229 """ID to match the ID from the function call block."""
@@ -208,16 +238,6 @@ class DeltaCodeExecutionResult(BaseModel):
208238 """A signature hash for backend validation."""
209239
210240
211- class DeltaURLContextCall (BaseModel ):
212- id : str
213- """A unique ID for this specific tool call."""
214-
215- arguments : URLContextCallArguments
216- """The arguments to pass to the URL context."""
217-
218- type : Literal ["url_context_call" ]
219-
220-
221241class DeltaURLContextResult (BaseModel ):
222242 call_id : str
223243 """ID to match the ID from the function call block."""
@@ -232,16 +252,6 @@ class DeltaURLContextResult(BaseModel):
232252 """A signature hash for backend validation."""
233253
234254
235- class DeltaGoogleSearchCall (BaseModel ):
236- id : str
237- """A unique ID for this specific tool call."""
238-
239- arguments : GoogleSearchCallArguments
240- """The arguments to pass to Google Search."""
241-
242- type : Literal ["google_search_call" ]
243-
244-
245255class DeltaGoogleSearchResult (BaseModel ):
246256 call_id : str
247257 """ID to match the ID from the function call block."""
@@ -256,35 +266,16 @@ class DeltaGoogleSearchResult(BaseModel):
256266 """A signature hash for backend validation."""
257267
258268
259- class DeltaMCPServerToolCall (BaseModel ):
260- id : str
261- """A unique ID for this specific tool call."""
262-
263- arguments : Dict [str , object ]
264-
265- name : str
266-
267- server_name : str
268-
269- type : Literal ["mcp_server_tool_call" ]
270-
271-
272- DeltaMCPServerToolResultResultItemsItem : TypeAlias = Union [TextContent , ImageContent ]
273-
274-
275- class DeltaMCPServerToolResultResultItems (BaseModel ):
276- items : Optional [List [DeltaMCPServerToolResultResultItemsItem ]] = None
277-
278-
279- DeltaMCPServerToolResultResult : TypeAlias = Union [DeltaMCPServerToolResultResultItems , str , object ]
269+ DeltaMCPServerToolResultResultFunctionResultSubcontentList : TypeAlias = Annotated [
270+ Union [TextContent , ImageContent ], PropertyInfo (discriminator = "type" )
271+ ]
280272
281273
282274class DeltaMCPServerToolResult (BaseModel ):
283275 call_id : str
284276 """ID to match the ID from the function call block."""
285277
286- result : DeltaMCPServerToolResultResult
287- """Tool call result delta."""
278+ result : Union [List [DeltaMCPServerToolResultResultFunctionResultSubcontentList ], str , object ]
288279
289280 type : Literal ["mcp_server_tool_result" ]
290281
@@ -296,13 +287,6 @@ class DeltaMCPServerToolResult(BaseModel):
296287 """A signature hash for backend validation."""
297288
298289
299- class DeltaFileSearchCall (BaseModel ):
300- id : str
301- """A unique ID for this specific tool call."""
302-
303- type : Literal ["file_search_call" ]
304-
305-
306290class DeltaFileSearchResultResult (BaseModel ):
307291 """The result of the File Search."""
308292
@@ -320,9 +304,9 @@ class DeltaFileSearchResult(BaseModel):
320304 call_id : str
321305 """ID to match the ID from the function call block."""
322306
323- type : Literal [ "file_search_result" ]
307+ result : List [ DeltaFileSearchResultResult ]
324308
325- result : Optional [ List [ DeltaFileSearchResultResult ]] = None
309+ type : Literal [ "file_search_result" ]
326310
327311 signature : Optional [str ] = None
328312 """A signature hash for backend validation."""
@@ -338,16 +322,16 @@ class DeltaFileSearchResult(BaseModel):
338322 DeltaThoughtSummary ,
339323 DeltaThoughtSignature ,
340324 DeltaFunctionCall ,
341- DeltaFunctionResult ,
342325 DeltaCodeExecutionCall ,
343- DeltaCodeExecutionResult ,
344326 DeltaURLContextCall ,
345- DeltaURLContextResult ,
346327 DeltaGoogleSearchCall ,
347- DeltaGoogleSearchResult ,
348328 DeltaMCPServerToolCall ,
349- DeltaMCPServerToolResult ,
350329 DeltaFileSearchCall ,
330+ DeltaFunctionResult ,
331+ DeltaCodeExecutionResult ,
332+ DeltaURLContextResult ,
333+ DeltaGoogleSearchResult ,
334+ DeltaMCPServerToolResult ,
351335 DeltaFileSearchResult ,
352336 ],
353337 PropertyInfo (discriminator = "type" ),
@@ -356,12 +340,14 @@ class DeltaFileSearchResult(BaseModel):
356340
357341class ContentDelta (BaseModel ):
358342 delta : Delta
343+ """The delta content data for a content block."""
359344
360345 event_type : Literal ["content.delta" ]
361346
362347 index : int
363348
364349 event_id : Optional [str ] = None
365350 """
366- The event_id token to be used to resume the interaction stream, from this event.
351+ The event_id token to be used to resume the interaction stream, from
352+ this event.
367353 """
0 commit comments