test: use public API for streaming structured output

Agent-Logs-Url: https://github.com/microsoft/agent-framework/sessions/f62076ef-558d-49e8-8fe2-f38d527c9639

Co-authored-by: eavanvalkenburg <13749212+eavanvalkenburg@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-05-19 05:53:40 +00:00
committed by GitHub
Unverified
parent 5d43f48a9d
commit 6d6b35d8b3
2 changed files with 8 additions and 1 deletions
@@ -619,6 +619,9 @@ class RawOpenAIChatClient( # type: ignore[misc]
response_format: Any | None = None
def _finalize_with_captured_format(updates: Sequence[ChatResponseUpdate]) -> ChatResponse[Any]:
# ResponseStream only calls the finalizer after iterating or draining `_stream()`,
# so `response_format` has already been populated from the validated request state
# unless request setup failed before streaming began.
return self._finalize_response_updates(updates, response_format=response_format)
async def _stream() -> AsyncIterable[ChatResponseUpdate]: