chore: dev to main merge#866
Open
Ragini-Microsoft wants to merge 17 commits into
Open
Conversation
- Update comments referencing AzureOpenAIChatClient to OpenAIChatCompletionClient - Remove unused TOKEN_ENDPOINT constant from title_service.py - Remove misleading 'Foundry requires hyphens' comment (name_sep uses underscores) - Fix HandoffBuilder mock in tests to stub participants(), with_start_agent(), and with_termination_condition() for proper chain validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ator and title service
…der in orchestrator.py
…hyphen agent names
Contributor
Coverage Report •
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
This PR modernizes the backend’s Microsoft Agent Framework integration by upgrading agent framework/Azure SDK dependencies and refactoring orchestrator/title generation code to align with the newer Agent + chat client APIs, while also tightening system-prompt leakage detection patterns and updating tests accordingly.
Changes:
- Upgrades agent framework packages and
azure-ai-projects, and refactors chat client/agent creation to useOpenAIChatCompletionClient+ directAgent(...)instantiation. - Switches workflow event handling from class-based checks to
event.typedispatch. - Updates system-prompt leakage regex patterns and adjusts orchestrator tests/mocks for the new APIs.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/backend/orchestrator.py |
Refactors chat client + agent initialization, workflow event dispatch, and system prompt leakage patterns. |
src/backend/services/title_service.py |
Updates title agent creation to use OpenAIChatCompletionClient + Agent. |
src/backend/requirements.txt |
Updates agent framework dependencies and bumps azure-ai-projects. |
infra/vscode_web/requirements.txt |
Bumps azure-ai-projects to match backend. |
src/tests/services/test_orchestrator.py |
Updates patches/mocks to reflect direct Agent usage and event.type dispatch. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…e OpenAI integration
…ed agent names and initialize wiring in TitleService
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.
Purpose
This pull request updates the backend to use the latest agent framework and Azure SDKs, refactors agent and chat client usage to match new APIs, and improves system prompt safety patterns. It also makes related changes in the title service and updates dependencies accordingly. The most important changes are summarized below:
Agent Framework & SDK Upgrades:
agent-framework-coreto 1.1.1, replacedagent-framework-azure-aiwithagent-framework-foundry1.1.1, and addedagent-framework-orchestrations1.0.0b260421. Updatedazure-ai-projectsto 2.1.0 in both backend and VSCode web requirements. [1] [2] [3]Chat Client & Agent Refactoring:
AzureOpenAIChatClientand its.create_agent()method with direct instantiation ofOpenAIChatCompletionClientandAgentobjects throughout the orchestrator and title service. Updated initialization logic and parameters to match the new APIs. [1] [2] [3] [4] [5] [6] [7] [8]System Prompt Pattern Improvements:
triage_agentandtriage-agent). [1] [2]Workflow Event Handling Updates:
Test and Mock Adjustments:
AgentandOpenAIChatCompletionClient. Adjusted builder mocks to support fluent chaining. [1] [2]Does this introduce a breaking change?
Golden Path Validation
Deployment Validation
What to Check
Verify that the following are valid
Other Information