Skip to content

Breaking change: Update Foundry agent dependencies - #20051

Draft
Jose Perez Rodriguez (joperezr) wants to merge 1 commit into
mainfrom
joperezr-foundry-dependency-migration
Draft

Breaking change: Update Foundry agent dependencies#20051
Jose Perez Rodriguez (joperezr) wants to merge 1 commit into
mainfrom
joperezr-foundry-dependency-migration

Conversation

@joperezr

Copy link
Copy Markdown
Member

Description

Updates the Microsoft Foundry dependency set independently from the bulk dependency refresh so the customer-facing Azure AI Projects major-version change can be reviewed and rolled back on its own.

  • Updates Azure.AI.Projects from 2.1.0-beta.1 (with a 2.1.0-beta.3 playground override) to 3.0.0-beta.2.
  • Updates the hosted-agent playground and generated deployment-test project from Microsoft.Agents.AI.Foundry.Hosting 1.12.0-preview.260629.1 to 1.20.0-preview.260831.1.
  • Aligns the hosted-agent project with the dependency prerequisites already being updated by the dependency refresh: Azure Core 1.62, Microsoft.Extensions.AI 10.9, Model Context Protocol 2.2, and Azure Storage Blobs 12.29.1.
  • Keeps the playground project and the out-of-tree project generated by FoundryHostedAgentDeploymentTests on the same explicit package set.

No Aspire source migration is required. Aspire does not call the Projects 3 APIs whose signatures changed, does not use the renamed Agent optimization types, and its hosted-agent sample already uses ResponseContext.PlatformContext, HostedSessionContext(UserId), and Responses protocol 2.0.0.

Breaking changes

Affected users: Applications that reference Aspire.Hosting.Foundry and also compile directly against Azure AI Projects APIs changed in 3.0, plus developers who copy or extend the hosted-agent playground with APIs removed by Foundry Hosting 1.20.

Old behavior:

  • Aspire.Hosting.Foundry restored Azure AI Projects 2.1.
  • AIProjectConnectionsOperations.GetConnection[Async] returned AIProjectConnection directly.
  • Routine listing accepted the before parameter, and routine-run listing used name.
  • Agent optimization model types used names such as OptimizationJob and OptimizationOptions.
  • Older Foundry Hosting releases supported the legacy hosted Responses contract, including chat-scoped hosting context APIs.

New behavior:

  • Aspire.Hosting.Foundry restores Azure AI Projects 3.0.
  • GetConnection returns ClientResult<AIProjectConnection> and GetConnectionAsync returns Task<ClientResult<AIProjectConnection>>.
  • Routine listing no longer accepts before; routine-run listing uses routineName.
  • Agent optimization types are prefixed with Agent, for example AgentOptimizationJob and AgentOptimizationOptions.
  • Foundry Hosting 1.20 is compatible only with Responses container protocol 2.0. HostedSessionContext.ChatId and the PerChat / PerUserAndChat memory scopes are removed.

Migration:

ClientResult<AIProjectConnection> result =
    await projectClient.Connections.GetConnectionAsync(connectionName);
AIProjectConnection connection = result.Value;

Remove the before argument from routine-list calls, rename the routine-run name argument to routineName, and use the new AgentOptimization* type names. Hosted-agent customizations should target Responses protocol 2.0, partition by HostedSessionContext.UserId, and use the PerUser memory scope instead of chat-scoped values.

Rollback: Revert this PR. That restores Azure.AI.Projects 2.1 and Microsoft.Agents.AI.Foundry.Hosting 1.12 without reverting unrelated dependency updates.

Coordination and validation

  • Model Context Protocol 2.2 is tracked separately in Update ModelContextProtocol to 2.2.0 #20045. The parent bulk dependency refresh is Refresh third-party dependencies #20046 and already carries the shared Azure Core, Microsoft.Extensions.AI, and Agent Framework prerequisites.
  • Repository SDK restore completed successfully.
  • Targeted restore against the unchanged approved feeds is currently blocked because they do not contain:
    • Azure.AI.Projects 3.0.0-beta.2 (nearest: 2.1.0-beta.3)
    • Azure.AI.AgentServer.Core 1.0.0-beta.28 (nearest: 1.0.0-beta.26)
    • Azure.AI.AgentServer.Responses 1.0.0-beta.8 (nearest: 1.0.0-beta.6)
  • No package-import pipeline was queued because approved-feed imports are paused.

Fixes # (issue)

Checklist

  • Is this feature complete?
    • Yes. Ready to ship.
    • No. Follow-up changes expected.
  • Are you including unit tests for the changes and scenario tests if relevant?
    • Yes
    • No
  • Did you add public API?
    • Yes
      • If yes, did you have an API Review for it?
        • Yes
        • No
      • Did you add <remarks /> and <code /> elements on your triple slash comments?
        • Yes
        • No
    • No
  • Does the change make any security assumptions or guarantees?
    • Yes
      • If yes, have you done a threat model and had a security review?
        • Yes
        • No
    • No

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@joperezr Jose Perez Rodriguez (joperezr) added the breaking-change Issue or PR that represents a breaking API or functional change over a prerelease. label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.sh | bash -s -- 20051

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/microsoft/aspire/main/eng/scripts/get-aspire-cli-pr.ps1) } 20051"

@aspire-repo-bot
aspire-repo-bot Bot requested a balanced review from Copilot September 10, 2026 19:48
@github-actions github-actions Bot added the area-integrations Issues pertaining to Aspire Integrations packages label Sep 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Tests selector

Selects the full PR test matrix + all PR-gated jobs (ALL) — a rule matching 'Directory.Packages.props' selects ALL

Advisory workflow impact (4)

  • Aspire.Deployment.EndToEnd.Tests (deployment workflow-only)
  • Aspire.EndToEnd.Tests (outerloop-only)
  • Aspire.Oracle.EntityFrameworkCore.Tests (outerloop-only)
  • deployment-e2e (schedule/dispatch-only)

Selection computed for commit 6476288.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Required direct and transitive package versions remain unavailable from approved feeds, preventing clean restores.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review tier: Balanced
Findings: 3 High severity

New issues introduced by this change (3)
Severity Finding
High severity Directory.Packages.props — Central package version is not restorable
High severity playground/​FoundryAgents/​DotNetHostedAgent/​DotNetHostedAgent.csproj — Hosted-agent dependency graph is unavailable
High severity tests/​Aspire.Deployment.EndToEnd.Tests/​FoundryHostedAgentDeploymentTests.cs — Deployment test project cannot restore
What changed in this PR

Updates Foundry dependencies as an independently rollbackable breaking change.

Changes:

  • Upgrades Azure AI Projects and Azure Core.
  • Aligns hosted-agent playground and deployment-test dependencies.
File Description
Directory.Packages.props Updates central Foundry prerequisites.
playground/​FoundryAgents/​DotNetHostedAgent/​DotNetHostedAgent.csproj Updates hosted-agent packages.
tests/​Aspire.Deployment.EndToEnd.Tests/​FoundryHostedAgentDeploymentTests.cs Aligns the generated deployment-test project.

Comment thread Directory.Packages.props
<PackageVersion Include="Azure.AI.Inference" Version="1.0.0-beta.5" />
<PackageVersion Include="Azure.AI.OpenAI" Version="2.9.0-beta.1" />
<PackageVersion Include="Azure.AI.Projects" Version="2.1.0-beta.1" />
<PackageVersion Include="Azure.AI.Projects" Version="3.0.0-beta.2" />
<PackageReference Include="Microsoft.Extensions.AI" VersionOverride="10.7.0" />
<PackageReference Include="ModelContextProtocol" VersionOverride="1.1.0" />
<PackageReference Include="Azure.Core" VersionOverride="1.59.0" />
<PackageReference Include="Microsoft.Agents.AI.Foundry.Hosting" VersionOverride="1.20.0-preview.260831.1" />
<PackageReference Include="Microsoft.Extensions.AI" Version="10.7.0" />
<PackageReference Include="ModelContextProtocol" Version="1.1.0" />
<PackageReference Include="Azure.Core" Version="1.59.0" />
<PackageReference Include="Microsoft.Agents.AI.Foundry.Hosting" Version="1.20.0-preview.260831.1" />
@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

@github-actions

Copy link
Copy Markdown
Contributor

Retrying the failed CI jobs for this pull request from the CI run attempt. The rerun is being tracked in the rerun attempt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-integrations Issues pertaining to Aspire Integrations packages breaking-change Issue or PR that represents a breaking API or functional change over a prerelease.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants