Skip to content

Conversation

@TaoChenOSU
Copy link
Contributor

@TaoChenOSU TaoChenOSU commented Feb 4, 2026

Motivation and Context

We have renamed AgentRunResponse[Update] to AgentResponse[Update], but we didn't rename some of the methods.

Description

Rename from_agent_run_response_updates to from_agent_response_updates

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@TaoChenOSU TaoChenOSU self-assigned this Feb 4, 2026
@TaoChenOSU TaoChenOSU requested a review from a team as a code owner February 4, 2026 00:40
Copilot AI review requested due to automatic review settings February 4, 2026 00:40
@github-actions github-actions bot changed the title Rename from_agent_run_response_updates to from_agent_response_updates Python: Rename from_agent_run_response_updates to from_agent_response_updates Feb 4, 2026
@TaoChenOSU TaoChenOSU changed the title Python: Rename from_agent_run_response_updates to from_agent_response_updates [BREAKING] Python: Rename from_agent_run_response_updates to from_agent_response_updates Feb 4, 2026
@markwallace-microsoft
Copy link
Member

Python Test Coverage

Python Test Coverage Report •
FileStmtsMissCoverMissing
packages/a2a/agent_framework_a2a
   _agent.py139794%352–353, 390–391, 420–422
packages/ag-ui/agent_framework_ag_ui
   _run.py43212171%151–158, 301, 320–321, 336–337, 348, 351–352, 354–355, 357–359, 369, 379–382, 386–388, 390, 400, 403–406, 408–409, 412–418, 421–423, 426, 442–444, 451, 457–458, 460–461, 475–481, 492, 505, 507–508, 542–543, 595–597, 609–611, 635, 640–642, 758, 769–770, 777, 824–826, 841, 847, 855, 857, 893–899, 902–905, 907–916, 919, 926–927, 932, 938–940, 953–955
packages/core/agent_framework
   _agents.py3104087%455, 854, 857–859, 984–986, 991–993, 1094, 1135, 1137, 1146–1151, 1157, 1159, 1169–1170, 1177, 1179–1180, 1188–1192, 1200–1201, 1203, 1208, 1210, 1244, 1284, 1304
   _types.py9539590%80, 103–104, 158, 163, 182, 184, 188, 192, 194, 196, 198, 216, 220, 246, 268, 273, 278, 282, 308, 312, 658–659, 1030, 1092, 1109, 1127, 1132, 1150, 1160, 1177–1178, 1180, 1198–1199, 1201, 1208–1209, 1211, 1246, 1257–1258, 1260, 1298, 1543, 1548, 1552, 1556, 1748, 1758, 1803, 1848–1853, 1875, 1880, 2281, 2290, 2426, 2514–2516, 2555, 2647, 2674, 2683, 2921–2923, 2926–2928, 2932, 2937, 2941, 3053–3055, 3083, 3137, 3141–3143, 3145, 3156–3157, 3160–3164, 3170
   observability.py6257687%324, 326–328, 331–333, 338–339, 345–346, 352–353, 360, 362–364, 367–369, 374–375, 381–382, 388–389, 396, 652, 655, 663–664, 667–670, 672, 675–677, 680–681, 709, 711, 722–724, 726–729, 733, 741, 842, 844, 993, 995, 999–1004, 1006, 1009–1013, 1015, 1290, 1615, 1618, 1677, 1849, 2003, 2005
packages/core/agent_framework/_workflows
   _agent.py2804583%62, 70–76, 104–105, 261, 317, 331, 344, 393–396, 402, 408, 412–413, 416–422, 426–427, 496, 503, 509–510, 521, 553, 560, 581, 590, 594, 596–598, 605
   _agent_executor.py1712386%95, 117, 151, 167–168, 219–220, 222–223, 255–257, 265–267, 277–279, 281, 285, 289, 293–294
TOTAL16335198087% 

Python Unit Test Overview

Tests Skipped Failures Errors Time
3821 221 💤 0 ❌ 0 🔥 1m 10s ⏱️

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 AgentResponse classmethod 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 keeping from_agent_run_response_updates as a thin deprecated alias that forwards to from_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:
Copy link

Copilot AI Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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:

Copilot uses AI. Check for mistakes.
@eavanvalkenburg
Copy link
Member

eavanvalkenburg commented Feb 4, 2026

New names are also done here: #3647 let's not make two breaking changes

@eavanvalkenburg
Copy link
Member

Closing this one as the new names merged (from_updates and from_update_generators) those names give enough context since you call them on AgentResponse or ChatResponse and the types clarify what kind of input is expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

6 participants