Repository navigation
[BREAKING] .NET: Update AgentServer dependencies - #9721
Roger Barreto (rogerbarreto) merged 3 commits into
Conversation
Core beta.30 standardizes state-store concurrency on Azure.ETag, while Responses beta.9 partitions durable response state.
There was a problem hiding this comment.
🔵 Needs a closer look
Confirmed startup regressions require fixes, and the intentional persisted-state incompatibility warrants human review of upgrade and rollback safety.
2 open issues
What changed in this PR
Updates the .NET AgentServer dependencies and adapts Foundry hosting’s checkpoint persistence and recovery integration to the new preview APIs.
Changes:
- Upgrades AgentServer and supporting dependencies while retaining Azure.AI.Projects beta.3.
- Migrates concurrency tokens to
Azure.ETagand adopts the updated checkpoint metadata APIs. - Updates test doubles and resilience tests for the partitioned local response layout.
| File | Description |
|---|---|
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/ResilientTwoLifetimeIntegrationTests.cs |
Locates persisted responses in partitioned storage. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/FoundryJsonCheckpointStoreTests.cs |
Migrates checkpoint storage test doubles to typed ETags. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/FoundryAgentSessionStoreTests.cs |
Updates session storage mocks for typed ETags. |
dotnet/tests/Microsoft.Agents.AI.Foundry.Hosting.UnitTests/AgentFrameworkResponseHandlerResilienceTests.cs |
Adapts shutdown-state mocking to the updated API. |
dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/FoundryJsonCheckpointStore.cs |
Passes typed concurrency tokens when updating checkpoint indexes. |
dotnet/src/Microsoft.Agents.AI.Foundry.Hosting/AgentFrameworkResponseHandler.cs |
Uses persisted metadata and the new checkpoint-event API. |
dotnet/Directory.Packages.props |
Updates coordinated AgentServer and supporting package versions. |
Review effort: Balanced
There was a problem hiding this comment.
MAF Automated Review — Iteration 1
Result: Findings reported
Scope: full PR (1 commit(s)): 42ade51f48f3
Model: gpt-5.6-sol
Overview
The PR correctly adapts checkpoint persistence to the renamed durable-metadata APIs and preserves optimistic concurrency with typed ETag values, with focused recovery and race coverage. However, the Responses beta.9 upgrade also changes the required hosted registration entry point, while the framework's Foundry hosting extension continues to call the now local-only service-collection overload. This leaves hosted Foundry applications unable to start after the upgrade.
Reviewed the supplied pull-request change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 high) across 1 file. Details are attached to the affected lines below.
Affected areas: dotnet/Directory.Packages.props
Disambiguate the OpenAI AgentReference from the new Projects type and wait for durable checkpoint persistence before stopping recovery tests.
Responses beta.9 requires host-bound storage registration and Core task enablement for steering-only hosts.
There was a problem hiding this comment.
MAF Automated Review — Iteration 2
Result: Findings reported
Scope: 2 net-new commit(s): 678be7884c15, 7e84c83161c7
Model: gpt-5.6-sol
Overview
The update follows the new AgentServer host-builder registration contract, explicitly enables resilient tasks for steering, and adds startup and recovery regressions around those migrations. The new overloads preserve first-registration guards and existing agent/session registration behavior. One deployment compatibility gap remains: three source-deployed samples call the new API while still restoring an older published package that does not contain it.
Reviewed the supplied incremental change set across correctness, security/reliability, architecture, and failure behavior.
1 verified finding remained after source verification (1 medium) across 1 file. Details are attached to the affected lines below.
Affected areas: dotnet/samples/04-hosting/FoundryHostedAgents/responses/Hosted-Steering/Program.cs


Motivation & Context
Azure.AI.Projects and Azure.AI.AgentServer have newer coordinated preview releases with Foundry routing, resilience, storage, and recovery fixes. The update also keeps the centrally managed Azure.Core graph aligned with the minimum versions required by those releases.
Projects beta.5 adds
Azure.AI.Projects.Agents.AgentReferencealongside the existingAzure.AI.Extensions.OpenAI.AgentReference. Agent Framework uses the latter forGetProjectResponsesClientForAgent, so the code now qualifies that type explicitly instead of relying on the ambiguous short name.Description & Review Guide
Azure.ETag,PersistedMetadata,CreateCheckpointEvent(), andSessionFileWriteResultmigrations; explicitly alias the OpenAIAgentReference; add host-builderAddFoundryResponsesoverloads required by Responses beta.9 in Foundry; and enable Core resilient tasks for steering-only configurations.builder.AddFoundryResponses(...), allowing response and task storage to share the configuration-bound identity and endpoint. LocalIServiceCollectionregistration remains supported. Responses beta.9 intentionally moves local durable response state toresponses/partitions-v1; existing pre-upgrade local response files are not read after the update. Validation passed with the full Debug solution build (0 warnings/errors), Foundry tests (497 passed), Foundry Hosting tests (565 passed, 1 pre-existing skip), 20 consecutive recovery-test passes, both new hosted/steering startup regressions, a liveHosted-Steeringstartup and/readinessprobe, and scoped formatting for every changed project.Related Issue
N/A - trivial dependency maintenance using published package constraints and documented preview API migrations. No competing dependency-update PR is open.
AI Assistance
AI assistance details: Dependency compatibility analysis, API migration implementation, review-feedback reproduction, CI failure diagnosis, test updates, validation, and PR description.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.