Add support for new Azure AI Foundry project type for Safety evals#6621
Merged
shyamnamboodiripad merged 1 commit intodotnet:mainfrom Jul 17, 2025
Merged
Add support for new Azure AI Foundry project type for Safety evals#6621shyamnamboodiripad merged 1 commit intodotnet:mainfrom
shyamnamboodiripad merged 1 commit intodotnet:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds support for Azure AI Foundry's new non-Hub-based project type for Safety evaluations. Azure AI Foundry now supports two project types: Hub-based projects (configured with subscription ID, resource group, and project name) and non-Hub-based projects (configured with an endpoint URL).
- Extends
ContentSafetyServiceConfigurationwith constructor overloads to support both Hub-based and non-Hub-based projects - Updates service communication logic to handle different API versions and authentication scopes for each project type
- Adds integration tests to verify both project types work correctly
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| ContentSafetyServiceConfiguration.cs | Added constructor overloads and properties to support endpoint-based project configuration |
| ContentSafetyService.cs | Updated service URL resolution and authentication to handle both project types |
| ContentSafetyChatClient.cs | Modified provider name generation to display appropriate project information |
| SafetyEvaluatorTests.cs | Added test scenarios for both Hub-based and non-Hub-based projects |
| Settings.cs | Added configuration property for Azure AI project endpoint |
| ContentSafetyService.UrlCacheKey.cs | Updated cache key to include endpoint in equality comparison |
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs
Outdated
Show resolved
Hide resolved
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyService.cs
Outdated
Show resolved
Hide resolved
50eb234 to
48486f1
Compare
peterwald
reviewed
Jul 16, 2025
src/Libraries/Microsoft.Extensions.AI.Evaluation.Safety/ContentSafetyServiceConfiguration.cs
Show resolved
Hide resolved
peterwald
approved these changes
Jul 16, 2025
56fee89 to
408fe32
Compare
408fe32 to
6798c58
Compare
This was referenced Aug 13, 2025
Merged
This was referenced Aug 14, 2025
Closed
Closed
Closed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #6592
Microsoft Reviewers: Open in CodeFlow