[Refactor][GPT-OSS] Harmony Responses API Refactor to use HarmonyParser (#47185)

Signed-off-by: Yifan Zong <yzong@redhat.com>
This commit is contained in:
yzong-rh
2026-06-30 19:23:20 -04:00
committed by GitHub
parent 92c7fac640
commit b1190d03cc
9 changed files with 438 additions and 868 deletions
@@ -251,7 +251,13 @@ def _validate_field_consistency(events: list) -> None:
"response.reasoning_part.added",
):
_assert_item_fields(event, etype, active_item_id, active_output_index)
active_content_index = getattr(event, "content_index", None)
content_index = getattr(event, "content_index", None)
if active_content_index is None:
assert content_index == 0, (
f"{etype} for a new item must start at content_index 0, "
f"got {content_index}"
)
active_content_index = content_index
continue
# --- all other item-level events --------------------------