openai[patch]: include 'type' key internally when streaming reasoning blocks (#31661)

Covered by existing tests.

Will make it easier to process streamed reasoning blocks.
This commit is contained in:
ccurme
2025-06-18 15:01:54 -04:00
committed by GitHub
parent 19544ba3c9
commit e2a0ff07fd
2 changed files with 3 additions and 1 deletions

View File

@@ -3756,6 +3756,7 @@ def _convert_responses_chunk_to_generation_chunk(
{"index": chunk.summary_index, "type": "summary_text", "text": ""}
],
"index": current_index,
"type": "reasoning",
}
)
elif chunk.type == "response.image_generation_call.partial_image":
@@ -3773,6 +3774,7 @@ def _convert_responses_chunk_to_generation_chunk(
}
],
"index": current_index,
"type": "reasoning",
}
)
else: