chore: Dev merge to Main#273
Open
Prachig-Microsoft wants to merge 25 commits into
Open
Conversation
…proved telemetry and error reporting
…and OrchestratorBase
…eter support and backward compatibility
fix: update werkzeug to 3.1.6 and add idna 3.15 to dependencies
When callers pass credential=None explicitly, the key exists in kwargs but the ad_token_provider mapping was skipped. Use kwargs.get() is None to correctly handle this case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
When callers pass credential=None explicitly, the key exists in kwargs but the ad_token_provider mapping was skipped. Use kwargs.get() is None to correctly handle this case. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Keep agent-framework==1.3.0 upgrade from PR (per user story 43673). Accept newer general dependency versions from dev branch. Keep upgraded azure_openai_response_retry.py from PR. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…de clarity - Fix create_agents return type annotation to dict[str, Agent] - Narrow participants param to Mapping only (Sequence was unused) - Normalize self.agents with dict() and correct value type - Replace redundant pass with continue and clarifying comment - Add teardown_module to test files to restore patched Message class Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update InputObserverMiddleware to use Message(contents=) instead of Message(text=) since agent-framework 1.3.0 renamed the parameter - Update corresponding tests to verify contents field - Fix teardown_module signature to accept optional module parameter Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The teardown_module from one test file was restoring the real Message before another test file's tests ran. Adding setup_module ensures the stub is re-applied before each module's tests execute. Also fix test assertion to check contents instead of text since the middleware now uses Message(contents=). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The middleware now uses Message(contents=) so the test must verify the contents field, not text. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Set both text= and contents= when constructing Message in InputObserverMiddleware for compatibility with downstream code - Restore missing copyright header in azure_openai_response_retry.py Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request upgrades key Python dependencies and refactors the processor’s agent_framework integration to align with agent-framework 1.3.0 API changes (notably ChatAgent→Agent, ToolProtocol→FunctionTool, and the updated workflow event model), plus related test updates.
Changes:
- Upgraded dependency versions (e.g., agent-framework 1.3.0, azure-ai-projects 2.1.0, werkzeug 3.1.6, idna 3.15) across processor, backend-api, and infra requirements/lockfiles.
- Refactored orchestration and framework integration to use
Agent,Message,WorkflowEvent, and updated client creation (includingDurableAIAgentClientcompatibility). - Updated unit tests to match the new workflow event/message APIs and adjusted middleware/context-provider expectations.
Reviewed changes
Copilot reviewed 29 out of 31 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| src/processor/src/tests/unit/steps/test_migration_processor_run.py | Updates workflow event fixtures to WorkflowEvent.* helpers. |
| src/processor/src/tests/unit/libs/agent_framework/test_shared_memory_context_provider.py | Adjusts context assertions to tolerate context shape changes. |
| src/processor/src/tests/unit/libs/agent_framework/test_middlewares_extras.py | Introduces Message test stubs and patches for middleware compatibility. |
| src/processor/src/tests/unit/libs/agent_framework/test_input_observer_middleware.py | Updates middleware tests for Message/role/content changes. |
| src/processor/src/tests/unit/libs/agent_framework/test_groupchat_orchestrator_internals.py | Updates orchestrator internals tests to Message + string role usage. |
| src/processor/src/tests/unit/libs/agent_framework/test_agent_framework_helper.py | Updates helper tests to reflect removed Azure client classes + Durable client. |
| src/processor/src/tests/unit/libs/agent_framework/test_agent_builder.py | Updates patches from ChatAgent to Agent. |
| src/processor/src/steps/migration_processor.py | Refactors runtime event handling to WorkflowEvent.type + executor_id normalization. |
| src/processor/src/steps/documentation/orchestration/documentation_orchestrator.py | Replaces ToolProtocol annotations with FunctionTool. |
| src/processor/src/steps/design/orchestration/design_orchestrator.py | Replaces ToolProtocol annotations with FunctionTool. |
| src/processor/src/steps/convert/orchestration/yaml_convert_orchestrator.py | Replaces ToolProtocol annotations with FunctionTool. |
| src/processor/src/steps/analysis/orchestration/analysis_orchestrator.py | Replaces ToolProtocol annotations with FunctionTool. |
| src/processor/src/libs/mcp_server/MCPMicrosoftDocs.py | Updates example usage from ChatAgent to Agent. |
| src/processor/src/libs/mcp_server/MCPDatetimeTool.py | Updates example usage from ChatAgent to Agent. |
| src/processor/src/libs/mcp_server/MCPBlobIOTool.py | Updates example usage from ChatAgent to Agent. |
| src/processor/src/libs/base/orchestrator_base.py | Updates agent construction to Agent + adds tool-result compaction strategy + new coordinator response model. |
| src/processor/src/libs/agent_framework/shared_memory_context_provider.py | Refactors provider to Message and introduces a local Context wrapper. |
| src/processor/src/libs/agent_framework/middlewares.py | Updates middleware typing and Message handling for 1.3.0. |
| src/processor/src/libs/agent_framework/groupchat_orchestrator.py | Refactors orchestrator types/events/messages for 1.3.0. |
| src/processor/src/libs/agent_framework/coordinator_selection_response.py | Adds new Coordinator response schema model. |
| src/processor/src/libs/agent_framework/azure_openai_response_retry.py | Retargets retry wrapper to new OpenAIChatClient base and updates call signatures. |
| src/processor/src/libs/agent_framework/agent_speaking_capture.py | Updates middleware context type to AgentContext. |
| src/processor/src/libs/agent_framework/agent_info.py | Updates tool typing to FunctionTool. |
| src/processor/src/libs/agent_framework/agent_framework_helper.py | Updates typing/imports and adds DurableAIAgentClient compatibility handling. |
| src/processor/src/libs/agent_framework/agent_builder.py | Refactors builder to construct Agent and use 1.3.0 types. |
| src/processor/pyproject.toml | Bumps processor dependencies and adds override for idna. |
| src/backend-api/uv.lock | Updates locked versions/overrides (werkzeug/idna). |
| src/backend-api/pyproject.toml | Updates override-dependencies (werkzeug/idna). |
| infra/vscode_web/requirements.txt | Upgrades azure-ai-projects to 2.1.0. |
| infra/vscode_web/endpoint-requirements.txt | Upgrades azure-ai-projects to 2.1.0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
… retry check - Remove unused WorkflowEvent import from migration_processor.py (fixes lint F401) - Restore 'model produced invalid content' transient error retry in azure_openai_response_retry.py (regression from agent-framework 1.3.0 refactor) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2 tasks
…nused-import fix: remove unused WorkflowEvent import and restore 'invalid content' retry check
fix: code quality issue
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 33 out of 35 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
src/processor/src/libs/agent_framework/shared_memory_context_provider.py:312
SharedMemoryContextProvider._get_text()doesn’t considerMessage.contents, but other code/tests treat.contentsas a primary carrier for message content. This can cause empty/incorrect queries and stored memory text when messages populatecontentsinstead oftext/content.
if hasattr(message, "text") and message.text:
return message.text
if hasattr(message, "content"):
return str(message.content) if message.content else ""
return str(message) if message else ""
Comment on lines
60
to
66
| [tool.uv] | ||
| prerelease = "allow" | ||
| override-dependencies = [ | ||
| "urllib3==2.7.0", | ||
| "authlib==1.7.1", | ||
| "idna==3.15", | ||
| ] |
Comment on lines
150
to
153
| for message in context.messages: | ||
| if message.role == Role.USER and message.text: | ||
| if message.role == ROLE_USER and message.text: | ||
| original_text = message.text | ||
| updated_text = original_text |
Comment on lines
95
to
99
| for agent in (self.agents or {}).values(): | ||
| # ChatAgent stores providers in agent.context_provider (AggregateContextProvider) | ||
| # Agent stores providers in agent.context_provider (ContextProvider) | ||
| # which has a .providers list of individual ContextProvider instances | ||
| agg_provider = getattr(agent, "context_provider", None) | ||
| if agg_provider is None: |
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.
This pull request upgrades several dependencies and refactors the
agent_frameworkintegration to support recent upstream changes, especially the transition fromChatAgenttoAgentand fromToolProtocoltoFunctionTool. It also adjusts type annotations and import logic to align with the new agent-framework 1.3.0 API, and adds compatibility for the newDurableAIAgentClientclient class.Dependency Upgrades:
azure-ai-projectsfrom1.0.0b12to2.1.0in bothinfra/vscode_web/endpoint-requirements.txtandinfra/vscode_web/requirements.txt.agent-frameworkto1.3.0,azure-ai-agentsto1.2.0b6, and addedidna==3.15insrc/processor/pyproject.toml. [1] [2]werkzeugto3.1.6and addedidna==3.15as an override dependency insrc/backend-api/pyproject.toml.Refactoring for agent-framework 1.3.0:
agent_builder.pyto replace all usage ofChatAgentwithAgent,ToolProtocolwithFunctionTool, and updated type annotations and docstrings accordingly. Also updated the middleware and context provider types to match the new API, and removed references to aggregate context providers and old middleware types. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18]Client creation and compatibility:
agent_framework_helper.pyto useDurableAIAgentClientinstead of the removed Azure OpenAI client classes, and adjusted type hints and import logic for compatibility with agent-framework 1.3.0. [1] [2] [3] [4] [5] [6]Type and import adjustments:
agent_info.pyto useFunctionToolinstead of the removedToolProtocol.## PurposeDoes this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information