[BREAKING] Python: Rename from_agent_run_response_updates to from_agent_response_updates#3659
[BREAKING] Python: Rename from_agent_run_response_updates to from_agent_response_updates#3659TaoChenOSU wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Renames the AgentResponse helper for consolidating streaming updates from from_agent_run_response_updates to from_agent_response_updates to align with the earlier AgentRunResponse* -> AgentResponse* type rename.
Changes:
- Updated internal call sites across multiple Python packages to use
AgentResponse.from_agent_response_updates(...). - Renamed the
AgentResponseclassmethod itself (including overload signatures) to the new name. - Updated one unit test call site and related inline documentation references.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| python/packages/durabletask/agent_framework_durabletask/_entities.py | Switches durable task streaming consolidation to the renamed method. |
| python/packages/declarative/agent_framework_declarative/_workflows/_actions_agents.py | Updates declarative workflow agent actions to use the renamed consolidation method. |
| python/packages/core/tests/core/test_types.py | Updates the unit test to call the renamed method. |
| python/packages/core/agent_framework/observability.py | Updates tracing code to build final response using the renamed method. |
| python/packages/core/agent_framework/_workflows/_agent_executor.py | Updates agent executor streaming finalization to use the renamed method. |
| python/packages/core/agent_framework/_workflows/_agent.py | Updates merge logic docs/calls to use the renamed method. |
| python/packages/core/agent_framework/_types.py | Renames the AgentResponse classmethod and updates the example usage in docstring. |
| python/packages/core/agent_framework/_agents.py | Updates agent tool wrapper to use the renamed method. |
| python/packages/ag-ui/agent_framework_ag_ui/_run.py | Updates AG-UI structured output finalization to use the renamed method. |
| python/packages/a2a/agent_framework_a2a/_agent.py | Updates A2A agent to consolidate updates using the renamed method. |
Comments suppressed due to low confidence (1)
python/packages/core/agent_framework/_types.py:2592
- Renaming this public classmethod removes the previous API (
from_agent_run_response_updates) entirely, which is a breaking change for external consumers. Consider keepingfrom_agent_run_response_updatesas a thin deprecated alias that forwards tofrom_agent_response_updates(and emits a DeprecationWarning), or mark the PR/release as breaking and update any public API docs/changelog accordingly.
def from_agent_response_updates(
cls: type[TAgentRunResponse],
updates: Sequence["AgentResponseUpdate"],
*,
output_format_type: type[BaseModel] | None = None,
) -> TAgentRunResponse:
| @@ -1129,7 +1129,7 @@ def test_agent_run_response_text_property_empty() -> None: | |||
|
|
|||
| def test_agent_run_response_from_updates(agent_response_update: AgentResponseUpdate) -> None: | |||
There was a problem hiding this comment.
The test name still refers to agent_run_response even though the API under test is now AgentResponse.from_agent_response_updates. Renaming the test to match the updated terminology would keep the suite consistent and easier to search/understand.
| def test_agent_run_response_from_updates(agent_response_update: AgentResponseUpdate) -> None: | |
| def test_agent_response_from_agent_response_updates(agent_response_update: AgentResponseUpdate) -> None: |
|
New names are also done here: #3647 let's not make two breaking changes |
|
Closing this one as the new names merged (from_updates and from_update_generators) those names give enough context since you call them on |
Motivation and Context
We have renamed
AgentRunResponse[Update]toAgentResponse[Update], but we didn't rename some of the methods.Description
Rename
from_agent_run_response_updatestofrom_agent_response_updatesContribution Checklist