.NET: Update Azure.AI.Projects 2.0.0-beta.1#4270
Open
rogerbarreto wants to merge 4 commits intomicrosoft:mainfrom
Open
.NET: Update Azure.AI.Projects 2.0.0-beta.1#4270rogerbarreto wants to merge 4 commits intomicrosoft:mainfrom
rogerbarreto wants to merge 4 commits intomicrosoft:mainfrom
Conversation
- Bump Azure.AI.Projects to 2.0.0-alpha.20260213.1 - Bump Azure.AI.Projects.OpenAI to 2.0.0-alpha.20260213.1 - Bump System.ClientModel to 1.9.0 (transitive dependency) - Switch both GetAgent and CreateAgentVersion to protocol methods with MEAI user-agent policy injection via RequestOptions - Migrate 29 CREATE-path tests from FakeAgentClient to HttpHandlerAssert pattern for real HTTP pipeline testing - Fix StructuredOutputDefinition constructor (BinaryData -> IDictionary) - Fix responses endpoint path (openai/responses -> /responses) - Add local-packages NuGet source for pre-release nupkgs Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Update Azure.AI.Projects and Azure.AI.Projects.OpenAI to 2.0.0-beta.1 - Remove local-packages NuGet source (packages now on nuget.org) - Fix MemorySearchTool -> MemorySearchPreviewTool rename - Fix RedTeams.CreateAsync ambiguous call - Fix CreateAgentVersion/Async signature change (BinaryData -> string) - Suppress AAIP001 experimental warning for WorkflowAgentDefinition Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Azure.AI.Projects from version 1.2.0-beta.5 to 2.0.0-beta.1, along with Azure.AI.Projects.OpenAI and System.ClientModel dependencies. The update includes several breaking API changes that required code adjustments across the codebase, including modified method signatures, renamed types, and updated constructor parameters. The changes also improve test infrastructure with better resource management patterns.
Changes:
- Updated Azure.AI.Projects package versions (2.0.0-beta.1) and System.ClientModel (1.9.0) with corresponding breaking API adaptations
- Refactored test infrastructure to properly dispose HTTP handler resources using a new
DisposableTestClientwrapper pattern - Updated sample code to accommodate SDK API changes (MemorySearchPreviewTool, experimental warnings, method signatures)
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| dotnet/Directory.Packages.props | Updated package versions for Azure.AI.Projects (2.0.0-beta.1), Azure.AI.Projects.OpenAI (2.0.0-beta.1), and System.ClientModel (1.9.0) |
| dotnet/src/Microsoft.Agents.AI.AzureAI/AzureAIProjectChatClientExtensions.cs | Updated protocol method calls to include new foundryFeatures parameter, simplified error handling, improved documentation comments, and reorganized static field placement |
| dotnet/tests/Microsoft.Agents.AI.AzureAI.UnitTests/AzureAIProjectChatClientTests.cs | Made HTTP request filtering more specific by adding POST method check and updating path pattern from "openai/responses" to "/responses" |
| dotnet/tests/Microsoft.Agents.AI.AzureAI.UnitTests/AzureAIProjectChatClientExtensionsTests.cs | Introduced DisposableTestClient wrapper for proper resource disposal, updated test mocks to match new SDK signatures (foundryFeatures parameter), adapted StructuredOutputDefinition constructor to accept Dictionary instead of BinaryData, and improved user-agent header verification |
| dotnet/samples/GettingStarted/Workflows/Declarative/HostedWorkflow/Program.cs | Added pragma warning suppressions for experimental WorkflowAgentDefinition API |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Step26_MemorySearch/Program.cs | Updated type name from MemorySearchTool to MemorySearchPreviewTool |
| dotnet/samples/GettingStarted/FoundryAgents/FoundryAgents_Evaluations_Step01_RedTeaming/Program.cs | Added explicit options: null parameter to RedTeams.CreateAsync call |
dotnet/src/Microsoft.Agents.AI.AzureAI/AzureAIProjectChatClientExtensions.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Motivation and Context
The
Azure.AI.ProjectsandAzure.AI.Projects.OpenAIpackages2.0.0-beta.1are now available on NuGet.org, replacing the previous alpha builds that required a local package source.Description
Azure.AI.ProjectsandAzure.AI.Projects.OpenAIfrom2.0.0-alpha.20260213.1to2.0.0-beta.1(NuGet.org)local-packagesNuGet source and its package source mapping fromnuget.config2.0.0-beta.1:MemorySearchToolrenamed toMemorySearchPreviewTool(FoundryAgents_Step26_MemorySearchsample)RedTeams.CreateAsyncoverload ambiguity resolved with explicitoptions: null(FoundryAgents_Evaluations_Step01_RedTeamingsample)CreateAgentVersion/CreateAgentVersionAsyncparameter changed fromBinaryData?tostring?forfoundryFeatures, andAgentVersionCreationOptionsmade nullable (AzureAIProjectChatClientExtensionsTests)#pragma warning disable AAIP001for experimentalWorkflowAgentDefinition(HostedWorkflowsample)Contribution Checklist