Files
agent-framework/python/packages
T
Evan Mattson a033721ac2 Python: Fix response_format resolution in streaming finalizer (#4291)
* Python: Fix AgentResponse.value being None when streaming workflow (#3970)

The streaming path in BaseAgent.run() used the raw 'options' parameter
(passed by the caller) to bind response_format into the outer stream's
finalizer. When response_format was set in default_options rather than
runtime options, it was missing from the finalizer and value was None.

Fix: Use the merged chat_options from the run context (via ctx_holder),
matching the non-streaming path which already uses ctx['chat_options'].

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Address review feedback for #3970: safer ctx access, add test coverage

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
a033721ac2 ยท 2026-02-26 18:28:14 +00:00
History
..