Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0rc1#45239
Open
eavanvalkenburg wants to merge 2 commits intoAzure:lusu/agentserver-1110from
Open
Upgrade azure-ai-agentserver-agentframework to agent-framework 1.0.0rc1#45239eavanvalkenburg wants to merge 2 commits intoAzure:lusu/agentserver-1110from
eavanvalkenburg wants to merge 2 commits intoAzure:lusu/agentserver-1110from
Conversation
|
Thank you for your contribution @eavanvalkenburg! We will review the pull request and get back to you soon. |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR upgrades the azure-ai-agentserver-agentframework package to use agent-framework version 1.0.0b260212 (February 2026 release), applying significant breaking changes from the upstream framework. The upgrade modernizes the codebase with Python 3.10+ features and simplifies the architecture.
Changes:
- Upgraded agent-framework dependencies from 1.0.0b251007 to 1.0.0b260212
- Refactored utility classes into module-level functions and constants
- Replaced isinstance checks with Python 3.10+ match statements throughout converters
- Updated streaming API from
run_stream()torun(stream=True)returningResponseStream - Modernized observability setup from
setup_observability()toconfigure_azure_monitor()+enable_instrumentation()
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Updated agent-framework dependencies to version 1.0.0b260212 |
| constants.py | Converted Constants class to module-level constants |
| agent_id_generator.py | Converted AgentIdGenerator class to generate_agent_id() function |
| agent_framework_input_converters.py | Refactored AgentFrameworkInputConverter class to transform_input() function; replaced isinstance checks with match statements |
| agent_framework_output_streaming_converter.py | Updated to use AgentResponseUpdate, Content types; added text_reasoning support; replaced isinstance with match statements |
| agent_framework_output_non_streaming_converter.py | Updated to use AgentResponse, Content types; replaced isinstance with match statements |
| agent_framework.py | Updated to use SupportsAgentRun; changed streaming API to run(stream=True); modernized observability setup; removed asyncio timeout logic |
| test_agent_framework_input_converter.py | Updated tests to use transform_input function and new Message/Content APIs |
| workflow_agent_simple.py | Updated to use new Message/Content APIs, WorkflowEvent, WorkflowBuilder(start_executor=...) pattern |
| minimal_async_example.py | Changed create_agent() to as_agent() |
| mcp_simple.py | Changed create_agent() to as_agent() |
| mcp_apikey.py | Changed create_agent() to as_agent() |
| minimal_example.py | Changed create_agent() to as_agent() |
...r/azure-ai-agentserver-agentframework/azure/ai/agentserver/agentframework/agent_framework.py
Outdated
Show resolved
Hide resolved
...ork/azure/ai/agentserver/agentframework/models/agent_framework_output_streaming_converter.py
Show resolved
Hide resolved
04c6572 to
df4ff48
Compare
a242d55 to
11e70db
Compare
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2b1b4c4 to
67b69fd
Compare
lusu-msft
reviewed
Feb 25, 2026
|
|
||
|
|
||
| class AgentFrameworkInputConverter: | ||
| def transform_input( # pylint: disable=too-many-return-statements |
Member
There was a problem hiding this comment.
Could you do the update based on dev branch?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Upgrades the agent-framework dependency from
1.0.0b251007(Oct 2025) to1.0.0rc1(Feb 2026), applying all breaking changes from the official upgrade guide.Breaking changes applied
AgentProtocol→SupportsAgentRunChatMessage/Role/TextContent→Message/string roles/ContentAgentRunResponse→AgentResponse,AgentRunResponseUpdate→AgentResponseUpdaterun_stream()→run(stream=True)returningResponseStreamisinstancechecks →Content.typestring discriminator withmatchstatements.create_agent()→.as_agent()in samplesWorkflowBuilderconstructor,WorkflowEvent, options pattern in workflow samplesetup_observability()→configure_azure_monitor()+enable_instrumentation()Refactoring
Constants,AgentIdGenerator,AgentFrameworkInputConverter)matchstatements throughout converterstext_reasoningcontent type supportResponseStreamasync iteration patternTesting
All 9 unit tests pass.