@@ -242,7 +242,7 @@ def _content_to_input_items(content: Any, system_role: str) -> list[dict[str, An
242242 "id" : thought_signature or f"reasoning_{ len (items )} " ,
243243 "type" : "reasoning" ,
244244 "summary" : [],
245- "content" : [{"type" : "reasoning_summary_text " , "text" : text }],
245+ "content" : [{"type" : "reasoning_text " , "text" : text }],
246246 }
247247 if thought_signature :
248248 reasoning_item ["encrypted_content" ] = thought_signature
@@ -435,7 +435,7 @@ def _response_output_to_parts(output: Iterable[Any]) -> list[Any]:
435435 getattr (item , "encrypted_content" , None )
436436 )
437437 for content in getattr (item , "content" , None ) or []:
438- if getattr (content , "type" , None ) == "reasoning_summary_text " :
438+ if getattr (content , "type" , None ) == "reasoning_text " :
439439 parts .append (
440440 _build_text_part (
441441 getattr (content , "text" , "" ),
@@ -652,14 +652,22 @@ async def generate_content_async(
652652 async for event in stream_response : # type: ignore[union-attr] # create() returns union of Response|AsyncStream; we know it's AsyncStream here
653653 event_type : str | None = getattr (event , "type" , None )
654654
655- if event_type == "response.reasoning_summary_text .delta" :
655+ if event_type == "response.reasoning_text .delta" :
656656 delta : str = getattr (event , "delta" , "" )
657657 if delta :
658658 yield _parts_to_llm_response (
659659 [_build_text_part (delta , thought = True )],
660660 is_partial = True ,
661661 )
662662
663+ elif event_type == "response.reasoning_summary_text.delta" :
664+ delta = getattr (event , "delta" , "" )
665+ if delta :
666+ yield _parts_to_llm_response (
667+ [_build_text_part (delta , thought = True )],
668+ is_partial = True ,
669+ )
670+
663671 elif event_type == "response.output_text.delta" :
664672 delta = getattr (event , "delta" , "" )
665673 if delta :
0 commit comments