.NET: Update hosted agents#6243
Conversation
There was a problem hiding this comment.
Pull request overview
Updates Foundry hosted agent dependencies (Azure.AI.AgentServer.* beta bumps, Azure.Core 1.56.0, System.ClientModel 1.12.0), renames the integration-test role grant from "Azure AI User" to "Foundry User", adds explicit Azure.Core and System.ClientModel package references to the Foundry project, and re-applies .gitignore (adds .test_*) which removes a number of generated launchSettings.json / local.settings.json files from tracking. Also adds a Keycloak Codespaces redirect-URI setup script.
Changes:
- Bump Foundry/Azure SDK package versions in
dotnet/Directory.Packages.propsand addAzure.Core+System.ClientModelreferences toMicrosoft.Agents.AI.Foundry.csproj. - Switch integration-test bootstrap script to grant the
Foundry Userrole (instead ofAzure AI User). - Update
.gitignore(.test_*) and remove now-ignored sample/test launch/local settings files; add new Keycloaksetup-redirect-uris.sh.
Show a summary per file
| File | Description |
|---|---|
| dotnet/Directory.Packages.props | Bump Azure.AI.AgentServer.*, Azure.Core, System.ClientModel versions. |
| dotnet/src/Microsoft.Agents.AI.Foundry/Microsoft.Agents.AI.Foundry.csproj | Add explicit Azure.Core and System.ClientModel package refs. |
| dotnet/tests/Foundry.Hosting.IntegrationTests/scripts/it-bootstrap-agents.ps1 | Replace role name "Azure AI User" with "Foundry User" in docs and az calls. |
| .gitignore | Add .test_* ignore pattern. |
| dotnet/samples/04-hosting/**/local.settings.json (10 files) | Remove tracked local settings now covered by ignore rules. |
| dotnet/tests/**/Properties/launchSettings.json (3 files) | Remove tracked test launchSettings now ignored. |
| dotnet/samples/05-end-to-end/AspNetAgentAuthorization/keycloak/setup-redirect-uris.sh | New script auto-configuring Keycloak redirect URIs in Codespaces. |
| SUPPORT.md | No content change (whitespace/line numbering only). |
Copilot's findings
- Files reviewed: 19/22 changed files
- Comments generated: 0
There was a problem hiding this comment.
Automated Code Review
Reviewers: 4 | Confidence: 89%
✓ Correctness
The PR is a straightforward dependency update and gitignore re-application. Most changes are correct: package version bumps are consistent with Directory.Packages.props, local.settings.json deletions align with the existing .gitignore entry (line 231), and the role rename from 'Azure AI User' to 'Foundry User' is consistent throughout. Two minor issues: the shell script loses its execute bit (likely unintentional), and .gitignore loses its trailing newline.
✓ Security Reliability
This PR performs routine dependency updates to Azure.AI.AgentServer packages, removes local.settings.json files that were already covered by .gitignore (line 231), renames an Azure role to match the Foundry product rebrand, and adds explicit package references likely required by the newer SDK versions. No security or reliability issues found. The removal of local.settings.json files from tracking is actually a positive security change as it prevents accidental credential commits.
✓ Test Coverage
This PR is a dependency version bump and repository cleanup (re-applying .gitignore, removing tracked files that should have been ignored, renaming 'Azure AI User' to 'Foundry User' in integration test scripts). No new behavior or logic is introduced. Existing test projects (Microsoft.Agents.AI.Foundry.UnitTests with 18+ test files, Microsoft.Agents.AI.Foundry.Hosting.UnitTests with 9+ test files) already exercise the Azure.AI.AgentServer, System.ClientModel, and Azure.Core integrations. The newly-explicit PackageReferences (Azure.Core, System.ClientModel) formalize dependencies that were previously transitive and already tested. No test coverage gaps were identified.
✗ Design Approach
I found two design-level contract mismatches. The integration-test bootstrap script now grants a different Foundry project role than the rest of the hosted-agent test stack still requires, and the Azure Functions sample docs still tell users every sample ships with a
local.settings.jsoneven though this PR removes those files across the samples.
Flagged Issues
- The Azure Functions sample docs still assume checked-in per-sample
local.settings.jsonfiles after this PR deletes them. The shared guide (DurableAgents/AzureFunctions/README.md:104-105) says each sample ships with that file, and sample-specific docs (07_AgentAsMcpTool/README.md:35-45,05_WorkflowAndAgents/README.md:35-39) instruct users to edit it. Removing the files without updating or replacing that documented workflow breaks thefunc startpath for these samples.
Automated review by alliscode's agents
Description
.gitignore.Contribution Checklist