4343 "DeltaThoughtSummaryContent" ,
4444 "DeltaThoughtSignature" ,
4545 "DeltaFunctionCall" ,
46- "DeltaFunctionResult" ,
47- "DeltaFunctionResultResult" ,
48- "DeltaFunctionResultResultItems" ,
49- "DeltaFunctionResultResultItemsItem" ,
5046 "DeltaCodeExecutionCall" ,
51- "DeltaCodeExecutionResult" ,
5247 "DeltaURLContextCall" ,
53- "DeltaURLContextResult" ,
5448 "DeltaGoogleSearchCall" ,
55- "DeltaGoogleSearchResult" ,
5649 "DeltaMCPServerToolCall" ,
57- "DeltaMCPServerToolResult" ,
58- "DeltaMCPServerToolResultResult" ,
59- "DeltaMCPServerToolResultResultItems" ,
60- "DeltaMCPServerToolResultResultItemsItem" ,
6150 "DeltaFileSearchCall" ,
62- "DeltaFileSearchResult" ,
6351 "DeltaGoogleMapsCall" ,
52+ "DeltaFunctionResult" ,
53+ "DeltaFunctionResultResultFunctionResultSubcontentList" ,
54+ "DeltaCodeExecutionResult" ,
55+ "DeltaURLContextResult" ,
56+ "DeltaGoogleSearchResult" ,
57+ "DeltaMCPServerToolResult" ,
58+ "DeltaMCPServerToolResultResultFunctionResultSubcontentList" ,
59+ "DeltaFileSearchResult" ,
6460 "DeltaGoogleMapsResult" ,
6561]
6662
@@ -165,146 +161,157 @@ class DeltaFunctionCall(BaseModel):
165161 """A signature hash for backend validation."""
166162
167163
168- DeltaFunctionResultResultItemsItem : TypeAlias = Union [TextContent , ImageContent ]
164+ class DeltaCodeExecutionCall (BaseModel ):
165+ id : str
166+ """A unique ID for this specific tool call."""
169167
168+ arguments : CodeExecutionCallArguments
169+ """The arguments to pass to the code execution."""
170170
171- class DeltaFunctionResultResultItems (BaseModel ):
172- items : Optional [List [DeltaFunctionResultResultItemsItem ]] = None
171+ type : Literal ["code_execution_call" ]
173172
173+ signature : Optional [str ] = None
174+ """A signature hash for backend validation."""
174175
175- DeltaFunctionResultResult : TypeAlias = Union [DeltaFunctionResultResultItems , str , object ]
176176
177+ class DeltaURLContextCall (BaseModel ):
178+ id : str
179+ """A unique ID for this specific tool call."""
177180
178- class DeltaFunctionResult (BaseModel ):
179- call_id : str
180- """ID to match the ID from the function call block."""
181+ arguments : URLContextCallArguments
182+ """The arguments to pass to the URL context."""
181183
182- result : DeltaFunctionResultResult
183- """Tool call result delta."""
184+ type : Literal ["url_context_call" ]
184185
185- type : Literal ["function_result" ]
186+ signature : Optional [str ] = None
187+ """A signature hash for backend validation."""
186188
187- is_error : Optional [bool ] = None
188189
189- name : Optional [str ] = None
190+ class DeltaGoogleSearchCall (BaseModel ):
191+ id : str
192+ """A unique ID for this specific tool call."""
193+
194+ arguments : GoogleSearchCallArguments
195+ """The arguments to pass to Google Search."""
196+
197+ type : Literal ["google_search_call" ]
190198
191199 signature : Optional [str ] = None
192200 """A signature hash for backend validation."""
193201
194202
195- class DeltaCodeExecutionCall (BaseModel ):
203+ class DeltaMCPServerToolCall (BaseModel ):
196204 id : str
197205 """A unique ID for this specific tool call."""
198206
199- arguments : CodeExecutionCallArguments
200- """The arguments to pass to the code execution."""
207+ arguments : Dict [str , object ]
201208
202- type : Literal [ "code_execution_call" ]
209+ name : str
203210
204- signature : Optional [str ] = None
205- """A signature hash for backend validation."""
211+ server_name : str
206212
213+ type : Literal ["mcp_server_tool_call" ]
207214
208- class DeltaCodeExecutionResult (BaseModel ):
209- call_id : str
210- """ID to match the ID from the function call block."""
215+ signature : Optional [str ] = None
216+ """A signature hash for backend validation."""
211217
212- result : str
213218
214- type : Literal ["code_execution_result" ]
219+ class DeltaFileSearchCall (BaseModel ):
220+ id : str
221+ """A unique ID for this specific tool call."""
215222
216- is_error : Optional [ bool ] = None
223+ type : Literal [ "file_search_call" ]
217224
218225 signature : Optional [str ] = None
219226 """A signature hash for backend validation."""
220227
221228
222- class DeltaURLContextCall (BaseModel ):
229+ class DeltaGoogleMapsCall (BaseModel ):
223230 id : str
224231 """A unique ID for this specific tool call."""
225232
226- arguments : URLContextCallArguments
227- """The arguments to pass to the URL context."""
233+ type : Literal ["google_maps_call" ]
228234
229- type : Literal ["url_context_call" ]
235+ arguments : Optional [GoogleMapsCallArguments ] = None
236+ """The arguments to pass to the Google Maps tool."""
230237
231238 signature : Optional [str ] = None
232239 """A signature hash for backend validation."""
233240
234241
235- class DeltaURLContextResult (BaseModel ):
242+ DeltaFunctionResultResultFunctionResultSubcontentList : TypeAlias = Annotated [
243+ Union [TextContent , ImageContent ], PropertyInfo (discriminator = "type" )
244+ ]
245+
246+
247+ class DeltaFunctionResult (BaseModel ):
236248 call_id : str
237249 """ID to match the ID from the function call block."""
238250
239- result : List [URLContextResult ]
251+ result : Union [ List [DeltaFunctionResultResultFunctionResultSubcontentList ], str , object ]
240252
241- type : Literal ["url_context_result " ]
253+ type : Literal ["function_result " ]
242254
243255 is_error : Optional [bool ] = None
244256
257+ name : Optional [str ] = None
258+
245259 signature : Optional [str ] = None
246260 """A signature hash for backend validation."""
247261
248262
249- class DeltaGoogleSearchCall (BaseModel ):
250- id : str
251- """A unique ID for this specific tool call."""
263+ class DeltaCodeExecutionResult (BaseModel ):
264+ call_id : str
265+ """ID to match the ID from the function call block ."""
252266
253- arguments : GoogleSearchCallArguments
254- """The arguments to pass to Google Search."""
267+ result : str
255268
256- type : Literal ["google_search_call" ]
269+ type : Literal ["code_execution_result" ]
270+
271+ is_error : Optional [bool ] = None
257272
258273 signature : Optional [str ] = None
259274 """A signature hash for backend validation."""
260275
261276
262- class DeltaGoogleSearchResult (BaseModel ):
277+ class DeltaURLContextResult (BaseModel ):
263278 call_id : str
264279 """ID to match the ID from the function call block."""
265280
266- result : List [GoogleSearchResult ]
281+ result : List [URLContextResult ]
267282
268- type : Literal ["google_search_result " ]
283+ type : Literal ["url_context_result " ]
269284
270285 is_error : Optional [bool ] = None
271286
272287 signature : Optional [str ] = None
273288 """A signature hash for backend validation."""
274289
275290
276- class DeltaMCPServerToolCall (BaseModel ):
277- id : str
278- """A unique ID for this specific tool call."""
279-
280- arguments : Dict [str , object ]
291+ class DeltaGoogleSearchResult (BaseModel ):
292+ call_id : str
293+ """ID to match the ID from the function call block."""
281294
282- name : str
295+ result : List [ GoogleSearchResult ]
283296
284- server_name : str
297+ type : Literal [ "google_search_result" ]
285298
286- type : Literal [ "mcp_server_tool_call" ]
299+ is_error : Optional [ bool ] = None
287300
288301 signature : Optional [str ] = None
289302 """A signature hash for backend validation."""
290303
291304
292- DeltaMCPServerToolResultResultItemsItem : TypeAlias = Union [TextContent , ImageContent ]
293-
294-
295- class DeltaMCPServerToolResultResultItems (BaseModel ):
296- items : Optional [List [DeltaMCPServerToolResultResultItemsItem ]] = None
297-
298-
299- DeltaMCPServerToolResultResult : TypeAlias = Union [DeltaMCPServerToolResultResultItems , str , object ]
305+ DeltaMCPServerToolResultResultFunctionResultSubcontentList : TypeAlias = Annotated [
306+ Union [TextContent , ImageContent ], PropertyInfo (discriminator = "type" )
307+ ]
300308
301309
302310class DeltaMCPServerToolResult (BaseModel ):
303311 call_id : str
304312 """ID to match the ID from the function call block."""
305313
306- result : DeltaMCPServerToolResultResult
307- """Tool call result delta."""
314+ result : Union [List [DeltaMCPServerToolResultResultFunctionResultSubcontentList ], str , object ]
308315
309316 type : Literal ["mcp_server_tool_result" ]
310317
@@ -316,16 +323,6 @@ class DeltaMCPServerToolResult(BaseModel):
316323 """A signature hash for backend validation."""
317324
318325
319- class DeltaFileSearchCall (BaseModel ):
320- id : str
321- """A unique ID for this specific tool call."""
322-
323- type : Literal ["file_search_call" ]
324-
325- signature : Optional [str ] = None
326- """A signature hash for backend validation."""
327-
328-
329326class DeltaFileSearchResult (BaseModel ):
330327 call_id : str
331328 """ID to match the ID from the function call block."""
@@ -338,19 +335,6 @@ class DeltaFileSearchResult(BaseModel):
338335 """A signature hash for backend validation."""
339336
340337
341- class DeltaGoogleMapsCall (BaseModel ):
342- id : str
343- """A unique ID for this specific tool call."""
344-
345- type : Literal ["google_maps_call" ]
346-
347- arguments : Optional [GoogleMapsCallArguments ] = None
348- """The arguments to pass to the Google Maps tool."""
349-
350- signature : Optional [str ] = None
351- """A signature hash for backend validation."""
352-
353-
354338class DeltaGoogleMapsResult (BaseModel ):
355339 call_id : str
356340 """ID to match the ID from the function call block."""
@@ -374,18 +358,18 @@ class DeltaGoogleMapsResult(BaseModel):
374358 DeltaThoughtSummary ,
375359 DeltaThoughtSignature ,
376360 DeltaFunctionCall ,
377- DeltaFunctionResult ,
378361 DeltaCodeExecutionCall ,
379- DeltaCodeExecutionResult ,
380362 DeltaURLContextCall ,
381- DeltaURLContextResult ,
382363 DeltaGoogleSearchCall ,
383- DeltaGoogleSearchResult ,
384364 DeltaMCPServerToolCall ,
385- DeltaMCPServerToolResult ,
386365 DeltaFileSearchCall ,
387- DeltaFileSearchResult ,
388366 DeltaGoogleMapsCall ,
367+ DeltaFunctionResult ,
368+ DeltaCodeExecutionResult ,
369+ DeltaURLContextResult ,
370+ DeltaGoogleSearchResult ,
371+ DeltaMCPServerToolResult ,
372+ DeltaFileSearchResult ,
389373 DeltaGoogleMapsResult ,
390374 ],
391375 PropertyInfo (discriminator = "type" ),
@@ -394,12 +378,14 @@ class DeltaGoogleMapsResult(BaseModel):
394378
395379class ContentDelta (BaseModel ):
396380 delta : Delta
381+ """The delta content data for a content block."""
397382
398383 event_type : Literal ["content.delta" ]
399384
400385 index : int
401386
402387 event_id : Optional [str ] = None
403388 """
404- The event_id token to be used to resume the interaction stream, from this event.
389+ The event_id token to be used to resume the interaction stream, from
390+ this event.
405391 """
0 commit comments